It is currently Mon May 20, 2013 2:27 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [4.51] Create EXE with included file - (not a) bug
PostPosted: Sun Jul 10, 2011 2:04 am 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 932
Location: New York
EDIT: Already covered here: viewtopic.php?f=7&t=40225

Not sure if this qualifies as an IDE bug or not... it concerns the "Main source file" option which I like and use often.

Example:
1. Create a file called Main.pb, and enter this:
Code:
Procedure TestProc()
  Debug "All OK!"
EndProcedure

XIncludeFile "Include.pb"

End


2. Create a second file called Include.pb in the same directory, and enter just this:
Code:
TestProc() ; Calls procedure declared in Main.pb


3. Now open Include.pb in the IDE, and in compiler options set "Main source file" to Main.pb.

4. With Include.pb open, do a Compile/Run (just press F5). It should correctly run Main.pb, which in turn includes Include.pb.

5. With the same Include.pb open, try to do a Create Executable. It will report that TestProc is not a procedure, as if it is only compiling Include.pb, yet it will open Main.pb and highlight the line that's actually erroneous in Include.pb!

If that doesn't make sense, try it and you'll see what I mean. It's much more obvious in a large project, like the one I discovered this in. Basically Compile/Run will compile the "Main source file" but Create Executable will not, then open it to report an error.

This might not be a bug, but is counterintuitive.


Last edited by kenmo on Sat Aug 06, 2011 11:28 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: [4.51] Create EXE with included file - bug?
PostPosted: Sun Jul 10, 2011 9:44 am 
Offline
User
User

Joined: Sun Oct 24, 2004 9:25 am
Posts: 61
See my thread with Freak on the matter :
http://www.purebasic.fr/english/viewtopic.php?f=7&t=40225&p=308396#p308318.
in short: use "Projects" instead.

Nevertheless, I second your view of the situation.

_________________
Is this an artifact or should it be disposed of ?


Top
 Profile  
 
 Post subject: Re: [4.51] Create EXE with included file - bug?
PostPosted: Sun Jul 10, 2011 7:48 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 932
Location: New York
Ah sorry, didn't see that before, I only looked quickly in the Editor forum.

I guess it is fine how it is, now that I figured out why it "randomly" wouldn't compile, but it would still be a nice change in the future.

Thanks Jinguji.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye