Конструкция компилятора — Компиляция PyGAMMA Mac Lion: g ++ не может найти стандартные заголовочные файлы C ++ (string / iostream …)

я пытаюсь скомпилировать PyGAMMA в соответствии с этими инструкциями http://scion.duhs.duke.edu/vespa/gamma/wiki/PyGammaBuildingLibrary:

Моя настройка:
XCode: 4.5.1 + CommandLineTools
MacOSX Lion

Я получаю следующий вывод:

~/gamma/platforms/OSX $ make pysgdist

Include directory: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
Library directory: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

Checking for python include and lib directories

Good. The Python Includes Directory Exists. /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
Good. The Python Library Directory Exists. /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

g++ -c -fPIC -Wall -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk -I../../src  -D_USING_LAPACK_ -O3 -arch x86_64 ../../src/Basics/Gutils.cc -o ../../mac-darwin/Gutils.pso
In file included from ../../src/Basics/Gutils.cc:33:
../../src/Basics/Gutils.h:33:50: error: string: No such file or directory
../../src/Basics/Gutils.h:34:60: error: iostream: No such file or directory
In file included from ../../src/Basics/Gutils.h:35,
from ../../src/Basics/Gutils.cc:33:
../../src/GamGen.h:163:19: error: cstdlib: No such file or directory
../../src/Basics/Gutils.cc:37:20: error: stdlib.h: No such file or directory
../../src/Basics/Gutils.cc:38:18: error: math.h: No such file or directory
In file included from ../../src/Basics/Gutils.cc:33:
../../src/Basics/Gutils.h:52: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:52: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:54: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:54: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:56: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:56: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:58: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:58: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:59: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:59: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:60: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:60: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:77: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:77: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:78: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:78: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.h:79: error: expected unqualified-id before ‘&’ token
../../src/Basics/Gutils.h:79: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:40: error: ‘std::string’ has not been declared
../../src/Basics/Gutils.cc:41: error: ‘std::cout’ has not been declared
../../src/Basics/Gutils.cc:42: error: ‘std::cin’ has not been declared
../../src/Basics/Gutils.cc:43: error: ‘std::endl’ has not been declared
../../src/Basics/Gutils.cc:61: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:61: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘void query_parameter(int, char**, int, int)’:
../../src/Basics/Gutils.cc:63: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:64: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:64: error: ‘Q’ was not declared in this scope
../../src/Basics/Gutils.cc:64: error: ‘cin’ was not declared in this scope
../../src/Basics/Gutils.cc:64: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:68: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:68: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘void query_parameter(int, char**, int, int)’:
../../src/Basics/Gutils.cc:68: error: redefinition of ‘void query_parameter(int, char**, int, int)’
../../src/Basics/Gutils.cc:61: error: ‘void query_parameter(int, char**, int, int)’ previously defined here
../../src/Basics/Gutils.cc:70: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:70: error: ‘atof’ was not declared in this scope
../../src/Basics/Gutils.cc:71: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:71: error: ‘Q’ was not declared in this scope
../../src/Basics/Gutils.cc:71: error: ‘cin’ was not declared in this scope
../../src/Basics/Gutils.cc:71: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:75: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:75: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘void query_parameter(int, char**, int, int)’:
../../src/Basics/Gutils.cc:75: error: redefinition of ‘void query_parameter(int, char**, int, int)’
../../src/Basics/Gutils.cc:61: error: ‘void query_parameter(int, char**, int, int)’ previously defined here
../../src/Basics/Gutils.cc:77: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:77: error: ‘atoi’ was not declared in this scope
../../src/Basics/Gutils.cc:78: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:78: error: ‘Q’ was not declared in this scope
../../src/Basics/Gutils.cc:78: error: ‘cin’ was not declared in this scope
../../src/Basics/Gutils.cc:78: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:82: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:82: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘bool ask_set(int, char**, int, int)’:
../../src/Basics/Gutils.cc:85: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:85: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:89: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:89: error: ‘Q’ was not declared in this scope
../../src/Basics/Gutils.cc:90: error: ‘cin’ was not declared in this scope
../../src/Basics/Gutils.cc:91: error: expected `;' before ‘ss’
../../src/Basics/Gutils.cc:91: warning: statement has no effect
../../src/Basics/Gutils.cc:92: error: ‘ss’ was not declared in this scope
../../src/Basics/Gutils.cc:93: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:98: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:98: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘bool ask_set(int, char**, int, int)’:
../../src/Basics/Gutils.cc:98: error: redefinition of ‘bool ask_set(int, char**, int, int)’
../../src/Basics/Gutils.cc:82: error: ‘bool ask_set(int, char**, int, int)’ previously defined here
../../src/Basics/Gutils.cc:101: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:101: error: ‘atoi’ was not declared in this scope
../../src/Basics/Gutils.cc:105: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:105: error: ‘Q’ was not declared in this scope
../../src/Basics/Gutils.cc:106: error: ‘cin’ was not declared in this scope
../../src/Basics/Gutils.cc:107: error: expected `;' before ‘ss’
../../src/Basics/Gutils.cc:107: warning: statement has no effect
../../src/Basics/Gutils.cc:108: error: ‘ss’ was not declared in this scope
../../src/Basics/Gutils.cc:109: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:109: error: ‘atoi’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:114: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:114: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘bool ask_set(int, char**, int, int)’:
../../src/Basics/Gutils.cc:114: error: redefinition of ‘bool ask_set(int, char**, int, int)’
../../src/Basics/Gutils.cc:82: error: ‘bool ask_set(int, char**, int, int)’ previously defined here
../../src/Basics/Gutils.cc:117: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:117: error: ‘atof’ was not declared in this scope
../../src/Basics/Gutils.cc:121: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:121: error: ‘Q’ was not declared in this scope
../../src/Basics/Gutils.cc:122: error: ‘cin’ was not declared in this scope
../../src/Basics/Gutils.cc:123: error: expected `;' before ‘ss’
../../src/Basics/Gutils.cc:123: warning: statement has no effect
../../src/Basics/Gutils.cc:124: error: ‘ss’ was not declared in this scope
../../src/Basics/Gutils.cc:125: error: ‘V’ was not declared in this scope
../../src/Basics/Gutils.cc:125: error: ‘atof’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:143: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:143: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘void GAMMAerror(int)’:
../../src/Basics/Gutils.cc:154: error: expected `;' before ‘s’
../../src/Basics/Gutils.cc:154: warning: statement has no effect
../../src/Basics/Gutils.cc:155: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:155: error: ‘s’ was not declared in this scope
../../src/Basics/Gutils.cc:155: error: ‘noret’ was not declared in this scope
../../src/Basics/Gutils.cc:155: error: ‘endl’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:158: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:158: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘void GAMMAerror(int)’:
../../src/Basics/Gutils.cc:158: error: redefinition of ‘void GAMMAerror(int)’
../../src/Basics/Gutils.cc:143: error: ‘void GAMMAerror(int)’ previously defined here
../../src/Basics/Gutils.cc:160: error: expected `;' before ‘msg’
../../src/Basics/Gutils.cc:160: warning: statement has no effect
../../src/Basics/Gutils.cc:161: error: ‘eidx’ was not declared in this scope
../../src/Basics/Gutils.cc:163: error: ‘msg’ was not declared in this scope
../../src/Basics/Gutils.cc:163: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:164: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:165: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:166: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:167: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:168: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:169: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:170: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:171: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:172: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:173: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:174: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:175: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:176: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:177: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:178: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:179: error: ‘noret’ was not declared in this scope
../../src/Basics/Gutils.cc:179: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:181: error: ‘hdr’ was not declared in this scope
../../src/Basics/Gutils.cc:181: error: ‘msg’ was not declared in this scope
../../src/Basics/Gutils.cc:181: error: ‘noret’ was not declared in this scope
../../src/Basics/Gutils.cc: At global scope:
../../src/Basics/Gutils.cc:184: error: expected ‘,’ or ‘...’ before ‘&’ token
../../src/Basics/Gutils.cc:184: error: ISO C++ forbids declaration of ‘string’ with no type
../../src/Basics/Gutils.cc: In function ‘void GAMMAerror(int)’:
../../src/Basics/Gutils.cc:184: error: redefinition of ‘void GAMMAerror(int)’
../../src/Basics/Gutils.cc:143: error: ‘void GAMMAerror(int)’ previously defined here
../../src/Basics/Gutils.cc:186: error: expected `;' before ‘msg’
../../src/Basics/Gutils.cc:186: warning: statement has no effect
../../src/Basics/Gutils.cc:187: error: ‘eidx’ was not declared in this scope
../../src/Basics/Gutils.cc:189: error: ‘msg’ was not declared in this scope
../../src/Basics/Gutils.cc:189: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:190: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:191: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:192: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:193: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:194: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:195: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:195: error: ‘pname’ was not declared in this scope
../../src/Basics/Gutils.cc:196: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:197: error: ‘string’ cannot be used as a function
../../src/Basics/Gutils.cc:199: error: ‘hdr’ was not declared in this scope
../../src/Basics/Gutils.cc:199: error: ‘msg’ was not declared in this scope
../../src/Basics/Gutils.cc:199: error: ‘pname’ was not declared in this scope
../../src/Basics/Gutils.cc:199: error: ‘noret’ was not declared in this scope
../../src/Basics/Gutils.cc: In function ‘volatile void GAMMAfatal()’:
../../src/Basics/Gutils.cc:204: error: ‘cout’ was not declared in this scope
../../src/Basics/Gutils.cc:204: error: ‘endl’ was not declared in this scope
../../src/Basics/Gutils.cc:205: error: ‘exit’ was not declared in this scope
make: *** [../../mac-darwin/Gutils.pso] Error 1

Кажется, что стандартные включения C ++ не включаются автоматически.
У кого-нибудь есть догадки, как это исправить?

Благодарю.

0

Решение

Просто решил это ..

1) Расскажите gcc об обычном стандартном заголовке C ++. Поэтому измените:
SRCDIRINCL = -I $ (SRCDIR)
в
SRCDIRINCL = -I $ (SRCDIR) -I / usr / include -I / usr / include / c ++ / 4.2.1 /

2) Расскажите gcc об обычном пути к osx framework и включите Accelerate framework. Поэтому измените:
LAPACK_LIBS =
в
LAPACK_LIBS = -F / Система / Библиотека / Каркасы / -рамка Ускорение

Теперь должно работать нормально.

0

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]