Author Topic: Newbies want tips on troubleshooting  (Read 744 times)

jos

  • Newbie
  • *
  • Posts: 12
    • View Profile
Newbies want tips on troubleshooting
« on: May 05, 2024, 01:58:21 PM »
Hello,
Make progress every day! But would like tips on how to most easily find errors when you get something like this:

Code: [Select]
BCX BASIC to C/C++ Translator (c) 1999-2024 by Kevin Diggins
Version 8.0.8 (12/27/2023) Compiled using MS Visual C++ for 64-bit Windows Systems
[Lines In: 1350] [Lines Out: 3830] [Statements: 1622] [Time: 0.07 Sec's]
BCX translated [Wsmulti.Bas] to [Wsmulti.C] for a C Compiler
****************************************************** **************************
Pelles C is compiling [ "C:\BED\Demos\Con_Demo\Bcx Multithreaded Webserver Stable Version\WSMulti".c ] as a 32-bit CONSOLE application.
fatal error #1061: Unable to open file 'C:\BED\Demos\Con_Demo\Bcx'.
POLINK: fatal error: Cannot find file 'C:\BED\Demos\Con_Demo\Bcx.obj'.

Does not create any .obj file. Suspect there is some files missing?

There is a note about: ** Note: NEED TO - link with wsock32.lib and msvcrt.lib

To test further I Moving "Wsmulti.C" to Pelles C and trying to Compile and link files and getting these errors

Code: [Select]
Building C:\Users\JOS\Documents\Pelles C Projects\wsmulti\output\WSMulti.obj.
C:\Users\JOS\Documents\PellesC\Include\Win\winnt.h(562): #1014: #error: "No target architecture".
*** Error code: 1 ***
Done.

Why doesn't this compile?

Gets stuck on weirdness like this and doesn't get any further. I want to learn how to troubleshoot and move forward in these situations.

Thanks in advance

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2538
    • View Profile
Re: Newbies want tips on troubleshooting
« Reply #1 on: May 05, 2024, 02:13:09 PM »
Pelles C does not like paths with spaces:

Pelles C is compiling [ "C:\BED\Demos\Con_Demo\Bcx Multithreaded Webserver Stable Version\WSMulti".c ] as a 32-bit CONSOLE application.


fatal error #1061: Unable to open file 'C:\BED\Demos\Con_Demo\Bcx'.


Rename your folder from:

"C:\BED\Demos\Con_Demo\Bcx Multithreaded Webserver Stable Version

to

"C:\BED\Demos\Con_Demo\Bcx_Multithreaded_Webserver_Stable_Version

and try again.

jos

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Newbies want tips on troubleshooting
« Reply #2 on: May 05, 2024, 03:19:49 PM »
Thanks,

Now I got a bit further.
But seems to be a missing file: POLINK: fatal error: Cannot find file 'msvcrt.lib'. Searched the computer and it's not there? But It doesn't seem like it's needed?

Now it compiles without problems.

Thanks

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2538
    • View Profile
Re: Newbies want tips on troubleshooting
« Reply #3 on: May 05, 2024, 04:45:45 PM »
Thanks,

Now I got a bit further.
But seems to be a missing file: POLINK: fatal error: Cannot find file 'msvcrt.lib'. Searched the computer and it's not there? But It doesn't seem like it's needed?

Now it compiles without problems.

Thanks

My hunch is that the web server that you're trying to compile was coded when BCX users were using Lcc-Win32, several
years before Pelles C was first released.  Lcc-Win32 came with these files:  msvcrt.lib and msvcrtd.lib but Pelles C does not.

You might be able to compile and link by removing the msvcrt.lib dependency. 
If you get it working, good job!  Note that there are easier examples for learning BCX.
 

jbk

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
Re: Newbies want tips on troubleshooting
« Reply #4 on: May 05, 2024, 06:52:39 PM »
you can make a lib file for a dll in PellesC, just type:
if 32-bit
polib yourdll.dll /machine:x86 /out:yourdll.lib
if 64-bit
polib yourdll.dll /machine:x64/out:yourdll.lib