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/)
-   -   OpenFoam & Eclipse (https://www.cfd-online.com/Forums/openfoam-programming-development/98702-openfoam-eclipse.html)

gary7 March 16, 2012 12:02

OpenFoam & Eclipse
 
Hi all,

I just followed the openfoamwiki tutorial on using openfoam with eclipse, thanks to great explanation of A. Mahrla. I brought icoFoam into eclipse and could run a cavity case in there. But for debugging when I set everything up as it's described in the openfoamwiki I get the
Code:

No source available for "main() at 0x417f40"
This how I made the projects in eclipse based on the tutorial:
1. Made a project for icoFoam from its source directory under
.../solvers/icompressible/icoFoam
2. Used "lnInclude" under .../src/OpenFoam/lnInclude and .../src/finiteVolume/lnInclude for header files
3. Made another project for my case which is .../incompressible/icoFoam/cavity

I did compile the openfoam with WM_COMPILE_OPTION = Debug in the bashrc and I executed Allwmake from openfoam base directory .../openfoam210/ to compile the whole package again with Debug mode which took 3 hours to compile on my machine.

Any idea where the problem lies?

Cheers...

gary7 March 18, 2012 17:45

Has anyone tried OpenFoam in eclipse? Can you address my problem I'd appreciate it.

akidess March 19, 2012 02:57

Are you sure icoFoam has been recompiled with the debug flag, and even more important, are you sure Eclipse is executing the correct executable? The debug executable are in a different folder than the regular ones.

gary7 March 19, 2012 11:22

Thanks Anton, well I didn't know that debug version are in a different place! because all I did was to set WM_COMPILE_OPTION=Debug in the $WM_PROJECT_DIR/etc/bashrc
and I ran Allwmake from $WM_PROJECT_DIR/applications/ which recompiled and built the code again which took a long time, is that the right thing to do? or can I just recompile the solver that I want in debug mode? :o. I looked for executables in the same place as before which is $WM_PROJECT_DIR//platforms/linux64GccDPOpt/bin/ I checked the files date and they were all made new so I assumed they are in the same place as before... :confused:

Cheers :)

akidess March 19, 2012 11:29

The debug builds will end up in linux64GccDPDebug. You could just compile the solver in debug mode by adding -g to the Make/options file of your solver. You won't be able to "see" where you are once you step into the libraries though. The thorough option is to recompile everything with the debug flag. Did you re-source the bashrc after changing it?

- Anton


All times are GMT -4. The time now is 03:20.