Revisited-Serial Communication using BCX-Is this possible?

Started by djsb, June 02, 2025, 11:35:56 AM

Previous topic - Next topic

MrBcx

The build.bat calls pw.bat which is missing from the zip.

pw.bat is used to compile the user interface.

build.bat also builds the 32-bit dll, so when building the UI, be sure to build it for 32-bit.
You cannot use a 32-bit dll from a 64-bit exe and vice-versa.

Your batch files need to set the path of where you have Pelles C installed.

Below  is a pw.bat that will compile the user interface to 32-bit using Pelles


@setlocal
@ECHO off
IF NOT EXIST %1.c GOTO USAGE
 
SET  PellesCDir=C:\Pellesc
SET  PATH=%PellesCDir%\Bin;%PATH%
SET  INCLUDE=%PellesCDir%\Include;%PellesCDir%\Include\Win;%INCLUDE%
SET  LIB=%PellesCDir%\Lib;%PellesCDir%\Lib\Win;%LIB%

SET  PoccOPTS= /std:c17 -Tx86-coff -Ob1 -fp:precise -W1 -Gd -Ze -Zx -Go /D NTDDI_VERSION=0x0A000007
SET  PolinkOPTS=/release /machine:X86 /subsystem:windows,5.01 /STACK:10485760             
SET  PolinkLIBS=kernel32.lib advapi32.lib delayimp.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib ole32.lib oleaut32.lib
 
call c:\pellesc\bin\pocc  %PoccOPTS%    %1.c
call c:\pellesc\bin\polink %PolinkLIBS%  %PolinkOPTS%  %DPIFILE%  %1.obj %2 %3 %4 %5 %6 %7 %8 %9

GOTO done

:USAGE
ECHO **************************************************************
ECHO  For building 32-bit Gui apps using Pelles C Compiler
ECHO  Usage:  PW32  "C" FileName  [Optional Linker Files: 2-9]
ECHO  Example: PW32    MyGuiApp      MyIcons.res  MyManifest.res
ECHO **************************************************************
:done
@endlocal



djsb

At some point I'm going to try compiling the attached code kindly provided by MrBCX, Ian Casey and Robert in this post. As usual, I allowed myself to get sidetracked and didn't try the code any sooner. Better late than never, I suppose.

https://bcxbasiccoders.com/smf/index.php?topic=698.msg3347#msg3347

Using BED 3.69, BCX 8.2.7 and Pelles ISO C Compiler, Version 13.00.9. I'm going to have to change the batch file/s at the very least. Are there any other adjustments I should make? Thanks.