Author Topic: Using the latest BCX with PellesC 11.00.3-How?  (Read 2462 times)

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Using the latest BCX with PellesC 11.00.3-How?
« on: April 02, 2022, 01:52:47 PM »
Has anyone tried converting the demo files using the latest version of BCX AND the latest version of PellesC 11.00.3?
I notice that BCX has both 32 bit and 64 bit directories when extracting the zip file. Which BCX version should I use? What is the best way to use these tools? I've been working on compiling the console demo's today after a long break. Any help welcome. Thanks.

David.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2330
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #1 on: April 02, 2022, 02:18:48 PM »
Every demo file (and lots more) is translated with the latest version of BCX and Pelles C.
That has been part of my normal regression testing for some years now.

The how is ... I use batch files.  We've covered this before:

https://bcxbasiccoders.com/smf/index.php?topic=175.msg734#msg734

This is the batch I use to build all the console demos with BCX and Pelles

Code: [Select]
BC  s00
BC  s01
BC  s02
BC  s03
BC  s04
BC  s05
BC  s06
BC  s07
BC  s08
BC  s09
BC  s10
BC  s11
BC  s12
BC  s13
BC  s14
BC  s15
BC  s16
BC  s17
BC  s18
BC  s19
BC  s20
BC  s21
BC  s22
BC  s23
BC  s24
BC  s25
BC  s26
BC  s27
BC  s28
BC  s29
BC  s30
BC  s31
BC  s32
BC  s33
BC  s34
BC  s35
BC  s36
BC  s37
BC  s38
BC  s39
BC  s40
BC  s41
BC  s42
BC  s43
BC  s44
BC  s45
BC  s46
BC  s47
BC  s48
BC  s49
BC  s50
BC  s51
BC  s52
BC  s53
BC  s54
BC  s55
BC  s56
BC  s57
BC  s58
BC  s59
BC  s60
BC  s61
BC  s62
BC  s63
BC  s64
BC  s65
BC  s66
BC  s67
BC  s68
BC  s69
BC  s70
BC  s71
BC  s72
BC  s73
BC  s74
BC  s75
BC  s76
BC  s77
BC  s78
BC  s79
BC  s80
BC  s81
BC  s82
BC  s83
BC  s84
BC  s85
BC  s86
BC  s87
BC  s88
BC  s89
BC  s90
BC  s91
BC  s92
BC  s93
BC  s94
BC  s95
BC  s96
BC  s97
BC  s98
BC  s99
BC  s100
BC  s101
BC  s102
BC  s103
BC  s104
BC  s105
BC  s106
BC  s107
BC  s108
BC  s109
BC  s110
BC  s111
BC  s112
BC  s113
BC  s114
BC  s115
BC  s116
BC  s117
BC  s118
BC  s119
BC  s120
BC  s121
BC  s122
BC  s123
BC  s124
BC  s125
BC  s126
BC  s127
BC  s128
BC  s129
BC  s130
BC  s131
BC  s132
BC  s133
BC  s134
BC  s135
BC  s136
BC  s137
BC  s138
BC  s139
BC  s140
BC  s141
BC  s142
BC  s143
BC  s144
BC  s145
BC  s146
BC  s147
BC  s148
BC  s149
BC  s150
BC  s151
BC  s152
BC  s153
BC  s154
BC  s155



