2017-11-19 26 views
0

Windows 7 64 비트 시스템에서 glut32 라이브러리와 함께 cygwin을 새로 설치합니다. Eclipse IDE를 사용하여 C++로 테스트 프로그램을 작성하려고합니다. 표준 터미널 프로그램과 테스트 GLUT32 프로그램이 예상대로 빌드되고 실행됩니다. 내 테스트 프로그램의 릴리스 빌드에서 콘솔 창을 숨기려고합니다. Cygwin + Eclipse : 인식 할 수없는 에뮬레이션 모드 오류가 발생하지 않고 OpengGL 기반 프로그램에서 콘솔 창을 숨기는 방법은 무엇입니까?

나는 콘솔 창을 억제하기 위해 링커 단계에서 -mwindows 플래그를 사용하려고 시도하지만, 나는 다음과 같은 얻을 :
11:15:04 **** Incremental Build of configuration Release for project Test **** 
make all 
Building file: ../src/Test.cpp 
Invoking: Cygwin C++ Compiler 
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Test.d" -MT"src/Test.o" -o "src/Test.o" "../src/Test.cpp" 
Finished building: ../src/Test.cpp 

Building target: Test.exe 
Invoking: Cygwin C++ Linker 
g++ -L"C:\cygwin\lib" -Xlinker -mwindows -shared -o "Test.exe" ./src/Test.o -lglut32 -lglu32 -lopengl32 
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: unrecognised emulation mode: windows 
Supported emulations: i386pep i386pe 
collect2: error: ld returned 1 exit status 
make: *** [makefile:47: Test.exe] Error 1 

11:15:05 Build Finished (took 376ms) 

나는 지원되는 에뮬레이션 문이 힌트가 될 것 같아요. 어떻게 든 잘못된 컴파일러를 사용하고 있습니까? 백그라운드에서 콘솔 창이 열리지 않고 완성 된 프로그램을 빌드하려면 어떻게해야합니까?

답변

0

왜 설명 할 수 없지만 컴파일 단계에서 링크 단계와 반대되는 -mwindows 플래그를 사용하면 문제가 해결됩니다. 프로그램은 문제없이 빌드되며 콘솔없이 실행됩니다.