CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Eclipse for OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 10, 2013, 03:11
Default
  #81
TUM
New Member
 
Join Date: Jan 2012
Posts: 1
Rep Power: 0
TUM is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post

Did you succeed with this annoying include problem? With Ubuntu 10.04 everything was fine. Now I switched to Ununtu 12.04 and Eclipse Indigo and I face the same problem you did before. With a clean install of Eclipse and OF-2.1.x all symbols in header files cannot be resolved. However, compilation works fluently. Any solution?
I am having the same problem, did anyone manage to find a solution for this yet?
TUM is offline   Reply With Quote

Old   January 23, 2013, 14:42
Default
  #82
Member
 
Join Date: Apr 2010
Posts: 61
Rep Power: 16
alquimista is on a distinguished road
I also obtained several errors with "could not be resolved". I have spend my whole day trying to fix it without success. Are there some progress?

Thank you.
alquimista is offline   Reply With Quote

Old   January 31, 2013, 14:06
Default
  #83
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

i tried to figure out the problem of the non resolved problem.
Still no solution!
Tobi is offline   Reply With Quote

Old   February 1, 2013, 03:19
Post reg. "Symbol cannot be resolved" error
  #84
New Member
 
Dheepan Iyyampillai
Join Date: Jan 2013
Location: Bangalore, India
Posts: 3
Rep Power: 13
DheepanPillai is on a distinguished road
Hi,

The problem is that Eclipse does not read the header files without the
Code:
#ifndef 
#define
format. createFields.H and other similar header files do not follow that format. I do not know how to solve, but may be the following experience may help people to solve it.

A Work Around :
Create a project and then click open file. Open the .C file which is not in the project directory. Now all problems will be resolved. As you can see, i created a project with icoDymFoam.C and opened LaplacianFoam.C ...... Even the auto complete function works!

Tobi and apple-tree like this.
DheepanPillai is offline   Reply With Quote

Old   February 1, 2013, 05:13
Default
  #85
New Member
 
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13
alexmogavero is on a distinguished road
I have just tried this solution and actually works in the sense that no warning appears within the source.
But I am afraid that in this case will not be possible to compile the code. Moreover in my case the auto complete function did not work.
alexmogavero is offline   Reply With Quote

Old   February 3, 2013, 02:11
Post
  #86
New Member
 
Dheepan Iyyampillai
Join Date: Jan 2013
Location: Bangalore, India
Posts: 3
Rep Power: 13
DheepanPillai is on a distinguished road
Hi Alessandro,

I am familiar neither with openfoam nor eclipse. And yes, it cannot be compiled when it is not in the workspace. But when i can open like that, it is very much easier for me to edit it, use autocomplete (in mine it works as shown), double-click on a class and open the file it was declared etc. After editing it in eclipse comfortably, i wmake it from terminal.

Please do tell if you find any other solution!

Dheepan
DheepanPillai is offline   Reply With Quote

Old   February 3, 2013, 05:01
Default
  #87
New Member
 
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13
alexmogavero is on a distinguished road
Quote:
Originally Posted by DheepanPillai View Post
Hi Alessandro,

I am familiar neither with openfoam nor eclipse. And yes, it cannot be compiled when it is not in the workspace. But when i can open like that, it is very much easier for me to edit it, use autocomplete (in mine it works as shown), double-click on a class and open the file it was declared etc. After editing it in eclipse comfortably, i wmake it from terminal.

Please do tell if you find any other solution!

Dheepan
Hi Dheepan,
I must check why in my case autocomplete does not work. Which is your eclipse version? Mine is Indigo. Anyway in my case, the auto complete function and search for declaration file works only for the function directly imported with #include.
All you have to do is to add manually to the search path the directory containing the included header.

Cheers
Alessandro
alexmogavero is offline   Reply With Quote

Old   February 14, 2013, 12:40
Default
  #88
New Member
 
Join Date: Jan 2013
Location: Edmonton, AB
Posts: 9
Rep Power: 13
reynoldsStress is on a distinguished road
Hi all,

