CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Compiling a porousZone-like library (https://www.cfd-online.com/Forums/openfoam-programming-development/98322-compiling-porouszone-like-library.html)

Hisham March 8, 2012 06:08

Compiling a porousZone-like library
 
Dear Foamers,

I have developed a soilZone class modified from the porousZone class. I used to compile it directly with the solver (which works OK). Nevertheless, I, now, need to compile it separately as a library. I tried it but failed. I, then, copied the porousZones folder and renamed it and it compiled OK as a libporousZoneTry.so

I used the following "files" file
Code:

./soilZone.C \
./soilZones.C

LIB = $(FOAM_USER_LIBBIN)/libsoilZones

and the "options" file
Code:

EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/triSurface/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude

LIB_LIBS = \
    -lOpenFOAM \
    -ltriSurface \
    -lmeshTools

The error I keep getting (only for the soilZones lib) is:
Code:

hisham@numubuntu-System-Product-Name:~/OpenFOAM/numubuntu-2.0.0/soilZones$ wclean
hisham@numubuntu-System-Product-Name:~/OpenFOAM/numubuntu-2.0.0/soilZones$ wmake libso
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file soilZones.C
soilZone.C:4: *** missing separator.  Stop.
hisham@numubuntu-System-Product-Name:~/OpenFOAM/numubuntu-2.0.0/soilZones$

Using Google this error seems to be related to "Make". Also, soilZone.C:4 is a comment line.

Thanks in advance for your help!
Best regards,
Hisham Elsafti

Hisham March 8, 2012 09:49

Stupid mistake ... extra "\" after soilZone.C in "files" ... :mad:

Nevertheless .... it compiles now


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