Stack Exchange
Building box2d testbed application in eclipse with MinGW
This post: How would I build Box2D to work in Code::Blocks/Mingw32(Windows) and this site: http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ have helped a lot in my attempts to build the Box2D testbed from source in eclipse using the MinGW GCC toolchain and the Gnu Make builder, but I'm still stuck with undefined reference errors in the link phase:
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 ****

anyway, my library path is relative (../PhysInvent/libs) and my referenced library list is in the following order:
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)

In the other question I linked above, Pwngulator states "AFAIK, there is no way to compile the Testbed using MinGW (you have to use Visual Studio, I believe)" which strikes me as odd, since the source is all present; shouldn't you be able to build it anywhere with anything provided you have the source code?  
Has anyone successfully built the Box2D testbed in eclipse using MinGW?  Can someone please offer insight into the linker errors above? 
thanks,
CCJ