Im using
  • OpenFOAM-2.1.x compiled in debug
  • Ubuntu 12.04
  • Eclipse 3.7.2 Indigo
  • wmake and wclean work in eclipse
  • a default solver works fine that is compiled by eclipse
  • every lninclude folder in openfoam is imported into the project

I can't seem to do code completion or resolve errors that should be fine since the headers are in my include path. If this is an issue with #ifndef, then how can Eclipse get around its own addition of #ifndef to classes defined in Eclipse? i went through the documents on the wiki....but maybe they are outdated with a new version of Eclipse? Anyone experiencing the same thing?
reynoldsStress is offline   Reply With Quote

Old   February 14, 2013, 16:37
Default
  #89
New Member
 
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13
alexmogavero is on a distinguished road
It seems that everyone has the same issue.
Anyway, may I ask you if you are able to perform the step by step debug?
I tried a lot but at the end I had to give up

Thanks
Alessandro
alexmogavero is offline   Reply With Quote

Old   February 14, 2013, 16:44
Default
  #90
New Member
 
Join Date: Jan 2013
Location: Edmonton, AB
Posts: 9
Rep Power: 13
reynoldsStress is on a distinguished road
Quote:
Originally Posted by alexmogavero View Post
It seems that everyone has the same issue.
Anyway, may I ask you if you are able to perform the step by step debug?
I tried a lot but at the end I had to give up

Thanks
Alessandro
Nope, not able to do step-by-step debugging. Im tempted to move over to Netbeans here.
reynoldsStress is offline   Reply With Quote

Old   February 14, 2013, 16:53
Default
  #91
New Member
 
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13
alexmogavero is on a distinguished road
That is a nice temptation... if you manage to do it let's us know the result
alexmogavero is offline   Reply With Quote

Old   March 6, 2013, 08:30
Default something new here plus Allwmake problem fix
  #92
dzi
Member
 
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 14
dzi is on a distinguished road
hello,
are there any new ideas about fixing this issue with eclipse? code competion and classbrowser would really be nice.... I tried older versions until eclipse helios, without real success (ubuntu 12.04).

Anyway, I also had a problem getting "Allwmake" to run properly (not found-in-Path-error) in eclipse after defining a make-target like explained in the eclipse-foam tutorial.

To get the "Allwmake" as make-target run in eclipse try following procedure:
properties->c/c++ build ->environment.
set PATH variable
append a variable to native environment
${ProjDirPath}
from variable dropdown list.
Now all compilation outputs are passed to eclipse-console (works in helios, but i expect the same for juno)
thx dirk
dzi is offline   Reply With Quote

Old   March 7, 2013, 09:35
Default
  #93
dzi
Member
 
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 14
dzi is on a distinguished road
to follow up, the problem is somehow related to the eclipse indexer which cannot resolve symbols, methods etc from header files. See eg
http://www.eclipse.org/forums/index.php/m/733997/

I tried on eclipse indigo to play around with the properties->c/c++general->Indexer->files to index up-front and added headerfiles here by tracing back in the definitions.

This feature does not exist in latest release (juno) because it was only a workaround in the former versions.

I could omit many of these "symbol not found remarks", but unfortunately not all.
dzi is offline   Reply With Quote

Old   March 8, 2013, 05:35
Default
  #94
New Member
 
Join Date: Feb 2013
Posts: 3
Rep Power: 13
hulk is on a distinguished road
Hi,

I am also having problems with using wmake, I always get the two warnings, and an error at the end, saying that ld returned a satus of 1, so the application could not be compield:

/usr/bin/ld: warning: libPstream.so, needed by /home/niko/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so, not found (try using -rpath or -rpath-link)

and

/usr/bin/ld: warning: libfileFormats.so, needed by /home/niko/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libtriSurface.so, not found (try using -rpath or -rpath-link)

even though I tried to follow the tutorial, and setting up wmake like described. The compilation using wmake in the console is working just fine. Does any one know how to fix this?
hulk is offline   Reply With Quote

