Compiler = Visual Studio 2005 Express (VS8)
Angelsciprt Version = 2.15
I opened up the angelscript project for VS8, compiled it, copied the output library "angelscriptd.lib" to my project's directory, and added the library to my linker's dependency list.
Now when I include "angelscript.h" I get the following link errors:
1>Linking...
1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgheap.obj)
1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgheap.obj)
1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj)
1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)
1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _strtol already defined in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _strtoul already defined in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1> Creating library .\Debug/QuadsEngine.lib and object .\Debug/QuadsEngine.exp1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>.\Debug/QuadsEngine.exe : fatal error LNK1169: one or more multiply defined symbols found
Angelscript documentation provides the following nugget of wisdom:
Quote:
When compiling the static library you have to make sure that the correct compiler settings are used so that you don't get conflicts in linkage with the CRT functions. This happens if you for example compile the library with dynamically linked multi-threaded CRT and your application with statically linked single-threaded CRT.
Well, I see I'm getting CRT errors, but how do I figure out if my compiler settings are the same? I assume this is with respect to single-threaded/multi-threaded/multi-threaded DLL and Release/Debug. I think that they're both set to single-threaded debug, but I'm not sure how to check. And if something else is the problem, I really don't know what else to do.