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/)
-   -   strange compiler error (https://www.cfd-online.com/Forums/openfoam-programming-development/114352-strange-compiler-error.html)

Chrisi1984 March 9, 2013 15:26

strange compiler error
 
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

wyldckat March 9, 2013 17:26

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 :rolleyes:

Best regards,
Bruno

Chrisi1984 March 10, 2013 05:39

Thank you very much! Exactly that was the problem.

Kind regards

Chrisi


All times are GMT -4. The time now is 11:44.