CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Compiling problem (

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.C 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



EXE = $(FOAM_USER_APPBIN)/particleFoam


-I$(LIB_SRC)/cfdTools/incompressible \

-I$(LIB_SRC)/OpenFOAM/lnInclude \

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

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


EXE_LIBS = -lfiniteVolume \


Many thanks.


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/ file not recognized: File format not recognized
collect2: ld returned 1 exit status

Any advice for this problem?


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.


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: /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,

Stefan Radl

All times are GMT -4. The time now is 06:26.