Re: Problem where msvc-8.0 includes msvc-6.0 headers
On Tue, 17 Oct 2006 07:22:45 -0700, Carl Daniel [VC++ MVP] wrote:
Daniel Lidstr?m wrote:
This causes a compilation error. It seems the 8.0 compiler is
including headers for the 6.0 compiler:
How did you reach this conclusion? The most direct test for this is to
rename the directory containing VC6 #include files and see if the error goes
away. If you don't have VC6 installed (you didn't say whether you do), then
there simply are no VC6 header files for the compiler to erroneously include
and your problem lies elsewhere.
Well, the error was:
C:\Program Files\Microsoft Visual Studio\VC98\include\ocidl.h(4675) : error
C4430: missing type specifier - int assumed. Note: C++
does not support default-int
The search path clearly is into the VC6 include directory. I renamed the directory to see what happens, and now the error is this:
: bjam msvc-8.0
....found 8 targets...
....updating 2 targets...
compile-c-c++ bin\msvc-8.0\debug\main.obj
main.cpp
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\comdef.h(24) : fatal error C1083: Cannot open include file: 'ole2.h': No such file or directory
This error occurred in injected text:
#injected_line 2 "main.cpp"
#include <comdef.h>
I have removed the #include <msxml.h> line as well. ole2.h is part of the platform sdk, but msvc-8.0 is not searching there it seems. Here is my VCProjectEngine.Dll.Express.Config:
<?xml version="1.0" encoding="utf-8"?>
<VCPlatformConfigurationFile
Version="8.00"
>
<Platform
Name="VCProjectEngine.dll"
Identifier="Win32"
>
<Directories
Include="C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;$(VCInstallDir)include;$(VCInstallDir)PlatformSDK\include;$(FrameworkSDKDir)include"
Library="C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;$(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib"
Path="$(VCInstallDir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(PATH)"
Reference="$(FrameworkDir)$(FrameworkVersion)"
Source="$(VCInstallDir)crt\src"
/>
</Platform>
</VCPlatformConfigurationFile>
I have the platform sdk directories first in the include list. Why isn't the compiler searching there?
--
Daniel
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?