[4.51] Create EXE with included file - (not a) bug
Posted: Sun Jul 10, 2011 2:04 am
EDIT: Already covered here: http://www.purebasic.fr/english/viewtop ... =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:
2. Create a second file called Include.pb in the same directory, and enter just this:
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.
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: Select all
Procedure TestProc()
Debug "All OK!"
EndProcedure
XIncludeFile "Include.pb"
EndCode: Select all
TestProc() ; Calls procedure declared in Main.pb4. 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.