[Cmake] (Cmake 1.6.4)+(bcc32 5.5.1)+(.rc file)=problem
Oleg Kagan
oleg_kagan at yahoo.com
Mon Feb 17 05:49:12 EST 2003
Hi...
I am trying to use cmake to build simple project under Borland C++ Free
compiler.
It looks like support for resource files is broken, or maybe I doing
something wrong...
May anybody help with this problem?
The only solution I found is to add
SET(CMAKE_COMPILE_RESOURCE "cmd /c ok.cmd <OBJECT> <FLAGS> /fo<OBJECT>
<SOURCE>")
where ok.cmd is
@echo off
brc32 %2 %3 %4 %5 %6 %7 %8 %9
move /y %1 rc_%1
echo #pragma resource "rc_%1" > %1
Problem here is that you can't have resource filename the same as any of
c/cpp files (e.g. testrc.cpp and testrc.rc)
Here is initial project
************* CMakeLists.txt:
PROJECT(testrc)
ADD_EXECUTABLE(testrc testrc.cpp testrc0.rc)
************* testrc.cpp:
#include <windows.h>
int main()
{
MessageBox(NULL,"Hello, world!", "testrc.exe",MB_OK | MB_SYSTEMMODAL);
}
************* testrc0.rc
#define VERSIONINFO_1 1
VERSIONINFO_1 VERSIONINFO
FILEVERSION 1, 0, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEOS VOS_DOS_WINDOWS16
FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "CompanyName", "My Company\000\000"
VALUE "FileDescription", "Description from .def file here\000"
VALUE "FileVersion", "1.00\000\000"
VALUE "InternalName", "Application name\000"
VALUE "LegalCopyright", "Copyright (c) My Company 1993\000\000"
VALUE "OriginalFilename", ".exe file name here\000"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1252
}
}
Output:
C:\testrc>make
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
make cmake.depends
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
make cmake.check_depends
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
make -f cmake.check_depends
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
cmake.depends is up-to-date
make all
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
echo Building object file testrc.obj...
Building object file testrc.obj...
bcc32 -DWIN32 -P -w- -whid -waus -wpar -tWM -Od -v -Ic:\testrc -otestrc.obj
-c c:\
testrc\testrc.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
c:\testrc\testrc.cpp:
brcc32 /r testrc
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
echo Building executable testrc.exe...
Building executable testrc.exe...
bcc32 -tWM -v -tWC -etestrc.exe -w- -whid -waus -wpar -tWM
import32.lib testrc.obj testrc.res
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
testrc.RES:
Error E2206 testrc.RES 1: Illegal character ' ' (0xff)
Error E2206 testrc.RES 1: Illegal character ' ' (0xff)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character ' ' (0xff)
Error E2206 testrc.RES 1: Illegal character ' ' (0xff)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character '' (0x0)
Error E2206 testrc.RES 1: Illegal character 'Ь' (0x9c)
Error E2228 testrc.RES 1: Too many error or warning messages
*** 26 errors in Compile ***
** error 1 ** deleting testrc.exe
** error 1 ** deleting default_target
C:\testrc>
======================================================================
Oleg Kagan
E-mail: oleg_kagan at yahoo.com
Home page: http://beam.to/kagan
"It finally happened - I'm slightly mad" (Queen)
======================================================================
More information about the CMake
mailing list