| Article: |
Intro to Managed C++, Part 2: Mixing Managed and Unmanaged Code | |
| Subject: | Error with example | |
| Date: | 2003-03-05 19:14:50 | |
| From: | anonymous2 | |
|
I get the following error when I try to compile the example with mixed managed & unmanaged code.
|
||
Showing messages 1 through 3 of 3.
-
Error with example
2003-05-09 12:08:35 anonymous2 [View]
I ran into the same problem. I think what may be the case is that the SDK has these header files missing, where as the Visual Studio environments do not. That is a shame. -
Sam - Not shipped with .NET
2003-05-09 12:16:44 anonymous2 [View]
As I answered him in email, those header files like string and such are normal, ordinary C++ header files that have nothing to do wth .NET. Of course, they would not ship with a *free* .NET SDK. They ship with a pay C++ compiler as expected.
That is teh point of the sample - to combine ordinary unmanaged C++ you have before .NET came around with managed code.
--Sam Gentile
-
No error
2003-03-07 13:07:11 samgentile [View]
This is no error with the sample. I just re-compilled to make sure:
----- Rebuild All started: Project: Mixed2, Configuration: Debug Win32 ------
Deleting intermediate files and output files for project 'Mixed2', configuration 'Debug|Win32'.
Compiling...
Mixed2.cpp
AssemblyInfo.cpp
Generating Code...
Compiling resources...
Linking...
Build log was saved at "file://c:\Documents and Settings\Sam Gentile\My Documents\ORielly\Mixed2\Debug\BuildLog.htm"
Mixed2 - 0 error(s), 0 warning(s)
---------------------- Done ----------------------
Rebuild All: 1 succeeded, 0 failed, 0 skipped
String is the C++ Standard version of the String class as opposed to <string.h> which is the "old version. You either have something wrong with the way your VS.NET C++ directories are set up or its something with V1 of VS.NET. I am using VS.NET 2003 (Everett). I can see if I can did up an old copy of V1 but it should work the same way.
It's there for me:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include
I just checked and it's there in VS.NET 1.0 too. You need to set up your directories correctly:
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include


