You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Ben Heavner <bh...@gmail.com> on 2009/10/01 20:43:01 UTC

Failed attempt to build Xerces 2.8.0 with MSVC++ Express 2008

Hello,

I'm not sure if this is the best forum to direct this question to -
please let me know if there is a better place to ask.

I'm fairly inexperienced with Microsoft development tools, but am
attempting to build Xerces 2.8.0 with Microsoft Visual C++ Express
2008 and the Windows SDK for Windows Server 2008 and .NET Framework
3.5 on a Windows XP box.

My attempt at building Xerces 2.8.0 has failed, and I'm not sure if
the problem is a mistake I've made, or an issue with the code.

I attempted to follow the instructions at
http://xerces.apache.org/xerces-c/build-winunix-2.html#WinNT. I used
Projects\Win32\VC8\xerces-all\xerces-all.sln which MSVC automatically
translated to MSVC9.

I attempted to build the multi-threaded debug dll, but resource
compilation failed with the following error:

1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>..\..\..\..\..\src\xercesc\util\Platforms\Win32\Version.rc(10) :
fatal error RC1015: cannot open include file 'winres.h'.
1>Build log was saved at "file://c:\Documents and
Settings\bdh32\Desktop\libsbml-2.3.5\xerces-c-src_2_8_0\Build\Win32\VC8\Debug\obj\BuildLog.htm"
1>XercesLib - 1 error(s), 9 warning(s)

I have found winres.h in the \Projects\Win32\BCC.551 directory, but
I'm using the Projects\Win32\VC8 directory, so suspect that is not in
the path. When I copied it to src\xercesc\util\Platforms\Win32, I got
other errors.

Are there other changes I need to make to my build environment to be
able to make a xerces 2.8.0 .dll?

Thanks very much!
Ben Heavner

RE: Failed attempt to build Xerces 2.8.0 with MSVC++ Express 2008

Posted by John Lilley <jl...@datalever.com>.
In my VS Pro installation, winres.h is found at:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\winres.h

Try searching for winres.h in your VS install folder.  I've read on the forums that VS Express installs it here:
C:\Program Files\Microsoft Platform SDK\include\mfc

Add this directory to your include path in VS using:
Tools->Options->VC++ Directories->Include Files

john

-----Original Message-----
From: Ben Heavner [mailto:bheavner@gmail.com] 
Sent: Thursday, October 01, 2009 12:43 PM
To: c-users@xerces.apache.org
Subject: Failed attempt to build Xerces 2.8.0 with MSVC++ Express 2008

Hello,

I'm not sure if this is the best forum to direct this question to -
please let me know if there is a better place to ask.

I'm fairly inexperienced with Microsoft development tools, but am
attempting to build Xerces 2.8.0 with Microsoft Visual C++ Express
2008 and the Windows SDK for Windows Server 2008 and .NET Framework
3.5 on a Windows XP box.

My attempt at building Xerces 2.8.0 has failed, and I'm not sure if
the problem is a mistake I've made, or an issue with the code.

I attempted to follow the instructions at
http://xerces.apache.org/xerces-c/build-winunix-2.html#WinNT. I used
Projects\Win32\VC8\xerces-all\xerces-all.sln which MSVC automatically
translated to MSVC9.

I attempted to build the multi-threaded debug dll, but resource
compilation failed with the following error:

1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>..\..\..\..\..\src\xercesc\util\Platforms\Win32\Version.rc(10) :
fatal error RC1015: cannot open include file 'winres.h'.
1>Build log was saved at "file://c:\Documents and
Settings\bdh32\Desktop\libsbml-2.3.5\xerces-c-src_2_8_0\Build\Win32\VC8\Debug\obj\BuildLog.htm"
1>XercesLib - 1 error(s), 9 warning(s)

I have found winres.h in the \Projects\Win32\BCC.551 directory, but
I'm using the Projects\Win32\VC8 directory, so suspect that is not in
the path. When I copied it to src\xercesc\util\Platforms\Win32, I got
other errors.

Are there other changes I need to make to my build environment to be
able to make a xerces 2.8.0 .dll?

Thanks very much!
Ben Heavner

Re: Failed attempt to build Xerces 2.8.0 with MSVC++ Express 2008

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Ben,

Ben Heavner <bh...@gmail.com> writes:

