Author Topic: building lib version 7.5.2. with pellesc 10 win32 get errors  (Read 1240 times)

Peter1956nl

  • Newbie
  • *
  • Posts: 7
    • View Profile
building lib version 7.5.2. with pellesc 10 win32 get errors
« on: August 07, 2020, 10:05:24 AM »
Get several errors  building the lib

C:\BCX\rtlib\bcx\source\OSVersion.c(25): error #2048: Undeclared identifier 'OS_Win_10' (did you mean: ?).
C:\BCX\rtlib\bcx\source\OSVersion.c(26): error #2048: Undeclared identifier 'OS_Server_2016' (did you mean: ?).
C:\BCX\rtlib\bcx\source\OSVersion.c(31): error #2048: Undeclared identifier 'OS_Win_81' (did you mean: ?).
C:\BCX\rtlib\bcx\source\OSVersion.c(32): error #2048: Undeclared identifier 'OS_Server_2012_R2' (did you mean: ?).
C:\BCX\rtlib\bcx\source\OSVersion.c(37): error #2048: Undeclared identifier 'OS_Win_8' (did you mean: ?).
C:\BCX\rtlib\bcx\source\OSVersion.c(38): error #2048: Undeclared identifier 'OS_Server_2012' (did you mean: ?).
C:\BCX\rtlib\bcx\source\OSVersion.c(43): error #2048: Undeclared identifier 'OS_Win_7' (did you mean: ?).
etc

RegInt.c(3): error #2120: Redeclaration of 'RegInt', previously declared at C:\PellesC\Include\bcxLib.h(469); expected 'int __cdecl function(HKEY (aka struct HKEY__ *), const char *, const char *)' but found 'int __cdecl function(HKEY (aka struct HKEY__ *), char *, char *)'

Set_BCX_Icon.c(3): error #2120: Redeclaration of 'Set_BCX_Icon', previously declared at C:\PellesC\Include\bcxLib.h(385); expected 'void __cdecl function(HWND (aka struct HWND__ *), const char *, int, int, int)' but found 'void __cdecl function(HWND (aka struct HWND__ *), char *, int, int, int)'.

VBS_START.c(133): error #2120: Redeclaration of 'VBS_EVAL_NUM', previously declared at C:\PellesC\Include\bcxLib.h(302); expected 'double __cdecl function(const char *)' but found 'double __cdecl function(char *)'.

VBS_START.c(215): error #2120: Redeclaration of 'VBS_EVAL_STR', previously declared at C:\PellesC\Include\bcxLib.h(303); expected 'char * __cdecl function(const char *)' but found 'char * __cdecl function(char *)'.
Verify.c(15): error #2120: Redeclaration of 'VerifyInstr', previously declared at C:\PellesC\Include\bcxLib.h(493); expected 'int __cdecl function(const char *, const char *, int)' but found 'int __cdecl function(char *, char *, int)

How to solve the errors  or are these bug?

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1885
    • View Profile
Re: building lib version 7.5.2. with pellesc 10 win32 get errors
« Reply #1 on: August 07, 2020, 11:21:36 AM »
Peter,

They are bugs which will be fixed in the next version.   Basically, some arguments in the function
prototypes differs from the arguments in the functions.  Like your previous bug report, these also
seem to involve routines that were missed in the 300+ replacements of char* to LPCTSTR.

I was never directly involved in the implementation of the whole $Project runtime generation thing
and I've never used it, so I tend not to think about it, let alone test it.  But I try to support it when
new commands and functions are added to BCX and I certainly try not to break anything.  But there's
a saying that seems to apply ... "If you want to make an omelet, you must break a few eggs."

Peter1956nl

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: building lib version 7.5.2. with pellesc 10 win32 get errors
« Reply #2 on: August 07, 2020, 12:22:52 PM »
MrBcx,

As you mentioned in your answer to my earlier bugreport. I was trying to this as an excerise to learn more about BCX  in relation to C programming.
I think that the use of the libversion is limited to a small group of expert users ?

Thanks for your answer!

Have nice day.

Peter


MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1885
    • View Profile
Re: building lib version 7.5.2. with pellesc 10 win32 get errors
« Reply #3 on: August 07, 2020, 01:50:39 PM »
Peter,

I thought I would take the necessary steps to build the BCXRT.LIB, so that I can know that
things are working correctly when new versions of BCX are released.

I discovered a problem a few minutes ago.  When I type BC -l from my C:\BCX\ folder, a new folder
in the root named rtlib gets created and populated with a number of sub-folders but then BCX displays:

BCX BASIC to C/C++ Translator (c) 1999 by Kevin Diggins
Version 7.3.9 (2020/01/05)
[Lines In: 2] [Lines Out: 7453] [Statements: 29] [Time: 0.03 sec's]
BCX Created Runtime Library Files

Can't open file BCXRT.c

Version 738 does not display that error but every version from 739 to 752 fails.

Much has changed between 738 and 752 and it will probably take more time than I
anticipated to discover what is causing the error and ultimately to do some testing.


MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1885
    • View Profile
Re: building lib version 7.5.2. with pellesc 10 win32 get errors
« Reply #4 on: August 07, 2020, 02:07:02 PM »
MrBcx,

I think that the use of the libversion is limited to a small group of expert users ?

Peter

Peter,

I seriously doubt anyone uses the "libversion", as you call it.  I personally see it as requiring
a lot more effort maintaining than any practical benefit that it supposedly provides. 

15+ years ago, it was a very different story:  computers were more expensive, had less memory,
smaller drives, and ran much slower.  Those all factored heavily in the decision to use the "libversion"
for some users.

It's very different than today.  My 7 year old HP i5 computer translates BCX in 0.7 seconds and most
of my C/C++ compilers complete BCX in under 10 seconds.