Old   March 8, 2013, 09:24
Default Problem with eclipse indexer solved
  #95
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
The problem with 'scalar' can be solved by adding the variable WM_DP to Properties for (Project) -> Paths and Symbols. Set it to any value, e.g. 1, for the C++ compiler (actully I added it to all configurations and all languages). I guess if you compile OpenFOAM with single precision, you should add the variable WM_SP instead. I didn't find a place in the OpenFOAM source code, where these variables are set, so I guess it is done by wmake somewhere (perhaps related to the environment variable WM_PRECISION_OPTION).


Quote:
Originally Posted by benk View Post
My solvers compile without any problem and eclipse can find all of the included files, but I'm getting a lot of flags warning of problems like "Type 'scalar' could not be resolved" and "Symbol 'runTime' could not be resolved". An example of what I mean is in the screen shot that I attached.

This is more of an annoyance since the compile still works but is there a way to fix these things?
louisgag and misklach like this.
jherb is offline   Reply With Quote

Old   March 22, 2013, 08:25
Default
  #96
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I am back in programming with eclipse and OpenFOAM.
At the moment I rebuild a thermodynamic model for using it in 2.2.x

All variables are resolved and everything is working fine.
Attached Images
File Type: jpg eclipseOF.jpg (38.9 KB, 173 views)
Tobi is offline   Reply With Quote

Old   March 22, 2013, 11:54
Default
  #97
New Member
 
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13
alexmogavero is on a distinguished road
Hello Tobi,
sometimes I also got all the classes resolved, but I am not able to understand why it does not works always.
Does it is always reproducible for you?

Thanks
alexmogavero is offline   Reply With Quote

Old   May 22, 2013, 09:32
Default
  #98
New Member
 
Marcel Vonlanthen
Join Date: Nov 2012
Location: Zurich, Switzerland
Posts: 28
Rep Power: 13
Sylv is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi all,

I am back in programming with eclipse and OpenFOAM.
At the moment I rebuild a thermodynamic model for using it in 2.2.x

All variables are resolved and everything is working fine.
Tobi, how did you manage to resolve all variables? I'm still stuck with this issue. I moved to qt-creator in the meantime...
Sylv is offline   Reply With Quote

Old   May 24, 2013, 07:43
Default
  #99
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

hmmm,... I am not sure why everything is working there.

1. I copied the thermodynamic files into $FOAM_RUN/../developement/thermodynamics/

2. I added all the paths (lnInclude) from the Make Files into eclipse
3. finished.


At the moment I am not building any stuff so I can not say if everything is resolved all the time.
Tobi is offline   Reply With Quote

Old   November 25, 2013, 09:19
Default
  #100
New Member
 
Lionel GAMET
Join Date: Nov 2013
Location: Lyon
Posts: 17
Rep Power: 12
x86_64leon is on a distinguished road
I had just opened a new thread about this issue of OF+eclipse, as it seems that information is a bit outdated. The thread can be found here :

http://www.cfd-online.com/Forums/ope...se-kepler.html

================================================== ==========


Hi everybody,

New to OpenFoam, I'm trying to set up a development environment using Eclipse (Kepler version) and OpenFoam 2.2.2.

I have tried many options and also tried to follow the tutorial at
http://openfoamwiki.net/index.php/Ho...M_with_Eclipse

but was not really successful in having Eclipse to be correctly able to edit OF files.
Instructions on the OF Wiki might be out dated with regards to OF 2.X and latest Eclipse versions.

The problem are many "symbol 'XXX' could not be resolved" in some (but not all) source files.

I have tried to import subdirectories or complete OF root, as an Eclipse C++ project.

I have tried to add Symbols (like WM_DP for instance) in the project <Properties> under <C/C++ General>/<Paths and Symbols>/<#Symbols> menu.

I have tried to add all or only some lnInclude directories under <C/C++ General>/<Paths and Symbols>/<Includes> menu.

None of these worked.

It seems Eclipse get lost in indexing the project.

Anybody has succeeded in having OF 2.X handled correctly under Eclipse ?

Regards

Lionel
x86_64leon is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 21:46.