pb6.00 a3 - first compile gives error, second compile ok

All bugs related to new C backend
User avatar
DoubleDutch
Addict
Addict
Posts: 3205
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

pb6.00 a3 - first compile gives error, second compile ok

Post by DoubleDutch »

In my large program, the first time I compile (c compiler only) I get this error, if I recompile after that - no errors!

Image

It doesn't matter if it's NOT that program that is compiled first - as long as IT is not the first one compiled! Eg, I compile (using the C compiler) a much smaller program first then that one - no issue!

How do I see the purebasic.c program that is passed to the final C compiler part from the Editor? That way I can compare the first try and the second try and post the difference?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Fred
Administrator
Administrator
Posts: 14413
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: pb6.00 a3 - first compile gives error, second compile ok

Post by Fred »

You need to use the CLI compiler to use the /COMMENTED switch and get the purebasic.c file
User avatar
DoubleDutch
Addict
Addict
Posts: 3205
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: pb6.00 a3 - first compile gives error, second compile ok

Post by DoubleDutch »

On the command line there appears to be no problem.
G:\OneDrive\Desktop\Projects\ReportComplete>"C:\Program Files\PureBasic\Compilers\pbcompilerc.exe" reportcomplete.pb /THREAD /XP /USER /ICON "Images\liveicon.ico"

******************************************
PureBasic 6.00 Alpha 3 - C Backend (Windows - x64)
******************************************

Loading 'C' subsystem
Compiling reportcomplete.pb
Loading external libraries...
Starting compilation...
Including source: PurePDF_res.pb
Including source: PurePDF.pb
Including source: RW_LibCurl_Inc2.pbi
Including source: RotateImage.pbi
Including source: DBin.pbi

G:\OneDrive\Desktop\Projects\ReportComplete>
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Fred
Administrator
Administrator
Posts: 14413
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: pb6.00 a3 - first compile gives error, second compile ok

Post by Fred »

New alpha 4 will have a better error message in the IDE, so may be it will help to locate the issue.
User avatar
DoubleDutch
Addict
Addict
Posts: 3205
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: pb6.00 a3 - first compile gives error, second compile ok

Post by DoubleDutch »

Thanks, I'll give it a try (as soon as it's available)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3205
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: pb6.00 a3 - first compile gives error, second compile ok

Post by DoubleDutch »

With pba4 I get a crash when trying to compile (using the editor's 'compile/run' or 'create executable' menu items) my program to the c compiler, the asm compiler works fine.

Image

Other programs compile with both compilers.

Update: If I do this then it compiles ok and works!
%FILE /COMMENTED /THREAD /XP /USER /ICON "Images\liveicon.ico"
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3205
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: pb6.00 a3 - first compile gives error, second compile ok

Post by DoubleDutch »

It looks like the code is compiled with the editor, but it crashes early in, if compiled (either compiler) and run with the editor.

But if I put this in my code then there is no crash.

MessageRequester("crash","here 1")

So I'll put in later and later into execution to figure out what may be causing it.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3205
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: pb6.00 a3 - first compile gives error, second compile ok

Post by DoubleDutch »

Looks like moving that line lower and lower, to figure out the problem doesn't work.

I pasted the 'MessageRequester("crash","here 1")' in a little into the (large) program rather that at line 1.

If I compile/run (with debugger on), I get an assembler error and the editor locks up (has to be closed via task manager)
Image

If I 'compile/run' (without the debugger on) OR 'compile to an exe', I get a compiler error. The editor doesn't lock up.
Image

If I run this from this tool, the program compiles and executes ok:
%FILE /COMMENTED /THREAD /XP /USER /ICON "Images\liveicon.ico"
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Post Reply