Hi,
I'm trying to add libpng to my own project, and libpng requires zlib. So I downloaded the zlib source, opened the MSVC++ project file with Code::Blocks, and get a "Syntax Error" on line 6 of the "win32\zlib1.rc" file when I compile either the dynamic or static library, debug or release. The .rc file is as follows, with line 6 commented:
#include <windows.h>
#ifdef GCC_WINDRES
VS_VERSION_INFO VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE // Line 6: "syntax error"
#endif
FILEVERSION 1,2,2,0
PRODUCTVERSION 1,2,2,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS 1
#else
FILEFLAGS 0
#endif
FILEOS VOS_DOS_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0 // not used
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
//language ID = U.S. English, char set = Windows, Multilingual
BEGIN
VALUE "FileDescription", "zlib data compression library\0"
VALUE "FileVersion", "1.2.3\0"
VALUE "InternalName", "zlib1.dll\0"
VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0"
VALUE "OriginalFilename", "zlib1.dll\0"
VALUE "ProductName", "zlib\0"
VALUE "ProductVersion", "1.2.3\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1252
END
END
It's been a long time since I've dealt with .rc files, but this appears to be the correct syntax to me. I'm guessing there's some kind of setting that's off, probably the MSVC++ project file was not imported 100% correctly. What project settings should I be checking to ensure that C::B is in fact compiling this .rc file correctly? I checked the platform field, which is set to "All" (Windows, Unix and Mac). I tried setting it to Windows only and got the same result. I would try the included MinGW makefile instead, but to be honest, I haven't dealt with makefiles since... the mid 90's.
I'm using C::B 8.02 with the included GNU GCC compiler. My development platform is Windows XP Pro, 32 bit. I'm very new to C::B (I used MSVC++ in the past), and have been on a hiatus from coding for around four years and am starting to get back into it now, so please forgive any potential ignorance on my part.
Thanks.