Jump to content
  • Advertisement
Sign in to follow this  
zlatko_bre_1985

Visual Studio 2005 C++ Express

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

//EDITED (DELETED) TO REMOVE UNNEDDED INFORMATION I have just downloaded VS 2005 E. I have set various inc and lib directories but still i have problem.Read the next post. Thx [Edited by - zlatko_bre_1985 on November 21, 2005 10:56:12 AM]

Share this post


Link to post
Share on other sites
Advertisement
I have simplified the problem to the :

#include <Windows.h>
#include <string>
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT )
{
std::wstring aaa;
aaa = L"agdf";
};

and compiler gives this


Compiling...
Main.cpp
Linking...
Main.obj : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$?_Copy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXII@Z
C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Retribution\Debug\Z_Engine.exe : fatal error LNK1120: 1 unresolved externals

Share this post


Link to post
Share on other sites
Hmm, seems like you forgot to do an extra step. Did you also do this?:

Quote:

::link::
Update the corewin_express.vsprops file.

One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib" to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"


Also: This part:

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT )


should instead be:

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR szCmdLine, INT iCmdShow )
... no?

xeddiex

Share this post


Link to post
Share on other sites
While I don't have VC 2005 express installed, I can tell you that this error is a result of you using a function which requires exception handling enabled and the appropriate libraries linked in.

Check the project properties and turn on exception handling if possible, and ensure that you're linking against the msvcrt runtime library somewhere along the way.

Ignore the WinMain thing, the prototype is still correct.

Jans.

Share this post


Link to post
Share on other sites
Quote:
Original post by xeddiex
I'm sorry but, WinMain has a body. That makes it a function, not a function prototype. Or am I wrong here?


He isn't specifying a prototype. You don't have to provide variable names for parameters if you're not going to use them. Hell, he could have done this:

INT WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, INT)
{
std::cout << "Witness my 1337 unnamed parameters!";
}

Share this post


Link to post
Share on other sites
I am currently off home (obtaining driver license :) ) so i cannot check what have you said xeddiex but ill post is it working. But i think it should work cause i didnt do that step . :)

Thx everyone!!!!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!