FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bcc72 Prsht.h resource compile error
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Bcc72 Prsht.h resource compile error

Posted: Thu Oct 27, 2016 04:55 PM

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

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Fri Oct 28, 2016 02:51 PM

Can I see a sample showing the error to test here?

EMG

Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Fri Oct 28, 2016 03:53 PM
Please search into he forum, this topic is resolved. sorry for my bad english.
http://forums.fivetechsupport.com/viewtopic.php?p=147360#p147360
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 01:25 PM

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

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 01:44 PM
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

Code (fw): Select all Collapse
C:\BORLAND\BCC72\BIN\brc32 -r %1.rc
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 01:47 PM

What is prsht.h for? I never used it.

EMG

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 01:51 PM

Enrico

I have no clue .. somehow Prsht.h is evoked by Brc32.exe when compiling a .rc file.

Rick Lipkin

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 02:00 PM

No, it doesn't. At least, I never saw that error myself.

EMG

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 02:58 PM
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 :

Code (fw): Select all Collapse
@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 (fw): Select all Collapse
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 (fw): Select all Collapse
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.
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 03:05 PM

Still I don't understand what is the use of prsht.h and combaseapi.h. Never used nor needed them.

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 03:13 PM

Rick,

What header files those RC files have ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 03:22 PM

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

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Sat Oct 29, 2016 03:24 PM
Antonio

Using Resedit the following Include lines are embedded .. probably those are evoking the additional C++ header errors:
Code (fw): Select all Collapse
// Generated by ResEdit 1.6.6
// Copyright (C) 2006-2015
// <!-- m --><a class="postlink" href="http://www.resedit.net">http://www.resedit.net</a><!-- m -->

#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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Mon Oct 31, 2016 07:53 AM

Rick,

Try removing this line:

include <commctrl.h>

if that solves the problem, then you can modify the resource script template from Resedit preferences

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Bcc72 Prsht.h resource compile error

Posted: Mon Oct 31, 2016 01:16 PM

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