call pc32  s00
call pc32  s01
call pc32  s02
call pc32  s03
call pc32  s04
call pc32  s05
call pc32  s06
call pc32  s07
call pc32  s08
call pc32  s09
call pc32  s10
call pc32  s11
call pc32  s12
call pc32  s13
call pc32  s14
call pc32  s15
call pc32  s16
call pc32  s17
call pc32  s18
call pc32  s19
call pc32  s20
call pc32  s21
call pc32  s22
call pc32  s23
call pc32  s24
call pc32  s25
call pc32  s26
call pc32  s27
call pc32  s28
call pc32  s29
call pc32  s30
call pc32  s31
call pc32  s32
call pc32  s33
call pc32  s34
call pc32  s35
call pc32  s36
call pc32  s37
call pc32  s38
call pc32  s39
call pc32  s40
call pc32  s41
call pc32  s42
call pc32  s43
call pc32  s44
call pc32  s45
call pc32  s46
call pc32  s47
call pc32  s48
call pc32  s49
call pc32  s50
call pc32  s51
call pc32  s52
call pc32  s53
call pc32  s54
call pc32  s55
call pc32  s56
call pc32  s57
call pc32  s58
call pc32  s59
call pc32  s60
call pc32  s61
call pc32  s62
call pc32  s63
call pc32  s64
call pc32  s65
call pc32  s66
call pc32  s67
call pc32  s68
call pc32  s69
call pc32  s70
call pc32  s71
call pc32  s72
call pc32  s73
call pc32  s74
call pc32  s75
call pc32  s76
call pc32  s77
call pc32  s78
call pw32  s79
call pc32  s80
call pc32  s81
call pc32  s82
call pc32  s83
call pc32  s84
call pc32  s85
call pc32  s86
call pc32  s87
call pc32  s88
call pc32  s89
call pc32  s90
call pc32  s91
call pc32  s92
call pc32  s93
call pc32  s94
call pc32  s95
call pc32  s96
call pc32  s97
call pc32  s98
call pc32  s99
call pc32  s100
call pc32  s101
call pc32  s102
call pc32  s103
call pc32  s104
call pc32  s105
call pc32  s106
call pc32  s107
call pc32  s108
call pc32  s109
call pc32  s110
call pc32  s111
call pc32  s112
call pc32  s113
call pc32  s114
call pc32  s115
call pc32  s116
call pc32  s117
call pc32  s118
call pc32  s119
call pc32  s120
call pc32  s121
call pc32  s122
call pc32  s123
call pc32  s124
call pc32  s125
call pc32  s126
call pc32  s127
call pc32  s128
call pc32  s129
call pc32  s130
call pc32  s131
call pc32  s132
call pc32  s133
call pc32  s134
call pc32  s135
call pc32  s136
call pc32  s137
call pc32  s138
call pc32  s139
call pc32  s140
call pc32  s141
call pc32  s142
call pc32  s143
call pc32  s144
call pc32  s145
call pc32  s146
call pc32  s147
call pc32  s148
call pc32  s149
call pc32  s150
call pc32  s151
call pc32  s152
call pc32  s153
call pc32  s154
call pc32  s155

del  *.obj

pause

Here's the version for compiling to 64-bit:

Code: [Select]
BC  s00
BC  s01
BC  s02
BC  s03
BC  s04
BC  s05
BC  s06
BC  s07
BC  s08
BC  s09
BC  s10
BC  s11
BC  s12
BC  s13
BC  s14
BC  s15
BC  s16
BC  s17
BC  s18
BC  s19
BC  s20
BC  s21
BC  s22
BC  s23
BC  s24
BC  s25
BC  s26
BC  s27
BC  s28
BC  s29
BC  s30
BC  s31
BC  s32
BC  s33
BC  s34
BC  s35
BC  s36
BC  s37
BC  s38
BC  s39
BC  s40
BC  s41
BC  s42
BC  s43
BC  s44
BC  s45
BC  s46
BC  s47
BC  s48
BC  s49
BC  s50
BC  s51
BC  s52
BC  s53
BC  s54
BC  s55
BC  s56
BC  s57
BC  s58
BC  s59
BC  s60
BC  s61
BC  s62
BC  s63
BC  s64
BC  s65
BC  s66
BC  s67
BC  s68
BC  s69
BC  s70
BC  s71
BC  s72
BC  s73
BC  s74
BC  s75
BC  s76
BC  s77
BC  s78
BC  s79
BC  s80
BC  s81
BC  s82
BC  s83
BC  s84
BC  s85
BC  s86
BC  s87
BC  s88
BC  s89
BC  s90
BC  s91
BC  s92
BC  s93
BC  s94
BC  s95
BC  s96
BC  s97
BC  s98
BC  s99
BC  s100
BC  s101
BC  s102
BC  s103
BC  s104
BC  s105
BC  s106
BC  s107
BC  s108
BC  s109
BC  s110
BC  s111
BC  s112
BC  s113
BC  s114
BC  s115
BC  s116
BC  s117
BC  s118
BC  s119
BC  s120
BC  s121
BC  s122
BC  s123
BC  s124
BC  s125
BC  s126
BC  s127
BC  s128
BC  s129
BC  s130
BC  s131
BC  s132
BC  s133
BC  s134
BC  s135
BC  s136
BC  s137
BC  s138
BC  s139
BC  s140
BC  s141
BC  s142
BC  s143
BC  s144
BC  s145
BC  s146
BC  s147
BC  s148
BC  s149
BC  s150
BC  s151
BC  s152
BC  s153
BC  s154
BC  s155