> I wonder if it is worth doing something like
> 
> [...]
> 
> to avoid this problem for other inexperienced Express edition users?

This has already been addressed in Xerces-C++ 3-series and there are
no plans to make any new release for the 2-series.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools  http://codesynthesis.com/~boris/blog
Open-source XML data binding for C++:  http://codesynthesis.com/products/xsd
XML data binding for embedded systems: http://codesynthesis.com/products/xsde

Re: Failed attempt to build Xerces 2.8.0 with MSVC++ Express 2008

Posted by Ben Heavner <bh...@gmail.com>.
Thanks Alberto -

Your suggestion did the trick for a build. I replaced the two
instances of #include "winres.h" in version.rc, and the build worked.

I wonder if it is worth doing something like

#ifdef _MFC_VER
#include "winres.h"

#ifndef _MFC_VER
#include "winver.h"
#include "winnt.h"

to avoid this problem for other inexperienced Express edition users?

Thanks again,
Ben

On Fri, Oct 2, 2009 at 2:21 AM, Alberto Massari <am...@datadirect.com> wrote:
> Hi Ben,
> Xerces 2.x required the MFC headers to compile the resources, but the
> Express edition of the Visual Studio tools doesn't have it. You should be
> able to workaround the problem by replacing the #include "winres.h" with
>
> #include "winver.h"
> #include "winnt.h"
>
> Alberto
>
> Ben Heavner wrote:
>>
<snip>
>> attempting to build Xerces 2.8.0 with Microsoft Visual C++ Express
>> 2008 and the Windows SDK for Windows Server 2008 and .NET Framework
>> 3.5 on a Windows XP box.
>>
>> My attempt at building Xerces 2.8.0 has failed,
<snip>
>> 1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
>> 1>Copyright (C) Microsoft Corporation.  All rights reserved.
>> 1>..\..\..\..\..\src\xercesc\util\Platforms\Win32\Version.rc(10) :
>> fatal error RC1015: cannot open include file 'winres.h'.

Re: Failed attempt to build Xerces 2.8.0 with MSVC++ Express 2008

Posted by Alberto Massari <am...@datadirect.com>.
Hi Ben,
Xerces 2.x required the MFC headers to compile the resources, but the 
Express edition of the Visual Studio tools doesn't have it. You should 
be able to workaround the problem by replacing the #include "winres.h" with

#include "winver.h"
#include "winnt.h"

Alberto

Ben Heavner wrote:
> Hello,
>
> I'm not sure if this is the best forum to direct this question to -
> please let me know if there is a better place to ask.
>
> I'm fairly inexperienced with Microsoft development tools, but am
> attempting to build Xerces 2.8.0 with Microsoft Visual C++ Express
> 2008 and the Windows SDK for Windows Server 2008 and .NET Framework
> 3.5 on a Windows XP box.
>
> My attempt at building Xerces 2.8.0 has failed, and I'm not sure if
> the problem is a mistake I've made, or an issue with the code.
>
> I attempted to follow the instructions at
> http://xerces.apache.org/xerces-c/build-winunix-2.html#WinNT. I used
> Projects\Win32\VC8\xerces-all\xerces-all.sln which MSVC automatically
> translated to MSVC9.
>
> I attempted to build the multi-threaded debug dll, but resource
> compilation failed with the following error:
>
> 1>Compiling resources...
> 1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
> 1>Copyright (C) Microsoft Corporation.  All rights reserved.
> 1>..\..\..\..\..\src\xercesc\util\Platforms\Win32\Version.rc(10) :
> fatal error RC1015: cannot open include file 'winres.h'.
> 1>Build log was saved at "file://c:\Documents and
> Settings\bdh32\Desktop\libsbml-2.3.5\xerces-c-src_2_8_0\Build\Win32\VC8\Debug\obj\BuildLog.htm"
> 1>XercesLib - 1 error(s), 9 warning(s)
>
> I have found winres.h in the \Projects\Win32\BCC.551 directory, but
> I'm using the Projects\Win32\VC8 directory, so suspect that is not in
> the path. When I copied it to src\xercesc\util\Platforms\Win32, I got
> other errors.
>
> Are there other changes I need to make to my build environment to be
> able to make a xerces 2.8.0 .dll?
>
> Thanks very much!
> Ben Heavner
>
>