When I try to compile the "chicago" app.cpp with MinGW, I get the following errors:
Code:
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x163): undefined
reference to `_imp__h3dInit'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x171): undefined
reference to `_imp__h3dutDumpMessages'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x18f): undefined
reference to `_imp__h3dSetOption'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x1a6): undefined
reference to `_imp__h3dSetOption'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x1bd): undefined
reference to `_imp__h3dSetOption'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x1d4): undefined
reference to `_imp__h3dSetOption'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x1eb): undefined
reference to `_imp__h3dSetOption'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x209): undefined
reference to `_imp__h3dAddResource'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x232): undefined
reference to `_imp__h3dAddResource'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x25b): undefined
reference to `_imp__h3dAddResource'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x284): undefined
reference to `_imp__h3dAddResource'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x2ad): undefined
reference to `_imp__h3dAddResource'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x2d6): more undef
ined references to `_imp__h3dAddResource' follow
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x335): undefined
reference to `_imp__h3dutLoadResourcesFromDisk'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x358): undefined
reference to `_imp__h3dAddCameraNode'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x378): undefined
reference to `_imp__h3dAddNodes'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x3d9): undefined
reference to `_imp__h3dSetNodeTransform'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x3ee): undefined
reference to `_imp__h3dAddNodes'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x44f): undefined
reference to `_imp__h3dSetNodeTransform'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x46c): undefined
reference to `_imp__h3dSetNodeFlags'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x499): undefined
reference to `_imp__h3dAddLightNode'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x4fa): undefined
reference to `_imp__h3dSetNodeTransform'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x520): undefined
reference to `_imp__h3dSetNodeParamF'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x546): undefined
reference to `_imp__h3dSetNodeParamF'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x563): undefined
reference to `_imp__h3dSetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x589): undefined
reference to `_imp__h3dSetNodeParamF'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x5af): undefined
reference to `_imp__h3dSetNodeParamF'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x5d5): undefined
reference to `_imp__h3dSetNodeParamF'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x5fb): undefined
reference to `_imp__h3dSetNodeParamF'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x621): undefined
reference to `_imp__h3dSetNodeParamF'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x65f): undefined
reference to `CrowdSim::init()'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x6bd): undefined
reference to `_imp__h3dSetOption'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x6e8): undefined
reference to `_imp__h3dSetOption'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x715): undefined
reference to `CrowdSim::update(float)'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x791): undefined
reference to `_imp__h3dSetNodeTransform'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x7be): undefined
reference to `_imp__h3dutShowFrameStats'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x7ea): undefined
reference to `_imp__h3dGetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x84f): undefined
reference to `_imp__h3dutShowText'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x8a2): undefined
reference to `_imp__h3dutShowText'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x8bd): undefined
reference to `_imp__h3dGetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x8e1): undefined
reference to `_imp__h3dGetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x9b3): undefined
reference to `_imp__h3dShowOverlays'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x9c6): undefined
reference to `_imp__h3dRender'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x9cd): undefined
reference to `_imp__h3dFinalizeFrame'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x9d4): undefined
reference to `_imp__h3dClearOverlays'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0x9db): undefined
reference to `_imp__h3dutDumpMessages'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xa1e): undefined
reference to `_imp__h3dRelease'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xa4d): undefined
reference to `_imp__h3dSetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xa70): undefined
reference to `_imp__h3dSetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xa92): undefined
reference to `_imp__h3dSetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xab4): undefined
reference to `_imp__h3dSetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xaee): undefined
reference to `_imp__h3dSetupCameraView'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xb0f): undefined
reference to `_imp__h3dResizePipelineBuffers'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xb30): undefined
reference to `_imp__h3dResizePipelineBuffers'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xbc7): undefined
reference to `_imp__h3dGetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xc03): undefined
reference to `_imp__h3dSetNodeParamI'
C:\Users\Mikolaj\AppData\Local\Temp\ccrPRLFd.o:app.cpp:(.text+0xc2d): undefined
reference to `_imp__h3dSetNodeParamI'
c:/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 `WinMai
n@16'
collect2: ld returned 1 exit status
The command I use to compile this is:
Code:
g++ -o app.exe app.cpp
I put Horde3D.h and Horde3DUtils.h into the folder with the rest of the code of "chicago".
This error is, as far as I'm concerned, caused by not including some linker flags and/or not putting some files into the correct directory, please correct me if I'm wrong.