• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
HopeDagger

[SDL] Unable to link in Release mode?

13 posts in this topic

Quasi-misleading title, actually. [smile] I'm using VC++ Express 2005. When I set all of the proper SDL settings (as detailed on the SDL site) with RunTime Library set as "Multi-Threaded Debug DLL" it compiles, links, and runs without a hitch. However, when I set it to Release mode and set all of those settings again -- since VC++ doesn't maintain settings across build modes -- and set the RunTime Library to "Multi-Threaded DLL" (omitting the Debug, naturally) I get bonked with a slew of what appear to be STL errors:
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z) referenced in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
resource.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
main.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
resource.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
main.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
resource.obj : error LNK2019: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ) referenced in function "public: virtual __thiscall std::bad_alloc::~bad_alloc(void)" (??1bad_alloc@std@@UAE@XZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::exception::~exception(void)" (__imp_??1exception@std@@UAE@XZ) referenced in function "public: virtual __thiscall std::bad_alloc::~bad_alloc(void)" (??1bad_alloc@std@@UAE@XZ)
resource.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::exception::~exception(void)" (__imp_??1exception@std@@UAE@XZ)
main.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall std::bad_alloc::`scalar deleting destructor'(unsigned int)" (??_Gbad_alloc@std@@UAEPAXI@Z)
resource.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
resource.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
main.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
resource.obj : error LNK2001: unresolved external symbol ___security_cookie
main.obj : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z
resource.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler3
main.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function __ehhandler$??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z
resource.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
main.obj : error LNK2019: unresolved external symbol __imp___time64 referenced in function _time
main.obj : error LNK2019: unresolved external symbol __imp__rand referenced in function "bool __cdecl InitGame(void)" (?InitGame@@YA_NXZ)
main.obj : error LNK2019: unresolved external symbol __imp__srand referenced in function "bool __cdecl InitGame(void)" (?InitGame@@YA_NXZ)
main.obj : error LNK2001: unresolved external symbol __fltused
spriteengine.obj : error LNK2001: unresolved external symbol __fltused
main.obj : error LNK2019: unresolved external symbol __imp___invalid_parameter_noinfo referenced in function "public: bool __thiscall std::_Tree<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::const_iterator::operator==(class std::_Tree<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::const_iterator const &)const " (??8const_iterator@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@@std@@@2@$0A@@std@@@std@@QBE_NABV012@@Z)
resource.obj : error LNK2001: unresolved external symbol __imp___invalid_parameter_noinfo
main.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function "struct std::_Tree_nod<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::_Node * __cdecl std::_Allocate<struct std::_Tree_nod<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::_Node>(unsigned int,struct std::_Tree_nod<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::_Node *)" (??$_Allocate@U_Node@?$_Tree_nod@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@@std@@@2@$0A@@std@@@std@@@std@@YAPAU_Node@?$_Tree_nod@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@@std@@@2@$0A@@std@@@0@IPAU120@@Z)
resource.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
msvcprt.lib(newaop_s.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
main.obj : error LNK2019: unresolved external symbol __CxxThrowException@8 referenced in function "struct std::_Tree_nod<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::_Node * __cdecl std::_Allocate<struct std::_Tree_nod<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::_Node>(unsigned int,struct std::_Tree_nod<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct Texture,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,struct Texture> >,0> >::_Node *)" (??$_Allocate@U_Node@?$_Tree_nod@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@@std@@@2@$0A@@std@@@std@@@std@@YAPAU_Node@?$_Tree_nod@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UTexture@@@std@@@2@$0A@@std@@@0@IPAU120@@Z)
resource.obj : error LNK2001: unresolved external symbol __CxxThrowException@8
main.obj : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
resource.obj : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(class std::exception const &)" (__imp_??0exception@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::bad_alloc::bad_alloc(class std::bad_alloc const &)" (??0bad_alloc@std@@QAE@ABV01@@Z)
resource.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(class std::exception const &)" (__imp_??0exception@std@@QAE@ABV01@@Z)
main.obj : error LNK2019: unresolved external symbol __ftol2_sse referenced in function "void __cdecl DrawGame(void)" (?DrawGame@@YAXXZ)
resource.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "void __cdecl CreateTexture(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,unsigned char,unsigned char,unsigned char,unsigned short,unsigned short,unsigned char *)" (?CreateTexture@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_NEEEGGPAE@Z)
resource.obj : error LNK2019: unresolved external symbol _atexit referenced in function "void __cdecl `dynamic initializer for 'gTextures''(void)" (??__EgTextures@@YAXXZ)
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
LINK : error LNK2001: unresolved external symbol __load_config_used

I'm baffled. How can I build my SDL app for distribution without being in Debug mode? Any help is greatly appreciated!
0

Share this post


Link to post
Share on other sites
Have you also added sdl.lib and sdlmain.lib to the "additional dependancies" for the release mode?
I removed those from my program and got the same errors.
0

Share this post


Link to post
Share on other sites
All of the dependencies are included. If I remove "sdl.lib" and "sdlmain.lib" I get 7 additional linker errors. But I definitely have identical compiler/linker settings in both Debug and Release modes aside from the "Multi-Threaded Debug DLL" and "Multi-Threaded DLL" difference.

Thanks for your response, though. Any other ideas are appreciated. [smile]
0

Share this post


Link to post
Share on other sites
I had a problem like this once. What happened was I was using a static library, that I wrote, that itself used SDL. It was using only the Multi-Threaded Debug DLL run time. I had to go into its settings to switch it to Multi-Threaded DLL for Release mode.

Are you doing anything like that?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Simian Man
I had a problem like this once. What happened was I was using a static library, that I wrote, that itself used SDL. It was using only the Multi-Threaded Debug DLL run time. I had to go into its settings to switch it to Multi-Threaded DLL for Release mode.

Are you doing anything like that?


No, I'm not. I'm using the SDL binaries I acquired straight from the libsdl website. The effort is appreciated, though. [smile]
0

Share this post


Link to post
Share on other sites
Are you linking with /SUBSYSTEM:CONSOLE or /SUBSYSTEM:WINDOWS? Try building with console if you haven't already.

(Project Settings > Linker > System > Subsystem).

I've had lots of problems when trying to build with any system other than console. Most of said problems result from conflicts with the default libraries, and seem to kind of look like the ones you're getting. If you've ignored a specific library, also make sure to ignore its release-mode counterpart.
0

Share this post


Link to post
Share on other sites
Hey, thanks for the reply Mushu.

I gave 'console' a shot, and produced the same errors that I had.

I'm having the same sort of problem (switching to from debug dll to multi-threaded dll), though I'm producing different errors.

Linking...
SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol __imp__strncpy
SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol __imp__strrchr
SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol __imp__fprintf
SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol __imp__remove
SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol __imp__setbuf
SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol __imp__freopen
SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol __imp___getcwd
0

Share this post


Link to post
Share on other sites
I followed your suggestions Mushu, and it has also been to no avail. Appreciated, however.

What I want to know is, how is everyone else distributing their non-debug SDL apps? [smile] There must be some quasi-obvious step that I/we've missed.

@ildave1: Are you using VC++ 2005 Express as well?
0

Share this post


Link to post
Share on other sites
Heya HopeDagger. I attempted to add your MSN to one on one with you a bit, but had no luck.

I'm using VS2005 Academic Edition. I finally got my /MD to run against the problem that I had.

I removed 'msvcrt.lib' from my Ignore Specific Library list (under the release options).
0

Share this post


Link to post
Share on other sites
Quote:
Original post by ildave1
I removed 'msvcrt.lib' from my Ignore Specific Library list (under the release options).


Fantastic, that did the trick. Thanks! (++)
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0