Jump to content
  • Advertisement
Sign in to follow this  
polaris2013

Need help getting started

This topic is 3606 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I'm currently experiencing the same problems with incorporating the AngelScript library into my MFC based project (SDI application, statically linked with MFC, using VC6).

Any advice would be very much appreciated, thanks! Meanwhile I'll try to find out on my own how to link the lib in order to fit with my application.

[Edited by - Friggle on December 29, 2008 8:32:21 AM]

Share this post


Link to post
Share on other sites
Hi polaris2013,

just managed to get the lib compiled and linked to match my MFC app (VC6) both for debug and release. Mainly had to do with the runtime library selection. Additionally the release build didn't compile at all, I had to copy the configuration from the debug build again and adjust it for release.

Let me know if you need the details.

Share this post


Link to post
Share on other sites
Oh, well I solved it but since somebody else was wondering about the answer I'll go ahead and say what fixed it. There was a setting under

Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation

that I had to change. Turns out multi-threaded debug was the way to go instead of single-threaded debug. Anyway, that was obviously not an obvious place to hide that setting so I hope this helps someone.

Share this post


Link to post
Share on other sites
Thanks for giving the solution for this problem while I was away. I'll try to explain this better in the manual. And also fix the release build for the library.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!