Trying to compile on MAC OSX with XCode 3.0

I’m trying to use XCode 3.0 to work with OLB, when I try to build I’m getting linker errors.

Can use g++ / make with no problems, just trying to get a much better debugging environment!

If anyone can help would be much appreciated!

Matt Griffiths

Building target “forcedPoiseuille2D” of project “OpenLB” with configuration “Debug” — (4 errors)
cd /Users/mcg3v07/Desktop/LBSource/OpenLB
/Developer/usr/bin/g+±4.0 -o /Users/mcg3v07/Desktop/LBSource/OpenLB/build/Debug/forcedPoiseuille2D -L/Users/mcg3v07/Desktop/LBSource/OpenLB/build/Debug -F/Users/mcg3v07/Desktop/LBSource/OpenLB/build/Debug -filelist /Users/mcg3v07/Desktop/LBSource/OpenLB/build/OpenLB.build/Debug/forcedPoiseuille2D.build/Objects-normal/i386/forcedPoiseuille2D.LinkFileList -arch i386
Undefined symbols:
“olb::AnalysisFlags2D::reset()”, referenced from:
olb::DataAnalysis2D<double, olb::descriptors::ForcedD2Q9Descriptor>::DataAnalysis2D(olb::BlockStructure2D<double, olb::descriptors::ForcedD2Q9Descriptor> const&)in forcedPoiseuille.o
olb::DataAnalysis2D<double, olb::descriptors::ForcedD2Q9Descriptor>::reset() constin forcedPoiseuille.o
“olb::olb_ofstream::olb_ofstream(char const*, std::_Ios_Openmode)”, referenced from:
void olb::writeLogFile(olb::LBunits const&, std::basic_string<char, std::char_traits, std::allocator > const&)in forcedPoiseuille.o
“olb::MultiDataDistribution2D::MultiDataDistribution2D(int, int)”, referenced from:
olb::TensorField2D<double, 9>::getDataDistribution() constin forcedPoiseuille.o
olb::TensorField2D<double, 3>::getDataDistribution() constin forcedPoiseuille.o
olb::TensorField2D<double, 2>::getDataDistribution() constin forcedPoiseuille.o
olb::ScalarField2D::getDataDistribution() constin forcedPoiseuille.o
olb::BlockLattice2D<double, olb::descriptors::ForcedD2Q9Descriptor>::getDataDistribution() constin forcedPoiseuille.o
“olb::olb_ofstream::~olb_ofstream()”, referenced from:
void olb::writeLogFile(olb::LBunits const&, std::basic_string<char, std::char_traits, std::allocator > const&)in forcedPoiseuille.o
void olb::writeLogFile(olb::LBunits const&, std::basic_string<char, std::char_traits, std::allocator > const&)in forcedPoiseuille.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
“olb::AnalysisFlags2D::reset()”, referenced from:
olb::DataAnalysis2D<double, olb::descriptors::ForcedD2Q9Descriptor>::DataAnalysis2D(olb::BlockStructure2D<double, olb::descriptors::ForcedD2Q9Descriptor> const&)in forcedPoiseuille.o
olb::DataAnalysis2D<double, olb::descriptors::ForcedD2Q9Descriptor>::reset() constin forcedPoiseuille.o
“olb::olb_ofstream::olb_ofstream(char const*, std::_Ios_Openmode)”, referenced from:
void olb::writeLogFile(olb::LBunits const&, std::basic_string<char, std::char_traits, std::allocator > const&)in forcedPoiseuille.o
“olb::MultiDataDistribution2D::MultiDataDistribution2D(int, int)”, referenced from:
olb::TensorField2D<double, 9>::getDataDistribution() constin forcedPoiseuille.o
olb::TensorField2D<double, 3>::getDataDistribution() constin forcedPoiseuille.o
olb::TensorField2D<double, 2>::getDataDistribution() constin forcedPoiseuille.o
olb::ScalarField2D::getDataDistribution() constin forcedPoiseuille.o
olb::BlockLattice2D<double, olb::descriptors::ForcedD2Q9Descriptor>::getDataDistribution() constin forcedPoiseuille.o
“olb::olb_ofstream::~olb_ofstream()”, referenced from:
void olb::writeLogFile(olb::LBunits const&, std::basic_string<char, std::char_traits, std::allocator > const&)in forcedPoiseuille.o
void olb::writeLogFile(olb::LBunits const&, std::basic_string<char, std::char_traits, std::allocator > const&)in forcedPoiseuille.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (4 errors)

Two things you may want to try:

  1. As usual, type a “make clean” and “make cleanbuild” to make sure old compilations are removed
  2. Try compile in generic mode, instead of precompiled

Hope it works…