0
私が見つけた古いAIプロジェクトをコンパイルしようとしていますhere。私はNetbeans 7.1を使用しています。すべてのNetbeansサンプルプロジェクトをコンパイルできるので、cygwinと適切なパッケージをインストールしました。私は「スイーパー」という名前のプロジェクトにすべてのファイルを入れていると私はそれを構築しようとすると、私はこの出力を得る:NetbeansでC++プロジェクトをビルドし、未定義の参照エラーがたくさんある(GDIとリンクする必要があります)
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/sweepers.exe
make[2]: Entering directory `/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers'
mkdir -p dist/Debug/Cygwin-Windows
g++.exe -o dist/Debug/Cygwin-Windows/sweepers build/Debug/Cygwin-Windows/_ext/1369961084/CMinesweeper.o build/Debug/Cygwin-Windows/_ext/1369961084/utils.o build/Debug/Cygwin-Windows/_ext/1369961084/C2DMatrix.o build/Debug/Cygwin-Windows/_ext/1369961084/CNeuralNet.o build/Debug/Cygwin-Windows/_ext/1369961084/main.o build/Debug/Cygwin-Windows/_ext/1369961084/CTimer.o build/Debug/Cygwin-Windows/_ext/1369961084/CGenAlg.o build/Debug/Cygwin-Windows/_ext/1369961084/CParams.o build/Debug/Cygwin-Windows/_ext/1369961084/CController.o -L/cygdrive/C/cygwin/lib -L/cygdrive/C/cygwin/lib/w32api
build/Debug/Cygwin-Windows/_ext/1369961084/main.o: In function `_Z10WindowProcP6HWND__jjl':
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:76: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:80: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:85: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:136: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:140: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:145: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:157: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:171: undefined reference to `[email protected]'
make[2]: Leaving directory `/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:180: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:183: undefined reference to `[email protected]'
make[1]: Leaving directory `/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/main.cpp:184: undefined reference to `[email protected]'
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o: In function `_ZN11CControllerC2EP6HWND__':
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:82: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:83: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:84: undefined reference to `[email protected]'
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o: In function `_ZN11CControllerC1EP6HWND__':
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:82: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:83: undefined reference to `[email protected]'
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o:/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:84: more undefined references to `[email protected]' follow
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o: In function `_ZN11CControllerD2Ev':
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:112: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:113: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:114: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:115: undefined reference to `[email protected]'
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o: In function `_ZN11CControllerD1Ev':
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:112: undefined reference to `[email protected]'
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o:/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:113: more undefined references to `[email protected]' follow
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o: In function `_ZN11CController6RenderEP5HDC__':
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:225: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:231: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:242: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:246: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:249: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:254: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:261: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:271: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:275: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:278: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:281: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:285: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:288: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:290: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:291: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:293: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:297: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:303: undefined reference to `[email protected]'
build/Debug/Cygwin-Windows/_ext/1369961084/CController.o: In function `_ZN11CController9PlotStatsEP5HDC__':
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:321: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:324: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:333: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:335: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:339: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:347: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:349: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:353: undefined reference to `[email protected]'
/cygdrive/f/Users/Jonathon/Documents/NetBeansProjects/sweepers/../../../Desktop/sweepers/CController.cpp:359: undefined reference to `[email protected]'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/Cygwin-Windows/sweepers.exe] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
私はこれらのエラーをグーグルでてきたと私は1つが欠けています結論を出しますまたはこれ以上のライブラリが含まれている(これはちょっと推測ですが、MacでxCode以外のC++やC言語をコンパイルするのは初めてです)
私がここで間違っていることを知っている人はいますか?非常にシンプルな気がしますが、重要な情報が欠落しています。
ありがとうございます。
ご確認いただきありがとうございます。私は長い間、誰かがgdi32やそれに類するものを含めて推奨していたフォーラムをいくつか見つけましたが、これらのものを手に入れる方法はわかりません... – BumbleShrimp
@JonathonG:リンカコマンドに '-lgdi32'を追加してください。 –
@KerrekSB私はそれがどういう意味なのか分かりません...プロジェクトを右クリックしてリンカーに行きましょう。 – BumbleShrimp