[Paraview] KWWidgets build - .res file problems

dean.inglis at camris.ca dean.inglis at camris.ca
Sun Nov 6 11:14:55 EST 2005


Hi,

I am trying to build KWWidgets cvs on Win XP with Borland C++,
VTK cvs, CMake 2.0.6.  The problems are with .res files while
compiling the Examples:


:/Builder/Releases/KWWidgets/Examples/Cxx/SimpleWindow: building default_target
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
Borland Resource Compiler  Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation.  All rights reserved.

Error KWSimpleWindowExample.RC 1 11: Cannot open file: Resources/KWWidgets.rc.h

** error 20018 ** deleting KWSimpleWindowExample.res

** error 1 ** deleting default_target

** error 1 ** deleting default_target_SimpleWindow

** error 1 ** deleting default_target

** error 1 ** deleting default_target_Cxx

** error 1 ** deleting default_target


I made a few modifications to KWWidgets/Resources/KWWidgets.rc.in so
that some of the paths could be found, as it seems at least for
Borland, the generated .rc file has internal relative paths that it
cannot find, so I added  @KWWidgets_SOURCE_DIR@, hard coded the path to windows.h,
and added @VTK_DIR@ to find vtkConfigure.h:


#include "@KWWidgets_SOURCE_DIR@/Resources/KWWidgets.rc.h"

// The icon whose name or resource ID is lexigraphically first, is used
// as the application's icon.
// Tk was defining app.

IDI_APPLICATION       ICON    DISCARDABLE     "@KWWidgets_SOURCE_DIR@/Resources/KWWidgetsIcon32.ico"
IDI_KWWIDGETSICO      ICON    DISCARDABLE     "@KWWidgets_SOURCE_DIR@/Resources/KWWidgetsIcon32.ico"
IDI_KWWIDGETSICOSMALL ICON    DISCARDABLE     "@KWWidgets_SOURCE_DIR@/Resources/KWWidgetsIcon16.ico"

#include "c:/Program Files/Borland/CBuilder5/Include/windows.h"

#include "@VTK_DIR@/vtkConfigure.h"
#ifdef VTK_TCL_TK_STATIC
#include "tk_base.rc"
#endif

<snip>


Now I have the following errors due to the .res file:

Building executable c:\Builder\Releases\KWWidgets\bin\KWSimpleWindowExample.exe...
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
KWSimpleWindowExample.RES:
Error E2206 KWSimpleWindowExample.RES 1: Illegal character 'ÿ' (0xff)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character 'ÿ' (0xff)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character 'ÿ' (0xff)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character 'ÿ' (0xff)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '' (0x0)
Error E2206 KWSimpleWindowExample.RES 1: Illegal character '¨' (0xa8)
Error E2228 KWSimpleWindowExample.RES 1: Too many error or warning messages
*** 26 errors in Compile ***

** error 1 ** deleting c:\Builder\Releases\KWWidgets\bin\KWSimpleWindowExample.exe

** error 1 ** deleting default_target

** error 1 ** deleting default_target_SimpleWindow

** error 1 ** deleting default_target

** error 1 ** deleting default_target_Cxx

** error 1 ** deleting default_target

** error 1 ** deleting default_target_Examples


And this is where I am now stumped... :(
I think most of this can be configured properly
by CMake, but I don't know a lot about resource files
in Borland but have this info from Builder/help 

There are several Borland command-line resource tools:

Resource compiler

BRCC32.EXE is the Borland resource compiler. It compiles resource script files 
(.RC files) and produces the binary .RES file.

Resource linkers

RLINK32.DLL is the Borland resource linker that binds resources, in .RES file form, 
to an .EXE file, and marks the resulting .EXE file as a Windows executable. 
RLINK32.DLL is accessed through ILINK32.EXE.

Resource shells

BRC32.EXE is a shell through which BRCC32 and RLINK32 (through ILINK32) 
can be started in a single step.


BRCC32 is the command-line version of the resource compiler. It accepts 
a resource script file (.RC) as input and produces a resource object file
 (.RES) as output.

Syntax

BRCC32 [options] <filename>.RC

Command-line options

BRCC32 accepts these options:

Option	Description

@responsefile	Takes instructions from the specified command file.
-c <code page>	Uses the specified code page for resource translation. 
                If -c is not used, the default ANSI code page is used.
-d<name>[=<string>]	Defines a preprocessor symbol.
-fo<filename>	Renames the output .RES file. (By default, BRCC32 creates 
                the output .RES file with the same name as the input .RC file.)
-i<path>	Adds one or more directories (separated by semicolons) to 
                the include search path.


-l<language>	Specifies default language.
-m	Indicates that the code page specified with the -c switch contains 
        double-byte character set (DBCS) characters.
-r	This switch is ignored. It is included for compatibility with 
        other resource compilers.
-v	Prints progress messages (verbose).
-x	Deletes the current include path.
-? or -h	Displays help.
-16	Builds a 16-bit resource.
-32	Builds a 32-bit resource.

RLINK32 combines a .RES file with an .EXE file to produce a new Windows 
executable. RLINK32 accepts as input 
one or more object (.RES) files and a single Windows executable file. 
RLINK32 links the resources by fixing 
up string tables and message tables and then binding these linked 
resources into the executable. RLINK32 is 
called by ILINK32 and is used for 32-bit resources.

The Borland resource compiler (BRC32) is a resource compiler shell. 
It invokes BRCC32 and RLINK32, depending on the command-line syntax.

Syntax

brc32 [options] <filename>.RC [<filename>.EXE]

Command-line options

BRC32 accepts these options:

Switch	Description

-d<name>[=string]	Defines a symbol you can test with the #IFDEF preprocessor 
                        directive.
-fo<filename>	Renames the .RES file.
-fe<filename>	Renames the .EXE file.
-i<path>	Adds one or more directories (separated by semicolons) to the 
                include search path.
-r	Creates a .RES file only. The compiled .RES file is not added to the .EXE.
-v	Prints progress messages (verbose listing).
-x	Directs the compiler to ignore the INCLUDE environment variable when it 
         searches for include or resource files.

-16	Builds 16-bit .RES files.
-32	Builds 32-bit .RES files.
-Vd.d	Makes the .EXE file with Windows version provided (v3.1 is the default for
         16-bit resources; -v4.0 is the default for 32-bit resources). Version
        options are listed in the following table.

Option	Bit	Resulting look

3.1	16	Gives white background with a non 3-D look for Windows 3.1x, Windows 32s, or WinNT 3.1
4.0	16	Gives gray 3-D look for Windows 95 and WinNT 3.51
3.1	32	Gives white background with a non 3-D look for Windows 32s or WinNT 3.1
4.0	32	Gives gray 3-D look for Windows 95 and WinNT 3.51

The following switches are invalid when the -r switch is specified:

-k	Disables the contiguous preload of segments and resources in the .EXE file. 
        Segments are kept in the order in which they appear in the .DEF file. (This 
        option only applies to 16-bit resources.) 
-t	Creates an application that runs only in protected mode (Windows Standard or 
       386 Enhanced mode). 



More information about the ParaView mailing list