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

strange compiler error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 9, 2013, 16:26
Default strange compiler error
  #1
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
Hello all,

I tried to compile a solver with a new library. But during the compiling I receive the following error message:

Quote:
/applications/solvers/combustion/reactingFoam -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/simpleReactingPorousParcelFoam.o
g++: Fehler: −I/root/OpenFOAM/root-2.2.0/lib/thermophysicalModels/reactionThermo/lnInclude: Datei oder Verzeichnis nicht gefunden
make: *** [Make/linux64GccDPOpt/simpleReactingPorousParcelFoam.o] Fehler 1
root@ubuntu:~/OpenFOAM/root-2.2.0/applications/solvers
Then I checked whether the folder is existing or not by trying to move to the folder in the same terminal window afterwards. And it worked as you can see below:

Quote:
/applications/solvers/combustion/reactingFoam -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/simpleReactingPorousParcelFoam.o
g++: Fehler: −I/root/OpenFOAM/root-2.2.0/lib/thermophysicalModels/reactionThermo/lnInclude: Datei oder Verzeichnis nicht gefunden
make: *** [Make/linux64GccDPOpt/simpleReactingPorousParcelFoam.o] Fehler 1
root@ubuntu:~/OpenFOAM/root-2.2.0/applications/solvers/simpleReactingPorousParcelFoam# cd /root/OpenFOAM/root-2.2.0/lib/thermophysicalModels/reactionThermo/lnInclude
root@ubuntu:~/OpenFOAM/root-2.2.0/lib/thermophysicalModels/reactionThermo/lnInclude#
Does anybody of you have an idea what is the reason that the compiler does not recognize the folder also it is there?

Thanks for your help in advance.

Kind regards

Chrisi
Chrisi1984 is offline   Reply With Quote

Old   March 9, 2013, 18:26
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Chrisi,

It took me a little while to spot the error. Notice that the error message is including "−I" as part of the path:
Quote:
Code:
g++: Fehler:  −I/root/OpenFOAM/root-2.2.0/lib/thermophysicalModels/reactionThermo/lnInclude:  Datei oder Verzeichnis nicht gefunden
Upon closer look, it seems that you've copy-pasted this path from some PDF or DOC/ODT file, because "−I" and "-I" is not the same thing!



For reference, check Wikipedia on the subject of hyphens: http://en.wikipedia.org/wiki/Hyphen
Quote:
The hyphen () is a punctuation mark used to join words and to separate syllables of a single word. The use of hyphens is called hyphenation. The hyphen should not be confused with dashes (, , , ), which are longer and have different uses, or with the minus sign () which is also longer.
Crazy, ain't it? Now that I look more closely, keyboards also have different lengths for the minus and hyphen drawings on the keys... this is all so weird... oh well.

Which reminds me of 1 vs I vs l: http://en.wikipedia.org/wiki/Homoglyph#I_and_l

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   March 10, 2013, 06:39
Default
  #3
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
Thank you very much! Exactly that was the problem.

Kind regards

Chrisi
Chrisi1984 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undeclared Identifier Errof UDF SteveGoat Fluent UDF and Scheme Programming 7 October 15, 2014 07:11
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 42 May 14, 2012 20:48
Problem running perturbUCyl sen.1986 OpenFOAM 14 March 23, 2012 05:12
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42


All times are GMT -4. The time now is 09:23.