call pc64 s00
call pc64 s01
call pc64 s02
call pc64 s03
call pc64 s04
call pc64 s05
call pc64 s06
call pc64 s07
call pc64 s08
call pc64 s09
call pc64 s10
call pc64 s11
call pc64 s12
call pc64 s13
call pc64 s14
call pc64 s15
call pc64 s16
call pc64 s17
call pc64 s18
call pc64 s19
call pc64 s20
call pc64 s21
call pc64 s22
call pc64 s23
call pc64 s24
call pc64 s25
call pc64 s26
call pc64 s27
call pc64 s28
call pc64 s29
call pc64 s30
call pc64 s31
call pc64 s32
call pc64 s33
call pc64 s34
call pc64 s35
call pc64 s36
call pc64 s37
call pc64 s38
call pc64 s39
call pc64 s40
call pc64 s41
call pc64 s42
call pc64 s43
call pc64 s44
call pc64 s45
call pc64 s46
call pc64 s47
call pc64 s48
call pc64 s49
call pc64 s50
call pc64 s51
call pc64 s52
call pc64 s53
call pc64 s54
call pc64 s55
call pc64 s56
call pc64 s57
call pc64 s58
call pc64 s59
call pc64 s60
call pc64 s61
call pc64 s62
call pc64 s63
call pc64 s64
call pc64 s65
call pc64 s66
call pc64 s67
call pc64 s68
call pc64 s69
call pc64 s70
call pc64 s71
call pc64 s72
call pc64 s73
call pc64 s74
call pc64 s75
call pc64 s76
call pc64 s77
call pc64 s78
call pw32  s79
call pc64 s80
call pc64 s81
call pc64 s82
call pc64 s83
call pc64 s84
call pc64 s85
call pc64 s86
call pc64 s87
call pc64 s88
call pc64 s89
call pc64 s90
call pc64 s91
call pc64 s92
call pc64 s93
call pc64 s94
call pc64 s95
call pc64 s96
call pc64 s97
call pc64 s98
call pc64 s99
call pc64 s100
call pc64 s101
call pc64 s102
call pc64 s103
call pc64 s104
call pc64 s105
call pc64 s106
call pc64 s107
call pc64 s108
call pc64 s109
call pc64 s110
call pc64 s111
call pc64 s112
call pc64 s113
call pc64 s114
call pc64 s115
call pc64 s116
call pc64 s117
call pc64 s118
call pc64 s119
call pc64 s120
call pc64 s121
call pc64 s122
call pc64 s123
call pc64 s124
call pc64 s125
call pc64 s126
call pc64 s127
call pc64 s128
call pc64 s129
call pc64 s130
call pc64 s131
call pc64 s132
call pc64 s133
call pc64 s134
call pc64 s135
call pc64 s136
call pc64 s137
call pc64 s138
call pc64 s139
call pc64 s140
call pc64 s141
call pc64 s142
call pc64 s143
call pc64 s144
call pc64 s145
call pc64 s146
call pc64 s147
call pc64 s148
call pc64 s149
call pc64 s150
call pc64 s151
call pc64 s152
call pc64 s153
call pc64 s154
call pc64 s155

del  *.obj

pause


Same basic idea when compiling all the GUI demos but I simplify the process by using one
batch that calls all the individual BUILD.BAT batch files in each GUI and DLL demo folder.

Below is the batch file that I use to build all the GUI demos in one shot.  GLOBAL is a command
line utility by Steve Miller
which recurses the sub-folders of my GUI_DEMO folder.  See link
to Steve Miller's website below.

Code: [Select]

global -i if exist build.bat @build

echo Compiling completed ...

pause


REF:  https://stevemiller.net/apps/
« Last Edit: April 14, 2022, 04:32:58 PM by MrBcx »

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #2 on: April 09, 2022, 02:22:34 AM »
Hi,
I have used your batch files as above to convert and compile the updated console demo files (not tried the GUI files yet). Thank you.
However, I get a number of errors (as listed in the attached text file).
I'm using BCX BASIC to C/C++ Translator (c) 1999-2022 by Kevin Diggins
Version 7.8.2 (03/21/2022) Built with LLVM-CLANG for 64-bit Windows Systems

and

Pelles ISO C Compiler, Version 11.00.3

I'm using Windows 10 Pro 64 bit version 21H2 (10.0.19044.1586)

I have disabled any anti-virus software temporarily.

I really like using BCX, and I'd like to help to solve these errors if I can. Please let me know if there is anything I can do. Thanks.


MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2330
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #3 on: April 09, 2022, 08:51:50 AM »
Hi David,

Remove -x from all 155 BC s### lines in your batch file

When you remove Windows headers (-x), you remove the ability for compilers to know the values of Windows-specific symbol names.

That should resolve things for you but, if not, just ask.

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #4 on: April 09, 2022, 09:58:01 AM »
I have recompiled the console demo's with the -x removed. I now have 5 that don't compile and 1 that has just warnings (please see attached text file). A big improvement, and I hope these 5 can be done as well. Thanks.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2330
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #5 on: April 09, 2022, 10:28:11 AM »
I have recompiled the console demo's with the -x removed. I now have 5 that don't compile and 1 that has just warnings (please see attached text file). A big improvement, and I hope these 5 can be done as well. Thanks.

