Sign in to follow this  

Compiling in release mode in VC2005 C++ express

This topic is 4307 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

When I compile my game in debug mode it goes perfect but when I switch it to release mode I get the following errors.
------ Build started: Project: SuperPong, Configuration: Release Win32 ------
Compiling...
main.cpp
Linking...
main.obj : error LNK2019: unresolved external symbol _FSOUND_PlaySound@8 referenced in function "void __cdecl updateball(int)" (?updateball@@YAXH@Z)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Sample_Load@20 referenced in function "void __cdecl music(void)" (?music@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Stream_Open@16 referenced in function "void __cdecl music(void)" (?music@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_SetVolume@8 referenced in function "void __cdecl music(void)" (?music@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Init@12 referenced in function "void __cdecl music(void)" (?music@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Stream_Play@8 referenced in function "void __cdecl mainloop(void)" (?mainloop@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Close@0 referenced in function "void __cdecl _mangled_main(void)" (?_mangled_main@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Sample_Free@4 referenced in function "void __cdecl _mangled_main(void)" (?_mangled_main@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Stream_Close@4 referenced in function "void __cdecl _mangled_main(void)" (?_mangled_main@@YAXXZ)
main.obj : error LNK2019: unresolved external symbol _FSOUND_Stream_Stop@4 referenced in function "void __cdecl _mangled_main(void)" (?_mangled_main@@YAXXZ)
C:\Documents and Settings\Brian Davenport\My Documents\Visual Studio 2005\Projects\SuperPong\Release\SuperPong.exe : fatal error LNK1120: 10 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Brian Davenport\My Documents\Visual Studio 2005\Projects\SuperPong\Release\BuildLog.htm"
SuperPong - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I don't know what they mean. For a little info im using Allegro and Fmod in my game. Thanks in advance for any help.

Share this post


Link to post
Share on other sites
Yup your right I just figured it out even though in debug mode I had allegro and fmod linked. When I switched to release mode they were no longer linked. Thanks.


And one other question Im still new at this but im making the assumption that when I compiling it in release mode that is for when I want to release the game correct? And also how do i get one of those installer programs?

Share this post


Link to post
Share on other sites
Quote:
Original post by Breander
And one other question Im still new at this but im making the assumption that when I compiling it in release mode that is for when I want to release the game correct? And also how do i get one of those installer programs?


If I remember correctly, you are not allowed to distribute debug builds. Read the EULA for more Information ;) And yes, the release mode is for distribution.

Some free installers: Clicky

Share this post


Link to post
Share on other sites
to elaborate on release/debug builds a little more. Debug builds have extra info in them called debug symbols, its what lets your debugger show you the variables names(otherwise it could only know its memory address). Release executable therefore should be a bit smaller than debug versions, though this is often trivial. Also, debug versions link to libraries that also have debug symbols. This means that most peoples systems couldnt run debug builds because they lack the right libraries. If you look at a typical msvc programs link options, it will have msvcrtd.lib for debug(MS C Runtime library-debug) and msvcrt.lib for release. this is one of the reasons why msvc++ keeps the link setting seperate between builds.

Share this post


Link to post
Share on other sites

This topic is 4307 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.

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