Bcc72 Prsht.h resource compile error
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Bcc72 Prsht.h resource compile error
To All
Just downloaded Bcc72 32 bits and like Bcc70 ( which I have a fix for ) I get a compile error with prsht.h about an out of balance #if and #endif. I was hoping someone has run accross this error and has a fix for the header file mismatch. I would be very grateful.
[1]:Brc32.Exe -r -foResource\VehW32.Res VehW32.RC
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Error prsht.h 917 1: '#endif' before '#if'
Rick Lipkin
Just downloaded Bcc72 32 bits and like Bcc70 ( which I have a fix for ) I get a compile error with prsht.h about an out of balance #if and #endif. I was hoping someone has run accross this error and has a fix for the header file mismatch. I would be very grateful.
[1]:Brc32.Exe -r -foResource\VehW32.Res VehW32.RC
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Error prsht.h 917 1: '#endif' before '#if'
Rick Lipkin
- Enrico Maria Giordano
- Posts: 8784
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 9 times
- Contact:
- carlos vargas
- Posts: 1725
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
- Been thanked: 1 time
Re: Bcc72 Prsht.h resource compile error
Please search into he forum, this topic is resolved. sorry for my bad english.
http://forums.fivetechsupport.com/viewtopic.php?p=147360#p147360
http://forums.fivetechsupport.com/viewtopic.php?p=147360#p147360
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Bcc72 Prsht.h resource compile error
Carlos
Thanks for reminding me of my own solution .. I did not research this fix since the files are so different. Let me see if removing the trailing \ from line 184 does the trick for Bcc72.
Thanks
Rick Lipkin
Thanks for reminding me of my own solution .. I did not research this fix since the files are so different. Let me see if removing the trailing \ from line 184 does the trick for Bcc72.
Thanks
Rick Lipkin
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Bcc72 Prsht.h resource compile error
Enrico
Just try to compile a .rc file with the line below ( or buildx.bat that includes an .rc ) and that will evoke the error. Bcc72 is a bit different than Bcc70 in that that the .H files are in two different folders complicating the compile a bit.
Windows.h is in \Bcc72\INCLUDE\windows\sdk and
String.h is in \Bcc72\INCLUDE\windows\crtl
Don't really know if using Bcc72 is any better than Bcc70 ?
Rick Lipkin
Just try to compile a .rc file with the line below ( or buildx.bat that includes an .rc ) and that will evoke the error. Bcc72 is a bit different than Bcc70 in that that the .H files are in two different folders complicating the compile a bit.
Windows.h is in \Bcc72\INCLUDE\windows\sdk and
String.h is in \Bcc72\INCLUDE\windows\crtl
Don't really know if using Bcc72 is any better than Bcc70 ?
Rick Lipkin
Code: Select all | Expand
C:\BORLAND\BCC72\BIN\brc32 -r %1.rc
- Enrico Maria Giordano
- Posts: 8784
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 9 times
- Contact:
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Bcc72 Prsht.h resource compile error
Enrico
I have no clue .. somehow Prsht.h is evoked by Brc32.exe when compiling a .rc file.
Rick Lipkin
I have no clue .. somehow Prsht.h is evoked by Brc32.exe when compiling a .rc file.
Rick Lipkin
- Enrico Maria Giordano
- Posts: 8784
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 9 times
- Contact:
Re: Bcc72 Prsht.h resource compile error
No, it doesn't. At least, I never saw that error myself.
EMG
EMG
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Bcc72 Prsht.h resource compile error
Enrico
I use the below modified Rc2Dll32.bat file that copies all my .rc to a single .rc and then compiles to .res. The line below fails twice :
The result of the batch file is
To fix in line 184 of Prsht.h remove the trailing /
LPFNPSPCALLBACKW pfnCallback; \
UINT *pcRefParent; // \ <--- remove trailing backslash line 184
ReRun the batch file again and you get this error:
To fix in line 283 of Combaseapi.h rem out the entire line
// #define PURE
Rerun the batch file and now I get a clean .res to compile into my application
Rick Lipkin
ps ... if I use the single VehW32.rc alone in my compile list ( instead of VehW32.res ) .. I get the same header file compile errors.
I use the below modified Rc2Dll32.bat file that copies all my .rc to a single .rc and then compiles to .res. The line below fails twice :
Code: Select all | Expand
@Echo Off
rem RC file to 32 bits resources DLL
rem syntax: rc2dll32.bat Your_rc_file !!! without the .RC extension
DEL VehW32.DLL
DEL VehW32.RC
DEL Veh3W2.RES
COPY *.RC VehW32.RC
C:\BORLAND\BCC72\BIN\brc32 -r %1.rc
del *.iL?
del *.map
del *.obj
del *.~rc
del *.rws
:del *.res
del *.tds
echo done!
The result of the batch file is
Code: Select all | Expand
WORKVEH.RC
WOTIRE.RC
WRKADD.RC
xplook.rc
1 file(s) copied.
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Error prsht.h 917 1: '#endif' before '#if'
done!
To fix in line 184 of Prsht.h remove the trailing /
LPFNPSPCALLBACKW pfnCallback; \
UINT *pcRefParent; // \ <--- remove trailing backslash line 184
ReRun the batch file again and you get this error:
Code: Select all | Expand
WORKVEH.RC
WOTIRE.RC
WRKADD.RC
xplook.rc
1 file(s) copied.
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Error combaseapi.h 283 9: Symbol PURE is already defined. Redefinition is not the same
done!
To fix in line 283 of Combaseapi.h rem out the entire line
// #define PURE
Rerun the batch file and now I get a clean .res to compile into my application
Rick Lipkin
ps ... if I use the single VehW32.rc alone in my compile list ( instead of VehW32.res ) .. I get the same header file compile errors.
- Enrico Maria Giordano
- Posts: 8784
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 9 times
- Contact:
Re: Bcc72 Prsht.h resource compile error
Still I don't understand what is the use of prsht.h and combaseapi.h. Never used nor needed them.
EMG
EMG
- Antonio Linares
- Site Admin
- Posts: 42837
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 170 times
- Been thanked: 123 times
- Contact:
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Bcc72 Prsht.h resource compile error
Enrico
I do not know the answer to your question .. I do remember ( after Carlos jogged my memory ) having to rem out the trailing \ in Prsht.h in Bcc70 .. but following the "rabbit trail down the hole" with Bcc722 .. fixing Prsht.h lead to Combaseapi.h and rem'ing out line 283 makes the process work.
What is interesting to me is if I run Buildx.bat in the \samples with the modified Bcc72 path, there is no error compiling the associated .rc ..
Maybe Antonio or Rao could chime in here and tell us what the two Bcc72 header files actually do.
Rick Lipkin
I do not know the answer to your question .. I do remember ( after Carlos jogged my memory ) having to rem out the trailing \ in Prsht.h in Bcc70 .. but following the "rabbit trail down the hole" with Bcc722 .. fixing Prsht.h lead to Combaseapi.h and rem'ing out line 283 makes the process work.
What is interesting to me is if I run Buildx.bat in the \samples with the modified Bcc72 path, there is no error compiling the associated .rc ..

