Sign in to follow this  
Ebola0001

why is VC++ Express complaining this much?

Recommended Posts

Ok so I have CPP Builder 6 on my desktop, but am out on the road for a bit, and wanted to continue working on my code. So I downloaded VC++ Express, and here is what VC++ is whining about 1>File1.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z) 1>File1.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z) 1>File1.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ) referenced in function "private: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z) 1>File1.obj : error LNK2019: unresolved external symbol __imp__SetRect@20 referenced in function "void __cdecl render_frame(void)" (?render_frame@@YAXXZ) 1>File1.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__PostMessageA@16 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExA@4 referenced in function _WinMain@16 1>File1.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function _WinMain@16 I don't recognize any of these things... I must be missing something basic, but after a day of head scratching... i don't know what it is. my second problem is that i can no longer include things without the .h extension. example: #include <stdio> (which works in CPP builder) isn't accepted, it sais it cannot find file "stdio" :( is it this annoying because its free... or am I doing something wrong?

Share this post


Link to post
Share on other sites
First off, the header you're looking for HAS to have a .h extension; if you don't want to use the version with the extension, use #include <cstdio> instead.

Secondly, the errors you posted indicate that you are not linking with the Platform SDK, which doesn't come with VC++ express. You will need to download it from the Microsoft website and install it. It SHOULD set the paths automatically upon installation, but eh, sometimes things screw up. In any case, get the Platform SDK downloaded and installed, and try compiling again.

Also, from the looks of things, you might not be linking with some of the standard C++ libraries either (that's where the std::string error is coming from). Check your project's linker options before you do anything.

Share this post


Link to post
Share on other sites
ok that took care of the .h thing, I don't know what changed...

I guess my next question is how do I get it to link to the platform sdk, I downloaded it and updated the include and lib directories per this instruction on the website

microsoft how to

Share this post


Link to post
Share on other sites
For some reason, Microsoft disabled the compilation of Win32 applications by default with VC++ Express, but they detail how to remove that limitation on their website here.

Happy coding! :)

Edit: To link to it, include <windows.h> ;P

Share this post


Link to post
Share on other sites
:?
including windows.h is the first file that i include in my project.

and doesn't the link you posted look suspisciously like the same one i posted that I followed so far.?

its like a library isn't being included but i don't know why it wouldn't work in vc++?

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