CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Wmake C and KDevelop for a Foam project (https://www.cfd-online.com/Forums/openfoam-installation/57215-wmake-c-kdevelop-foam-project.html)

roncresswell September 20, 2005 20:54

Hi folks, has anyone tried
 
Hi folks,

has anyone tried to set up and use KDevelop under linux to manage a Foam project? I was wondering how good it is and whether I should consider it?

Ron

yingfeng January 1, 2008 07:35

Hi there, Interesting idea
 
Hi there,

Interesting idea for me too since I am using kdevelop 3.5.0 recently, and I really enjoyed the nice editor. A simple procedure I found is:

1. assume the project is already sitting under a folder and can be compiled with wmake

2. create a script named foamK
. /home/yshen/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/wmake
kdevelop

the first line sets up OpenFoam environment, the second line starts kdevelop

chmod a+x foamK
copy foamK to /usr/local/bin

3. run foamK to start kdevelop.

4. go to Project -> Importing existing project to add all the files

5. under Project -> Project Options, choose Build Options->Other, set the name of build script to
/home/username/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/wmake, you can find your path by typing 'which wmake' in your terminal

6. you would need to add '-DFULLDEBUG -g -O0' to your Make/option file in order to debug the executable in kdevelop

happy new year!
Yingfeng

deepsterblue January 1, 2008 14:44

If you're looking for alternat
 
If you're looking for alternatives, I'd suggest NetBeans. I've configured it with OpenFOAM, and the procedure is descibed here:
http://openfoamwiki.net/index.php/Configure_NetBeans

sradl January 3, 2008 14:52

Dear Sandeep, tried NetBean
 
Dear Sandeep,

tried NetBeans, however it does not work with OF 1.4. It tells me that it could not find the Make directory (needed by wmake)!

How does NetBeans know where the Make directory is?

deepsterblue January 3, 2008 15:25

It does work. I'm using it rig
 
It does work. I'm using it right now.

All that you're doing here is modifying NetBeans to call (the modified) wmake, which requires the Make directory (instead of gmake, which Netbeans assumes by default).

Could you post your output?

sradl January 4, 2008 03:47

Hi Sandeep, problem solved,
 
Hi Sandeep,

problem solved, I just had to direct netBean to the correct source directory.

Thanks in advance

sradl January 4, 2008 06:05

Dear Sandeep, although I'm
 
Dear Sandeep,

although I'm starting to like netBeans, I have a problem:

when I navigate to an include-file that lives anywhere else (e.g. fvCFD.H), there are some include statements (e.g. Time.H) that are underlined in red, i.e., they are not sourced correctly. Only *.H files in the same directory as the sourced file fvCFD.H are not underlined. However, I'm sure that they are sourced (in the Tools->Options->Code Assistance/C++Compiler-Include Directories) and I can navigate to them when they are included in the project files (e.g., when I include Time.H in the solver's C-file, I can navigate to Time.H)!

Any idea how to get rid of this so that I can navigate conveniently to sub-sourced files?

br
Stefan

deepsterblue January 4, 2008 11:18

Are you adding the lnInclude d
 
Are you adding the lnInclude directories under code-assistance? You'd be able to see all the necessary headers that way...

Sandeep

karamiag January 19, 2008 06:25

Hi folks, I have just install
 
Hi folks,
I have just installed OF 1.4.1 and NetBeans 6.0, put nbmake_1.4.1 in $WM_PROJECT_DIR/wmake, changed the Make Command to the new script (as suggested in the openfoamwiki) and added all the lnInclude directories under code-assistance. Now I want to modify and compile the file

~/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C

I start netbeans, open a new project, select C/C++ under Categories, and C/C++ Application under Projects; after this I have to provide a directory name for Project Name and Project Location. I have to provide a specific directory name and Project Location?
The problem is that right clicking kEpsilon.C and selecting "compile file", the compilation fails. The output is this


Running "rm -rf build/Release/GNU-Linux-x86/kEpsilon/kEpsilon.o" in /home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels/compressible


Clean successful. Exit value 0.

Running "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/wmake/nbmake_1.4.1 -f nbproject/Makefile-Release.mk build/Release/GNU-Linux-x86/kEpsilon/kEpsilon.o" in /home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels/compressible

