This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39884] undefined reference
- From: "nilesh dot barange at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2009 04:24:37 -0000
- Subject: [Bug c++/39884] undefined reference
- References: <bug-39884-17624@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from nilesh dot barange at gmail dot com 2009-04-29 04:24 -------
(In reply to comment #1)
> This means you don't have any definition of Preprocess or any other of the
> functions mentioned above.
>
Following is my code...
#include <iostream>
#include <cmath>
#include <cstdlib>
#include "domain.h"
#include "preprocess.h"
using namespace std;
int main(){
Domain* pdomain;
int size = 100;
int total_nodes =size*size;
int dims = 2;
int nz = 1;
double tau = 0.6;
double rhozero = 1.0;
int timemax = 100000;
Input_st* pInput_ar;
pInput_ar = (Input_st*) Preprocess(size, size, nz, pInput_ar,
"config_data.txt");
//DeallocateInputArray(pInput_ar);
DisplayInputArray(pInput_ar, total_nodes);
pdomain = new Domain(dims, size, size, nz, tau, rhozero);
pdomain->InitializeDomain(pInput_ar, total_nodes);
pdomain->DisplayDomain();
for(int t=0; t<timemax; t++) {
pdomain->SimulateDomain();
pdomain->DisplayDomain();
if(t%100 == 0){
pdomain->DisplayDomain();
cout<<t<<endl;
}
}
//pdomain->PostProcess();
//pdomain->ConstructDomain()
//Lattice_Abc* pLattice = new Lattice_D2Q9();
// Lattice_Abc* qLattice = new Lattice_D3Q19();
/*
Node*** mpNode;
mpNode = new Node**[nz];
for(int z=0; z<mNz; z++){
mpNode[z] = new Node*[mNy];
for(int y=0; y<mNy; y++){
mpNode[z][y]= new Node[mNx];
}
}*/
/*
Pdfs_Abc* pPdfs = new Pdfs_Solid();
pPdfs->DisplayPdfs(pLattice);
double density=2.0;
Pdfs_Abc* qPdfs = new Pdfs_Fluid(qLattice,density);
qPdfs->DisplayPdfs(qLattice);
*/
//Lattice_Abc* & rpLattice = pLattice;
//Lattice_Abc** ppLattice= & pLattice;
//rpLattice->DisplayLattice();
//(*ppLattice)->DisplayLattice();
/*
pLattice->DisplayLattice();
int & speeds = pLattice->Speeds();
cout<<"speeds\t"<<speeds<<endl;
//Moments_Abc* pMoments = new Moments_Fluid();
double vel[2] = {1.0, 0.0};
double density =1.0;
int nodetype =21;
//Moments_Abc* pMoments = new Moments_Fluid(pLattice, density, vel,
nodetype);
//pMoments->DisplayMoments(pLattice);
//Moments_Abc* qMoments = new Moments_Fluid(qLattice, density, vel,
nodetype);
//qMoments->DisplayMoments(qLattice);
Moments_Abc* pMoments = new Moments_Solid(pLattice, density, vel,
nodetype);
pMoments->DisplayMoments(pLattice);
Moments_Abc* qMoments = new Moments_Solid();//(qLattice, density, vel,
nodetype);
qMoments->DisplayMoments(qLattice);
*/
cout<<"\nend of main"<<endl;
}
So where I am wrong.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39884