CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Compile error undefined reference to (

braveandi February 29, 2008 11:46

Hi I am using the OpenFOAM

I am using the OpenFOAM standard solvers for some now and did also modify them slightly and recompile. In order to understand the capabilities of OpenFOAM a little better I am about to build my own solver including lagrangian particles. But when I include some code used in "dieselSpray" or Bernhard Gschaider's "icoLagrangianFoam" I get the error message:

Make/linuxGccDPOpt/lagrangianFoam.o: In function `Foam::IOPtrList<foam::particleinjector>::type() const':
lagrangianFoam.C typeEv[Foam::IOPtrList<foam::p articleinjector>::type() const]+0x11): undefined reference to `Foam::IOPtrList<foam::particleinjector>::typeName '

when using a IOPtrList.

I did #include "IOPtrList.H" in the header file and my options file looks like

-I$(LIB_SRC)/cfdTools/incompressible \
-I$(LIB_SRC)/cfdTools/general/lnInclude \
-I$(LIB_SRC)/OpenFOAM/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \

-lfiniteVolume \

what is going wrong?


stephan March 1, 2008 10:04

hi, i am not sure but as fa

i am not sure but as far as i remember the injector is part of the lagrangian/dieselspray and not of lagrangian/basic. that would explain the undef. ref. .

dmoroian March 1, 2008 12:08

Hi Andreas, As far as I can t
Hi Andreas,
As far as I can tell, there is a class in your code, called "particleinjector" for which I could not find any reference in OpenFOAM. Is this class developed by you?
If it is, you need to include the object particleinjector.o in your options file.


braveandi March 3, 2008 04:49

Thx As Dragos suspected "pa

As Dragos suspected "particleInjector" is a self defined class so no need to include "lagrangian/dieselspray". So I will try to include the objectfile.


All times are GMT -4. The time now is 04:12.