Opened 18 years ago

Last modified 17 years ago

#1170 closed defect (fixed)

Compilation with MS Visual C++ Express Edition fails (winres.h)

Reported by: tdamm@… Owned by: Mateusz Łoskot
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc: tdamm@…

Description

Getting newest source from CVS - version is "1.3.2b2" from yesterday.

Compiler is Microsoft Visual C++ Express Edition (that one for free!), Version 
8.0.50727.42.

Problem looks known in principle: winres.h is not included in the free 
version. Attempts to use winresrc.h instead just brings linking problems.

Compilaiton stops here:

         rc -fo Version.res -r -I..\port Version.rc
 Version.rc(41) : fatal error RC1015: cannot open include file 'winres.h'.
 NMAKE : fatal error U1077: '"G:\Programme\Microsoft Visual Studio 
 8\VC\BIN\rc.EX E"' : return code '0x1'
 Stop.
 NMAKE : fatal error U1077: '"G:\Programme\Microsoft Visual Studio 
 8\VC\BIN\nmake .EXE"' : return code '0x2'
 Stop.

Attachments (1)

vsvars32.bat (1.6 KB ) - added by Mateusz Łoskot 18 years ago.
My patched version of vsvars32.bat script

Download all attachments as: .zip

Change History (5)

comment:1 by Mateusz Łoskot, 18 years ago

(In reply to comment #0)
> Problem looks known in principle: winres.h is not included in the free 
> version. Attempts to use winresrc.h instead just brings linking problems.

Does "is not included" mean you have searched through files on your hard disk
for winres.h file?
Also, have you fixed paths in your environment configuration?
I mean, the official installation manual for VC++ 2005 EE is broken, incomplete.
You have to fix include patsh manuall.
The manual says to add this directory to the INCLUDE path (to Visual C++
directories in the Projects and Solutions tree node of Tools -> Options dialog box):

C:\Program Files\Microsoft Platform SDK\include

but also this path should be added:

C:\Program Files\Microsoft Platform SDK\include\mfc

Note, I'm not sure if this will help you. Till next Wednesday/Thursday, I have
only access to Linux so I'm not able to check GDAL on Windows platform with VC++
EE installed. So, if you could check it sooner that could be great!

comment:2 by Mateusz Łoskot, 18 years ago

Timo, I'd just like to ask if you've checked my suggestion and if this bug is
fixed already or not?
Please, give me some note, so I know if I should investigate it deeper.

Cheers

comment:3 by Mateusz Łoskot, 18 years ago

Today, I installed Visual C++ 2005 Express Edition and Platform SDK and I
managed to build GDAL - latest CVS version.

So, here is the full story with links that should be helpful:

1. Install VC++ 2005 Express Edition
http://msdn.microsoft.com/vstudio/express/visualc/download/

2. Install Platform SDK and follow manual installation steps:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

3. Now - VERY IMPORTANT - set manually following environment variables: INCLUDE,
LIB. You can do it from Control Panel -> System applet or by editing the
vcvars32.bat script:
"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"

Here is how INCLUDE and LIB variables should look like:

INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;C:\Program
Files\Microsoft Platform SDK\Include;C:\Program Files\Microsoft Platform
SDK\Include\mfc;C:\Program Files\Microsoft Platform SDK\Include\atl;%INCLUDE%


LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft
Visual Studio 8\SDK\v2.0\lib;C:\Program Files\Microsoft Platform SDK\lib;%LIB%

(As I said, you can put update them in vsvars32.bat script)

4. Edit atlbase.h and atlwin.h files as described here (point 4):
http://groups.yahoo.com/group/wtl/message/12850


Those steps No 3 and 4 are also described in this post:
http://lists.maptools.org/pipermail/gdal-dev/2005-December/007537.html

NOTE: After I set my environment in the way described above, I've not noticed
any problem with winres.h file.

5. Go to your gdal directory and run
nmake /f makefile.vc

by Mateusz Łoskot, 18 years ago

Attachment: vsvars32.bat added

My patched version of vsvars32.bat script

comment:4 by Mateusz Łoskot, 17 years ago

I'm closing this bug as its fix has been verified.
Note: See TracTickets for help on using tickets.