Bcc72 Prsht.h resource compile error

Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Thu Oct 27, 2016 4: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
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Bcc72 Prsht.h resource compile error

Postby Enrico Maria Giordano » Fri Oct 28, 2016 2:51 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bcc72 Prsht.h resource compile error

Postby carlos vargas » Fri Oct 28, 2016 3: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)
User avatar
carlos vargas
 
Posts: 1721
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Sat Oct 29, 2016 1: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
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Sat Oct 29, 2016 1: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: Select all  Expand view  RUN

C:\BORLAND\BCC72\BIN\brc32 -r %1.rc
 
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Bcc72 Prsht.h resource compile error

Postby Enrico Maria Giordano » Sat Oct 29, 2016 1:47 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Sat Oct 29, 2016 1:51 pm

Enrico

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

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Bcc72 Prsht.h resource compile error

Postby Enrico Maria Giordano » Sat Oct 29, 2016 2:00 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Sat Oct 29, 2016 2: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: Select all  Expand view  RUN

@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 view  RUN

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 view  RUN

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.
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Bcc72 Prsht.h resource compile error

Postby Enrico Maria Giordano » Sat Oct 29, 2016 3:05 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bcc72 Prsht.h resource compile error

Postby Antonio Linares » Sat Oct 29, 2016 3:13 pm

Rick,

What header files those RC files have ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Sat Oct 29, 2016 3: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
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Sat Oct 29, 2016 3:24 pm

Antonio

Using Resedit the following Include lines are embedded .. probably those are evoking the additional C++ header errors:
Code: Select all  Expand view  RUN

// 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
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Bcc72 Prsht.h resource compile error

Postby Antonio Linares » Mon Oct 31, 2016 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bcc72 Prsht.h resource compile error

Postby Rick Lipkin » Mon Oct 31, 2016 1: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
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests