Visual Studio 2005 C++ Express
//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]
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
#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.cppLinking...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@ZC:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Retribution\Debug\Z_Engine.exe : fatal error LNK1120: 1 unresolved externals
Hmm, seems like you forgot to do an extra step. Did you also do this?:
Also: This part:
should instead be:
xeddiex
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
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.
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.
I'm sorry but, WinMain has a body. That makes it a function, not a function prototype. Or am I wrong here?
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!";}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement