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/)
-   -   Undefined reference to ... (https://www.cfd-online.com/Forums/openfoam-programming-development/104864-undefined-reference.html)

anishtain4 July 17, 2012 10:46

Undefined reference to ...
 
I'm trying to write a utility for making compressible homogeneous turbulent box flow. To achieve that change turbGen.H and turbGen.C have to be modified. Since I don't want to modify them, I have copied them in my user directory/application/utility/cboxTurb and changed their name to cturbGen.H and cturbGen.C. As it comes out cturbGen.H is being used correctly but when it wants to define the functions from cturbGen.C compiler complains:

undefined reference to `Foam::cturbGen::cturbGen...`

How should I make it understand where is the cturbGen.C file? should the "turbGen.dep" be changed in the Foam directory?

tomislav_maric July 18, 2012 10:31

@Mahdi..

Hi, can you post the whole error message?

anishtain4 July 18, 2012 11:05

Actually this is the problem, no matter what I write in my ctubGen.C, it compiles without any problem which means wmake is not using my file at all, however I have added the header in my main file which is cboxTurb.C


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