2012-05-25 3 views
0

Prolog Foreign Function Interface에서 호출 할 C 프로그램을 컴파일하려고합니다. 필자는 Prolog에서 정확하지 않은 동적 프로그래밍을하고 있습니다. 내 파일을 컴파일 할 때, 나는 다음과 같은 오류가 발생합니다 :OSX Lion에서 swipl-ld로 컴파일 할 때 기호가 누락되었습니다 "_main"

Undefined symbols for architecture x86_64: 
    "_main", referenced from: 
     start in crt1.10.6.o 
    (maybe you meant: __main) 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
/Developer/usr/bin/clang returned code 256 
*** swipl-ld exit status 1 

은 C 파일은 단순히 예는 here을 발견했다.

이 문제를 해결할 방법이 있는지 알고있는 사람이 있습니까?

답변

0

라이브러리 (.dylib) 대신 실행 가능 파일로 링크하려는 것처럼 들립니다.

XCode를 사용하면 프로젝트를 동적 C/C++ 라이브러리로 만들어야합니다.

관련 문제