Hi all,
Have not done much coding at all lately so I'm being a bit of a n00b trying to get started with ODE. I'm using MS Visual Studio 2005 and ODE 0.9 with this very simple code to get started (actually there's quite a bit more but I've commented out everything but the stuff below to isolate the probs I'm having with ODE):
#include <windows.h>
#include <ode/ode.h>
extern int WINAPI WinMain(HINSTANCE hThisInst,HINSTANCE hPrevInst,LPSTR lpszArgs,int nWinMode){
// Start up
dInitODE();
// Do something here
// Shut down
dCloseODE();
return 0;
}
But, when the linker runs, I'm getting funky messages:
Error 1 error LNK2005: _malloc already defined in MSVCRTD.lib
(MSVCR80D.dll) LIBCMTD.lib
Error 2 error LNK2005: _realloc already defined in MSVCRTD.lib
(MSVCR80D.dll) LIBCMTD.lib
...{3-31 are all similar redefinition errors}
Warning 32 warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of
other libs; use /NODEFAULTLIB:library VTT
Warning 33 warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of
other libs; use /NODEFAULTLIB:library VTT
Error 34 error LNK2019: unresolved external symbol "public: void
__thiscall std::_String_base::_Xran(void)const " (?
_Xran@_String_base@std@@QBEXXZ) referenced in function "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::assign
(class std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?
$basic_string@DU?$char_traits@D@std@@V?
$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) ode.lib
Error 35 error LNK2019: unresolved external symbol "public: void
__thiscall std::_String_base::_Xlen(void)const " (?
_Xlen@_String_base@std@@QBEXXZ) referenced in function "protected: bool
__thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?
$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z) ode.lib
Error 36 error LNK2019: unresolved external symbol _main referenced in
function ___tmainCRTStartup LIBCMTD.lib
Error 37 fatal error LNK1120: 3 unresolved externals
C:\Users\Michael\Documents\Visual Studio 2005\Projects\VTT\Debug\VTT.ex
So, in {project} Property Pages -> Configuration Properties -> Linker -> Additional Dependencies, I have added 'ode/debuglib/ode.lib'.
Sorry if I'm missing something very, very obvious. There are an awful lot of buttons in MSVC and I'm sort of lost because it has been quite a while since I have used this tool. Thanks for any help!
M
[edit]Ehhh. Also sorry about the width thing...I figured the code box would be fixed width. I will try to put in some linebreaks.[/edit]
[Edited by - mearrin69 on October 14, 2007 7:01:49 PM]