Сборка испытательного стенда box2d в затмении с MinGW - PullRequest
1 голос
/ 12 января 2012

Этот пост: Как мне собрать Box2D для работы в Code :: Blocks / Mingw32 (Windows) и этот сайт: http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ очень помогли в моих попытках собрать Box2Dиспытательный стенд из источника в затмении с использованием набора инструментов MinGW GCC и компоновщика Gnu Make, но я все еще застрял с неопределенными ошибками ссылок в фазе соединения:

make all 
Building target: PhysInvent.exe
Invoking: MinGW C++ Linker
g++ -L../../PhysInvent/libs -o "PhysInvent.exe"  ./include/glui/algebra3.o ./include 
/glui/arcball.o ./include/glui/glui.o ./include/glui/glui_add_controls.o ./include
/glui/glui_bitmap_img_data.o ./include/glui/glui_bitmaps.o ./include 
/glui/glui_button.o 
./include/glui/glui_checkbox.o ./include/glui/glui_column.o ./include
/glui/glui_commandline.o ./include/glui/glui_control.o ./include/glui/glui_edittext.o 
./include/glui/glui_filebrowser.o ./include/glui/glui_list.o ./include
/glui/glui_listbox.o ./include/glui/glui_mouse_iaction.o ./include/glui/glui_node.o 
./include/glui/glui_panel.o ./include/glui/glui_radio.o ./include/glui/glui_rollout.o 
./include/glui/glui_rotation.o ./include/glui/glui_scrollbar.o ./include
/glui/glui_separator.o ./include/glui/glui_spinner.o ./include/glui/glui_statictext.o 
./include/glui/glui_string.o ./include/glui/glui_textbox.o ./include
/glui/glui_translation.o ./include/glui/glui_tree.o ./include/glui/glui_treepanel.o 
./include/glui/glui_window.o ./include/glui/quaternion.o  ./include/freeglut
/freeglut_callbacks.o ./include/freeglut/freeglut_cursor.o ./include/freeglut
/freeglut_display.o ./include/freeglut/freeglut_ext.o ./include/freeglut
/freeglut_font.o ./include/freeglut/freeglut_font_data.o ./include/freeglut
/freeglut_gamemode.o ./include/freeglut/freeglut_geometry.o ./include/freeglut
/freeglut_glutfont_definitions.o ./include/freeglut/freeglut_init.o ./include/freeglut
/freeglut_input_devices.o ./include/freeglut/freeglut_joystick.o ./include/freeglut
/freeglut_main.o ./include/freeglut/freeglut_menu.o ./include/freeglut/freeglut_misc.o 
./include/freeglut/freeglut_overlay.o ./include/freeglut/freeglut_spaceball.o ./include
/freeglut/freeglut_state.o ./include/freeglut/freeglut_stroke_mono_roman.o ./include
/freeglut/freeglut_stroke_roman.o ./include/freeglut/freeglut_structure.o ./include
/freeglut/freeglut_teapot.o ./include/freeglut/freeglut_videoresize.o ./include
/freeglut/freeglut_window.o  ./include/Box2D/Rope/b2Rope.o  ./include/Box2D/Dynamics
/Joints/b2DistanceJoint.o ./include/Box2D/Dynamics/Joints/b2FrictionJoint.o ./include
/Box2D/Dynamics/Joints/b2GearJoint.o ./include/Box2D/Dynamics/Joints/b2Joint.o 
./include/Box2D/Dynamics/Joints/b2MouseJoint.o ./include/Box2D/Dynamics/Joints
/b2PrismaticJoint.o ./include/Box2D/Dynamics/Joints/b2PulleyJoint.o ./include/Box2D
/Dynamics/Joints/b2RevoluteJoint.o ./include/Box2D/Dynamics/Joints/b2RopeJoint.o 
./include/Box2D/Dynamics/Joints/b2WeldJoint.o ./include/Box2D/Dynamics/Joints
/b2WheelJoint.o  ./include/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.o ./include
/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.o ./include/Box2D/Dynamics/Contacts
/b2CircleContact.o ./include/Box2D/Dynamics/Contacts/b2Contact.o ./include/Box2D
/Dynamics/Contacts/b2ContactSolver.o ./include/Box2D/Dynamics/Contacts
/b2EdgeAndCircleContact.o ./include/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.o 
./include/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.o ./include/Box2D/Dynamics
/Contacts/b2PolygonContact.o  ./include/Box2D/Dynamics/b2Body.o ./include/Box2D
/Dynamics/b2ContactManager.o ./include/Box2D/Dynamics/b2Fixture.o ./include/Box2D
/Dynamics/b2Island.o ./include/Box2D/Dynamics/b2World.o ./include/Box2D/Dynamics
/b2WorldCallbacks.o  ./include/Box2D/Common/b2BlockAllocator.o ./include/Box2D/Common
/b2Draw.o ./include/Box2D/Common/b2Math.o ./include/Box2D/Common/b2Settings.o ./include
/Box2D/Common/b2StackAllocator.o ./include/Box2D/Common/b2Timer.o  ./include/Box2D
/Collision/Shapes/b2ChainShape.o ./include/Box2D/Collision/Shapes/b2CircleShape.o 
./include/Box2D/Collision/Shapes/b2EdgeShape.o ./include/Box2D/Collision/Shapes
/b2PolygonShape.o  ./include/Box2D/Collision/b2BroadPhase.o ./include/Box2D/Collision
/b2CollideCircle.o ./include/Box2D/Collision/b2CollideEdge.o ./include/Box2D/Collision
/b2CollidePolygon.o ./include/Box2D/Collision/b2Collision.o ./include/Box2D/Collision
/b2Distance.o ./include/Box2D/Collision/b2DynamicTree.o ./include/Box2D/Collision
/b2TimeOfImpact.o  ./Tests/TestEntries.o  ./Framework/Main.o ./Framework/Render.o 
./Framework/Test.o  ./Box2dInventMain.o   -lBox2D -lfreeglut -lglui -lglu32 -lopengl32
./include/freeglut/freeglut_display.o:freeglut_display.c:(.text+0xa3): undefined 
reference to `SwapBuffers@4'
./include/freeglut/freeglut_init.o:freeglut_init.c:(.text+0x212): undefined reference 
to `timeEndPeriod@4'
./include/freeglut/freeglut_init.o:freeglut_init.c:(.text+0x437): undefined reference 
to `GetDeviceCaps@8'
./include/freeglut/freeglut_init.o:freeglut_init.c:(.text+0x44f): undefined reference 
to `GetDeviceCaps@8'
./include/freeglut/freeglut_init.o:freeglut_init.c:(.text+0x472): undefined reference 
to `timeBeginPeriod@4'
 ./include/freeglut/freeglut_joystick.o:freeglut_joystick.c:(.text+0x222): undefined 
reference to `joyGetDevCapsA@12'
./include/freeglut/freeglut_joystick.o:freeglut_joystick.c:(.text+0x78a): undefined 
reference to `joyGetPosEx@8'
./include/freeglut/freeglut_main.o:freeglut_main.c:(.text+0xcf): undefined reference 
to `timeGetTime@0'
./include/freeglut/freeglut_main.o:freeglut_main.c:(.text+0x127): undefined reference 
to `timeGetTime@0'
./include/freeglut/freeglut_main.o:freeglut_main.c:(.text+0x2d7): undefined reference 
to `timeGetTime@0'
./include/freeglut/freeglut_main.o:freeglut_main.c:(.text+0x4ec): undefined reference 
to `timeGetTime@0'
./include/freeglut/freeglut_main.o:freeglut_main.c:(.text+0x11c): undefined reference 
to `timeGetTime@0'
./include/freeglut/freeglut_state.o:freeglut_state.c:(.text+0x690): undefined 
reference to `GetPixelFormat@4'
./include/freeglut/freeglut_window.o:freeglut_window.c:(.text+0x303): undefined 
reference to `GetDeviceCaps@8'
./include/freeglut/freeglut_window.o:freeglut_window.c:(.text+0x31b): undefined 
reference to `ChoosePixelFormat@8'
./include/freeglut/freeglut_window.o:freeglut_window.c:(.text+0x432): undefined 
reference to `SetPixelFormat@12'
./include/freeglut/freeglut_window.o:freeglut_window.c:(.text+0x6b6): undefined 
reference to `SetPixelFormat@12'
collect2: ld returned 1 exit status
make: *** [PhysInvent.exe] Error 1

**** Build Finished ****

в любом случае, мой путь к библиотеке относительный (../ PhysInvent / libs) и мой список библиотек, на которые есть ссылки, находится в следующем порядке:

Box2D (from libBox2D.a)
freeglut (from freeglut.dll which uses import library libfreeglut.a)
glui (from libglui.a)
glu32 (from the Windows system libs)
opengl32 (from the Windows system libs)

В другом связанном выше вопросе Pwngulator утверждает: «AFAIK, нет способа скомпилировать Testbed с использованием MinGW (выя должен использовать Visual Studio, я считаю) ", что кажется мне странным, так как источник все присутствует;разве вы не сможете построить его где-нибудь, если у вас есть исходный код?

Кто-нибудь успешно построил испытательный стенд Box2D в затмении, используя MinGW?Может кто-нибудь предложить понимание ошибок компоновщика выше?

спасибо, CCJ

...