我正在尝试通过 MinGW 构建 RecastNavigation,除了 RecastDemo 应用程序之外,一切似乎都构建得很好。
我弄完了:
cmake -G"MSYS Makefiles" -DSDL_INCLUDE_DIR:PATH=/c/_libdist/x86/msys/include/SDL \
-DSDL_LIBRARY:PATH=/c/_libdist/x86/msys/lib/libSDL.a \
-DSDLMAIN_LIBRARY:PATH=/c/_libdist/x86/msys/lib/libSDLMain.a ..
然后make VERBOSE=1在最后给我这个(删掉一堆未定义):
cd /C/_lib/blackberry/RecastNavigation/build.msys/RecastDemo && /C/app/MinGW/bin/g++.exe -O3 -DNDEBUG -mwindows -Wl,
--whole-archive CMakeFiles/RecastDemo.dir/objects.a -Wl,--no-whole-archive -o ../../RecastDemo/Bin/RecastDemo.exe -Wl,-
-out-implib,../../RecastDemo/Bin/libRecastDemo.dll.a -Wl,--major-image-version,0,--minor-image-version,0 ../DebugUtils/
libDebugUtils.a ../Detour/libDetour.a ../DetourCrowd/libDetourCrowd.a ../DetourTileCache/libDetourTileCache.a ../Recast/
libRecast.a /c/_libdist/x86/msys/lib/libSDL.a /c/_libdist/x86/msys/lib/libSDLMain.a -lglu32 -lopengl32 -lkernel32 -luser
32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
Creating library file: ../../RecastDemo/Bin/libRecastDemo.dll.a
c:/_libdist/x86/msys/lib/libSDL.a(SDL_systimer.o): In function `SDL_StartTicks':
c:\_lib\SDL\1.2.15/./src/timer/win32/SDL_systimer.c:67: undefined reference to `timeBeginPeriod@4'
c:\_lib\SDL\1.2.15/./src/timer/win32/SDL_systimer.c:68: undefined reference to `timeGetTime@0'
c:/_libdist/x86/msys/lib/libSDL.a(SDL_systimer.o): In function `SDL_GetTicks':
...
...
...
c:/app/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libmingw32.a(main.o): In function `main':
C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
make[2]: *** [../RecastDemo/Bin/RecastDemo.exe] Error 1
我不确定在哪里可以探索更多,因为图书馆的顺序似乎是正确的。我在这里想念什么?