premake4 helloworld C++ 작동을 시도 중입니다. makeake가 premake로 작성된 후 릴리스 구성으로 make를 호출하면 오류가 발생합니다. (나는 OSX 10.9.4에 연타를 사용하고 있습니다) 호출 make config=release
는 생산 :premake C++ "hello world"오류
ld: internal error: atom not found in symbolIndex(...
내가 릴리스 플래그에 "기호"플래그를 추가하면 모든 것이 잘 작동합니다. 물론 이것은 디버그 기호를 생성합니다.
premake4.lua :
solution "cpp_hello_world"
configurations { "Debug", "Release"}
project "cpp_hello_world.out"
kind "ConsoleApp"
language "C++"
files { "**.cpp" }
buildoptions { "-std=c++1y" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
MAIN.CPP :
#include <iostream>
int main(){
std::cout << "hello world" << std::endl;
return 0;
}
이 표준의 예에서와 같이 작동하지 않는 이유는 어떤 생각? make config=release verbose=1
를 사용 http://industriousone.com/post/typical-c-project-0
완료 출력 :
==== Building cpp_hello_world.out (release) ====
Creating obj/Release
mkdir -p obj/Release
main.cpp
c++ -MMD -MP -DNDEBUG -O2 -std=c++1y -o "obj/Release/main.o" -c "main.cpp"
Linking cpp_hello_world.out
c++ -o ./cpp_hello_world.out obj/Release/main.o -Wl,-x
ld: internal error: atom not found in symbolIndex(__ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cpp_hello_world.out] Error 1
make: *** [cpp_hello_world.out] Error 2
buildoptions에서'C++ 1y'은 무엇을 의미합니까? – kobigurk
http://clang.llvm.org/cxx_status.html "C++ 1y 구현 상태 Clang 3.4 및 이후 버전은 다가오는 C++ 언어 표준의 모든 초안 국제 표준 (가장 최근 공개 된 초안 참조)을 구현합니다. " – 0ax1
플래그를 제거하면 빌드 오류에 대해서는 아무 것도 바뀌지 않습니다. – 0ax1