Maybe Antonio or Rao could chime in here and tell us what the two Bcc72 header files actually do.
Rick Lipkin
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Bcc72 Prsht.h resource compile error
Antonio
Using Resedit the following Include lines are embedded .. probably those are evoking the additional C++ header errors:
I had to move to ResEdit as my forms editor because our 'beloved' Workshop is 16 bits and Workshop never embedded an Include file in the .rc
Rick Lipkin
Using Resedit the following Include lines are embedded .. probably those are evoking the additional C++ header errors:
Code: Select all | Expand
// Generated by ResEdit 1.6.6
// Copyright (C) 2006-2015
// http://www.resedit.net
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"
I had to move to ResEdit as my forms editor because our 'beloved' Workshop is 16 bits and Workshop never embedded an Include file in the .rc
Rick Lipkin
- Antonio Linares
- Site Admin
- Posts: 42837
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 170 times
- Been thanked: 123 times
- Contact:
Re: Bcc72 Prsht.h resource compile error
Rick,
Try removing this line:
#include <commctrl.h>
if that solves the problem, then you can modify the resource script template from Resedit preferences
Try removing this line:
#include <commctrl.h>
if that solves the problem, then you can modify the resource script template from Resedit preferences
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Bcc72 Prsht.h resource compile error
Antonio
I removed the #include <commctrl.h> from all my resources and that fixed the call to Prsht.h but the .rc compile still apparently is looking at combaseapi.h and errors out on line 283 with the symbol PURE already defined.
Rick Lipkin
I removed the #include <commctrl.h> from all my resources and that fixed the call to Prsht.h but the .rc compile still apparently is looking at combaseapi.h and errors out on line 283 with the symbol PURE already defined.
Rick Lipkin