Author Topic: Lots of Errors and warnings  (Read 8662 times)

djsb

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Lots of Errors and warnings
« on: June 01, 2020, 10:45:56 AM »
I've tried compiling All the example console demo files (S00 to S155) using BCX and PellesC and I'm getting lots of ERRORS and warnings on a few of the files. I have attached a couple of text files that have the standard and error output messages from the console as well as the batch files I'm using.
Am I doing something wrong or are the demo files known to not work with the latest version of PellesC? I'm using PellesC V9 and BCX V7.46. Any help appreciated. Thanks.

Robert

  • Hero Member
  • *****
  • Posts: 1256
    • View Profile
Re: Lots of Errors and warnings
« Reply #1 on: June 01, 2020, 11:25:46 AM »
I've tried compiling All the example console demo files (S00 to S155) using BCX and PellesC and I'm getting lots of ERRORS and warnings on a few of the files. I have attached a couple of text files that have the standard and error output messages from the console as well as the batch files I'm using.
Am I doing something wrong or are the demo files known to not work with the latest version of PellesC? I'm using PellesC V9 and BCX V7.46. Any help appreciated. Thanks.

Where did you get the demos?

djsb

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Lots of Errors and warnings
« Reply #2 on: June 01, 2020, 11:41:12 AM »
The demo's where installed when I executed the setup file included with the attached bcx_install.zip.

David.

Robert

  • Hero Member
  • *****
  • Posts: 1256
    • View Profile
Re: Lots of Errors and warnings
« Reply #3 on: June 01, 2020, 12:01:51 PM »
The demo's where installed when I executed the setup file included with the attached bcx_install.zip.

David.

Hi David:

NEVER EVER PUT PROGRAMMING STUFF IN A PATH WITH SPACES IN IT!

Uninstall the Pelles C compiler and reinstall to a PATH\folder that does not have spaces in it.

I have my setup with a C:\dev folder where I put all my compilers and programming stuff.

Once that is done, try again with S00.bas. If it has any warnings or errors do not waste your time continuing but post here and we will continue the analysis.

What operating system are you running?


djsb

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Lots of Errors and warnings
« Reply #4 on: June 01, 2020, 12:37:41 PM »
I have reinstalled PellesC to C:\PellesC and changed the PATH in my batch files. I have rerun the Batch files again and also just S00.Bas from the command line. Same output as last time. I'm using Windows 10 Pro 64 bit Version 1909 Build 18363.836.

Robert

  • Hero Member
  • *****
  • Posts: 1256
    • View Profile
Re: Lots of Errors and warnings
« Reply #5 on: June 01, 2020, 12:57:39 PM »
Try this batch file, PC32R.bat, which compiles .c files and assumes resource files are in a subfolder named "res" in the folder holding the file to be compiled. Watch out for line wrap!

Code: [Select]

setlocal
@rem Created with BldBat Version.4.1.2 for PellesC (Console)
@ECHO OFF
IF NOT EXIST %1.c GOTO usage
CALL C:\PellesC\Bin\povars32.bat
IF EXIST %1.res GOTO res
IF NOT EXIST "res\%~1.rc" GOTO nores
ECHO Compiling resources.....
C:\PellesC\Bin\porc.exe "res\%~1.rc" /i res /fo "%~1.res"
:res
IF EXIST %1.res SET PRES="%~1.res"
:nores
ECHO Compiling "%~1.c"..........
C:\PellesC\Bin\pocc.exe /W1 /Ot /MT /Go /Gd /Ze /Zx /Tx86-coff -D__STDC_WANT_LIB_EXT2__=1 -D_WIN32_WINNT=0x501 "%~1.c"
ECHO Linking ................
C:\PellesC\Bin\polink.exe /release /MACHINE:X86 /SUBSYSTEM:CONSOLE,5.01 "%~1.obj" %PRES% %2 %3 %4 %5 %6 %7 %8 %9 /out:"%~1.exe"
ECHO Finished!
IF EXIST "%~1.obj" del "%~1.obj"
GOTO done
:usage
ECHO **************************************************************
ECHO  Usage:  PC32R.BAT MainFile  ExtraFile1 ExtraFile2 ExtraFile3
ECHO  Note:   ExtraFiles can be .libs, .res , .obj
ECHO          Compile a console mode program with Pelle's C.
ECHO **************************************************************
:done
endlocal

djsb

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Lots of Errors and warnings
« Reply #6 on: June 01, 2020, 01:18:19 PM »
I've just run that and the results are attached. I notice the object files have been deleted (or not reproduced as I've done a clean out between each batch file run just leaving the .bas files).

I've also been making sure any anti-virus is turned off just in case.

Robert

  • Hero Member
  • *****
  • Posts: 1256
    • View Profile
Re: Lots of Errors and warnings
« Reply #7 on: June 01, 2020, 01:29:11 PM »
Hi David:

Uninstall the Pelles C compiler and redownload from

http://www.smorgasbordet.com/pellesc/900/setup.exe

and reinstall.


djsb

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Lots of Errors and warnings
« Reply #8 on: June 01, 2020, 01:46:02 PM »
Done that. I've attached the output below. I'm having a rest from this for now. I'll be back from Tuesday PM or Wednesday for another go.

Robert

  • Hero Member
  • *****
  • Posts: 1256
    • View Profile
Re: Lots of Errors and warnings
« Reply #9 on: June 01, 2020, 01:53:49 PM »
Done that. I've attached the output below. I'm having a rest from this for now. I'll be back from Tuesday PM or Wednesday for another go.

If you're still there can you post s00.c?

Robert

  • Hero Member
  • *****
  • Posts: 1256
    • View Profile
Re: Lots of Errors and warnings
« Reply #10 on: June 01, 2020, 01:54:53 PM »
Done that. I've attached the output below. I'm having a rest from this for now. I'll be back from Tuesday PM or Wednesday for another go.

If you're still there can you post s00.c?

zip it up and attach it.

djsb

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Lots of Errors and warnings
« Reply #11 on: June 01, 2020, 02:00:07 PM »
S00.c is attached as requested. Thanks.

Robert

  • Hero Member
  • *****
  • Posts: 1256
    • View Profile
Re: Lots of Errors and warnings
« Reply #12 on: June 01, 2020, 02:19:59 PM »
S00.c is attached as requested. Thanks.

Windows headers not being generated.

Remove the -x from your batch files

Code: [Select]
call C:\BCX\Bin\bc  s01 -x
should be

Code: [Select]
call C:\BCX\Bin\bc  s01

djsb

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Lots of Errors and warnings
« Reply #13 on: June 01, 2020, 03:04:29 PM »
I've removed the -x command line switch. A lot more of the programs have compiled succesfully (including S00.bas). However there are still quite a few with errors (see attached output file) and a few missing .c and .exe files. I'll have a go at tracking down the errors if I can later. Maybe the -x is needed on a few of the files? Thanks.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2392
    • View Profile
Re: Lots of Errors and warnings
« Reply #14 on: June 01, 2020, 05:53:01 PM »
I've removed the -x command line switch. A lot more of the programs have compiled succesfully (including S00.bas). However there are still quite a few with errors (see attached output file) and a few missing .c and .exe files. I'll have a go at tracking down the errors if I can later. Maybe the -x is needed on a few of the files? Thanks.

David,

The relatively few errors that you're seeing revolve around various changes to BCX, Pelles C, and Windows in the many years since BCX_Install.zip was created.  Unless you need something in any of those samples that are failing, I would say you are mostly good to go.  I do have some updated versions of the samples that I've threaten to upload but today is not that day.