Old "statndard C++" in VC++ Express  
Author Message
rowck001





PostPosted: Visual C++ Express Edition, Old "statndard C++" in VC++ Express Top

This may sound silly - but I have successfully built CLR .NET Apps and with the Platform SDK some win32 native apps using VC++ express 2005 with ease! .

But how can I use some old C++ code of form:

#include <iostream>
using namespace std;

int main(){
cout << "whatever xxx......" << endl;
return 0;
}

making an empty project and adding file(s) containing straight C++ code like the above, results in 48++ link errors.
Obviously I am missing something basic here!


Visual Studio Express Editions12  
 
 
nobugz





PostPosted: Visual C++ Express Edition, Old "statndard C++" in VC++ Express Top

It would help if you post the linker errors.


 
 
rowck001





PostPosted: Visual C++ Express Edition, Old "statndard C++" in VC++ Express Top

------ Build started: Project: stdclibs, Configuration: Release Win32 ------
Linking...




















LINK : error LNK2001: unresolved external symbol _mainCRTStartup
LINK : error LNK2001: unresolved external symbol __load_config_used
C:\Documents and Settings\Craig Rowlands\My Documents\Visual Studio 2005\Projects\stdclibs\Release\stdclibs.exe : fatal error LNK1120: 22 unresolved externals


 
 
nobugz





PostPosted: Visual C++ Express Edition, Old "statndard C++" in VC++ Express Top

You're not linking the STL runtime library (msvcprt.lib or libcpmt.lib in the Release build). I'm not sure how you did that...


 
 
lomo74





PostPosted: Visual C++ Express Edition, Old "statndard C++" in VC++ Express Top

Sorry if I re-open this topic, but I have similar problems and I was wondering if someone can help.
I have platform SDK's include and lib directories on top of VC++ 2005 Express search paths.
Platform SDK is Server 2003 R2.
Well, the linker complains about symbols missing:



The code is straightforward, simply a cout << "hello world";.
I'm *sure* the problem is that libcpmt.lib is missing from Platform SDK: thus, the compiler is using SDK's header files, but the linker is linking against older .lib files, hence the error.
Am I wrong
Someone knows why Microsoft did not include libcpmt.lib in Platform SDK
Where can I find it