You are compiling in 64-bit.

s46           There is a header bug compiling to 64-bit with Pelles C    MSVC compiles to 64-bit no errors / no warnings

s71 and s77 : Please read:  https://bcxbasiccoders.com/smf/index.php?topic=657.msg3080#msg3080   

s73          Functions that rely on LIB cannot be compiled to 64-bit

s79          This is an early example that must be compiled as a GUI app not a CONSOLE app .
               It is left in the CON_DEMOS for continuity.   
               See:    https://bcxbasiccoders.com/smf/index.php?topic=179.msg762#msg762             

s155         Only Lcc-Win32 will compile this without WARNINGS.  Warnings are not errors.
 
« Last Edit: April 09, 2022, 12:45:31 PM by MrBcx »

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #6 on: April 09, 2022, 10:33:01 AM »
Kevin, thank you.
I will move onto the GUI examples next.
I might try other compilers later.

David

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #7 on: April 09, 2022, 01:46:39 PM »
I'm getting 1 last error.

Code: [Select]
Pelles C is compiling (s77) as a 64-bit Console app
s77.c(606): error #2048: Undeclared identifier 'READNUM' (did you mean: ?).
POLINK: fatal error: File not found: 's77.obj'.
Completed ...

I changed variable Read to dwRead as mentioned in

https://bcxbasiccoders.com/smf/index.php?topic=657.msg3080#msg3080

I have attached S77.BAS and S77.C for your perusal. Thanks.

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #8 on: April 09, 2022, 01:54:33 PM »
Ignore my last post. I had forgotten to change one last Read variable to dwRead. Now it compiles properly. Thanks.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2330
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #9 on: April 09, 2022, 02:01:41 PM »
For other readers:

FUNCTION = Read

should be

FUNCTION = dwRead

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #10 on: April 10, 2022, 03:02:57 AM »
Kevin,
Do you have a batch file you can share for building the Gui_Demo examples efficiently? I'm having to go into each directory and change the PW text to PW64 in each of the Build.bat files. I've managed to copy the PW64.bat file to each subdirectory, OK.
I used this command

@echo off
for /D %%a in ("C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\*.*") do xcopy /y /d C:\Users\david\Desktop\BCX_LATEST\PW64.bat "%%a\"

Anything obvious I'm missing? Thanks.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2330
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #11 on: April 10, 2022, 03:46:25 AM »
David - Please re-read the 2nd post in this thread.

djsb

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #12 on: April 10, 2022, 05:47:05 AM »
I used a command line program called FART (find and replace text) using this command

Code: [Select]

C:\Users\david\Desktop\BCX_LATEST>fart -i -r "C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Build.Bat" pw pw64
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\3Dframe\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Alert\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Amort\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Ani-Icon\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\App_Ico\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Banner\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Barchart\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bcx-Avi\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bcx-Win\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bcxdog\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bcxedit\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bcxgl\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bcxruler\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bcxworld\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bitmap1\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bitmap2\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Blobs\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Bmp_Ico\Build.Bat
C:\Users\david\Desktop\BCX_LATEST\Gui_Demo\Stopwtch\Build.Bat
Replaced 20 occurence(s) in 19 file(s).

C:\Users\david\Desktop\BCX_LATEST>


To find and replace the text.

https://emtunc.org/blog/03/2011/farting-the-easy-way-find-and-replace-text/

I notice that there are a number of other commands in the Build.bat files, such as LW. Which particular compilers are these meant to be compiled with? Is LW meant to call LCC-WIN32 for instance?
« Last Edit: April 10, 2022, 05:51:07 AM by djsb »

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2330
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #13 on: April 10, 2022, 09:07:11 AM »
The 2020 GUI DEMOS can be found on the User Contributions board of this forum.

Those batch files use Pelles C not LccWin32.

https://bcxbasiccoders.com/smf/index.php?topic=390.0


The original GUI demos relied on LccWin32 and its batch files
« Last Edit: April 10, 2022, 09:10:26 AM by MrBcx »

Robert

  • Hero Member
  • *****
  • Posts: 1245
    • View Profile
Re: Using the latest BCX with PellesC 11.00.3-How?
« Reply #14 on: April 10, 2022, 01:44:33 PM »
The 2020 GUI DEMOS can be found on the User Contributions board of this forum.

Those batch files use Pelles C not LccWin32.

https://bcxbasiccoders.com/smf/index.php?topic=390.0


The original GUI demos relied on LccWin32 and its batch files

Hi MrBCX:

Thanks for these updated demos. No .exes, I like that.

When the Gui_Demos.zip archive was updated there was no notice given on the forum other than your note appended to the original post, so I missed that event.