g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/turbulenceModel.o Make/linux64GccDPOpt/newTurbulenceModel.o Make/linux64GccDPOpt/laminar.o Make/linux64GccDPOpt/kEpsilon.o Make/linux64GccDPOpt/RNGkEpsilon.o Make/linux64GccDPOpt/LaunderSharmaKE.o Make/linux64GccDPOpt/LRR.o Make/linux64GccDPOpt/LaunderGibsonRSTM.o Make/linux64GccDPOpt/realizableKE.o Make/linux64GccDPOpt/SpalartAllmaras.o Make/linux64GccDPOpt/kOmegaSST.o Make/linux64GccDPOpt/mutStandardRoughWallFunctionFvPatchScalarField.o -L/home/nettis/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt \
-lOpenFOAM -liberty -ldl -lm -o OpenFOAM.out
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'

Thanks,
Giovanni

luca January 19, 2008 11:50

Hi Giovanni, you are compil
 
Hi Giovanni,

you are compiling your code like a standalone program instead of a library. Turbulence model is a library and the right option is wmake libso if you choose shared object libraries. Just put the option libso in the options of your development environment.

Enjoy

Luca

deepsterblue January 19, 2008 11:58

Well, the issue is that you're
 
Well, the issue is that you're trying to compile to a shared library (.so), whereas gcc was expecting an application and therefore, a reference to main.

This is easy enough to handle - wmake (or, in this case, nbmake) is expecting an additional parameter, libso to make a shared lib. This would require a little parse-coding in the nbmake script. Or, you could live with it at the moment by typing wmake libso at the command line, each time you want to compile to a library.

Hope this helps.

karamiag January 19, 2008 14:40

OK, I think I will use "wmake
 
OK, I think I will use "wmake libso" at the command line! But, is there a case in which I can make a compilation using netbeans? Can you give me an example of file/s in the src directory? If I can't compile why I have to use nbmake?

Thanks again for your patience.

johndeas January 21, 2008 12:59

Hi, I tried to create a kde
 
Hi,

I tried to create a kdevelop project to manage my code. However, the code completion seems not to be working. I imported my application directory as a generic c++ application, then, in Project/project options/c++ support, I added

.;/home/vinz/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude;/home/vinz/OpenF OAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude;

as a custom include paths.

Am I missing something ?

Vincent

deepsterblue January 23, 2008 10:21

Giovanni, Netbeans (or any
 
Giovanni,
Netbeans (or any IDE, for that matter) is just a front-end for code development. It will still rely on make/wmake/gcc for the actual compilation process. I'll admit that the nbmake script is very rudimentary, and still requires a lot of work. I use it to develop custom applications, rather than modifications to the existing libraries.

John,
I haven't tried kdevelop, but a little more specifics about the problem would be useful.

kent_kapitan July 23, 2008 17:52

I'm trying to use KDevelop 3.5
 
I'm trying to use KDevelop 3.5 for OpenFOAM-1.5 and haven't had much luck. If anyone has succesfully managed to develop openFOAM projects within KDevelop I would welcome an example of your method. For example, if I wanted to compile/link/debug the icoFoam/cavity tutorial, how would I go about importing it into KDevelop, and what Project Options should I set ? Thank you.

openfoam15 March 3, 2009 10:02

thanks jiayuan jin
 
thanks

jiayuan jin

wendywu June 25, 2009 22:28

kdevelop or netbean is better?
 
Hi,
I am doing some modification to standard solvers. when the solver runs, I want to know where it has mistakes, so is kdevelop or netbean the software I can use? which one is better for OpenFOAM-1.5? are they all free software?
Thank you for any advice.

Wendy

gunnar June 26, 2009 05:28

>which one is better for OpenFOAM-1.5?
none
>are they all free software?
http://lmgtfy.com/?q=netbeans
http://lmgtfy.com/?q=kdevelop

wendywu June 27, 2009 11:16

Thank you.
I will try netbeans. It seems kdevelop is more complicated when downloading.

Wendy

olesen June 29, 2009 02:30

My coworker uses eclipse (www.eclipse.org) with the C++ development tool (http://www.eclipse.org/cdt) and egit (http://git.or.cz/gitwiki/EclipsePlugin) the eclipse git plugin - he seems happy with the combination.


All times are GMT -4. The time now is 15:10.