[ODE] HELP ME!!! Compiling Problem...

Ed Jones ed.jones at oracle.com
Wed Jan 14 12:32:48 MST 2004


Or alternatively;

In VC6, casting a floating point number to a long caused the compiler to 
generate a call to a hidden library function named _ftol. VC7 generates 
a call to _ftol2 (obviously the implementation of this function changed, 
so the name was changed to prevent version clashes). If your source code 
includes a cast from double to long types, VC7 will generate a call to 
_ftol2, and the following linker error will result:

*|error LNK2001: unresolved external symbol __ftol2|*

Resolve this error by placing the following in one of your .cpp files 
(StdAfx.cpp, for example):

#if (_MSC_VER >= 1300) && (WINVER < 0x0500)
//VC7 or later, building with pre-VC7 runtime libraries
extern "C" long _ftol( double ); //defined by VC6 C libs
extern "C" long _ftol2( double dblSource ) { return _ftol( dblSource ); }*|
#endif|*


Isn't Google great!



Alexandre Ribeiro de Sá wrote:

> AHOY!
>  
> I try to compile my game with ODE, but... PÃ!!!
>  
>  
> Compiling...
> main.cpp
> Linking...
>    Creating library Release/OGLEngine.lib and object Release/OGLEngine.exp
> LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other 
> libs; use /NODEFAULTLIB:library
> ode.lib(misc.obj) : error LNK2001: unresolved external symbol __ftol2
> ode.lib(space.obj) : error LNK2001: unresolved external symbol __ftol2
> Release/OGLEngine.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
>  
> OGLEngine.exe - 3 error(s), 1 warning(s)
>  
> What is it????
>  
>  
>  
> Thanks
> Alexandre Ribeiro de Sá
> alex_r at vortexentertainment.com <mailto:alex_r at vortexentertainment.com>
> http://www.vortexentertainment.com
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>  
>



More information about the ODE mailing list