I'm trying to use Box2D lib with SDL lib. NOTE that I only get the errors below after I link in SDL too. I think i link everything accordingly but in the end when I write up some code i get errors like:
1>------ Build started: Project: box2d test2, Configuration: Debug Win32 ------
1> main.cpp
1>Box2D.lib(b2PolygonShape.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in main.obj
1>Box2D.lib(b2BlockAllocator.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in main.obj
1>Box2D.lib(b2Settings.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in main.obj
1>SDLmain.lib(SDL_win32_main.obj) : error LNK2005: _main already defined in main.obj
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol _SDL_main referenced in function _main
1>c:\users\deividas\documents\visual studio 2010\Projects\box2d test2\Debug\box2d test2.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
This only happens when I start using the lib, not when I only include it. For now I'm just using code like this:
#include <Box2D\Box2D.h>
int main() {
b2PolygonShape groundBox;
b2FixtureDef boxShapeDef;
boxShapeDef.shape = &groundBox;
boxShapeDef.density = 2.0f;
boxShapeDef.restitution = 0.5f;
return 0;
}
Taken from: http://www.dreamincode.net/forums/topic/261881-sdl-with-box2d/ .
I googled something but did not exactly understood what to do, help would be appreciated.