CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Compiling problem (http://www.cfd-online.com/Forums/openfoam-solving/58583-compiling-problem.html)

zhoubinwx August 22, 2008 05:48

Dear all, When we compile ou
 
Dear all,
When we compile our code, we get:

Make/linuxGccDPOpt/IncompressibleCloud.o: In function `Foam::Cloud<foam::hardballparticle>::type() const':
IncompressibleCloud.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZNK4Foam5CloudINS_16HardBallParticleEE4type Ev[Foam::Cloud<foam::hardballp article>::type() const]+0x11): undefined reference to `Foam::Cloud<foam::hardballparticle>::typeName'
collect2: ld returned 1 exit status
make: *** [/home/zhou/OpenFOAM/zhou-1.5/applications/bin/linuxGccDPOpt/particleFoam] Error 1

Do you have any opinion about this?

By the way, in
Make/files:
particleFoam.C

HardBallParticle.C

IncompressibleCloud.C



EXE = $(FOAM_USER_APPBIN)/particleFoam

Make/options:
EXE_INC = \

-I$(LIB_SRC)/cfdTools/incompressible \

-I$(LIB_SRC)/OpenFOAM/lnInclude \

-I$(LIB_SRC)/lagrangian/basic/lnInclude \

-I$(LIB_SRC)/cfdTools/general/lnInclude \

-I$(LIB_SRC)/finiteVolume/lnInclude



EXE_LIBS = -lfiniteVolume \

-llagrangian

Many thanks.

Bin

sradl August 22, 2008 07:08

Dear Foamers, have a seriou
 
Dear Foamers,

have a serious problem also when linking new applications on a amd64 bit system under debian linux:
-compiling works fine and produces a *.o file in the Make/linux64GccDPOpt directory

- when g++ tries to link it throws:
/home/radl/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64 -unknown-linux-gnu/4.3.1/../../../../lib64/libstdc++.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

Any advice for this problem?

br
Stefan

fra76 August 22, 2008 12:39

Hi Stefan, I have the same pr
 
Hi Stefan,
I have the same problem with gcc-4.3.1 on a Suse 10 workstation. Basically, I cannot neither use the precompiled compiler nor compile it from source.
I resolved switching back to gcc 4.2.2, the one distributed with OpenFOAM 1.4.1.
A couple of changes in some source files are needed, but nothing serious.

Regards,
Francesco

sradl September 3, 2008 09:00

Dear Francesco, thank you -
 
Dear Francesco,

thank you - it works perfectly!

The only problem was to get the compiled version of gcc-4.2.1, i finally used this link:

http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/f/fo /foam/

However, compiling with the new gcc worked fine on my new openSUSE 11.0 installation on an Intel QuadXtreme.

Thank you once again and have a nice day,

br
Stefan Radl


All times are GMT -4. The time now is 16:31.