PB IDE Editor/jaPBe compile project question
PB IDE Editor/jaPBe compile project question
Hello all,
I am a newbie to PB and am still working the green curve. My projects have many files in them and have slowly been porting them over fro VB6 to PB.
During compile time, it seems that if the main project file is NOT the file selected , neither the PB IDE nor the jaPBe IDE will compile the project, but rather will try to compile only the single file which is currently selected.
Is there a setting that allows the entire project to be compiled regardless of which file is the currently selected one? This is a bit of a pain since when compiling all of the Global variables, constants etc are held in one file along with EnableExplicit. So the compiler will complain unnecessarily.
Thank you in advance!
Tim
I am a newbie to PB and am still working the green curve. My projects have many files in them and have slowly been porting them over fro VB6 to PB.
During compile time, it seems that if the main project file is NOT the file selected , neither the PB IDE nor the jaPBe IDE will compile the project, but rather will try to compile only the single file which is currently selected.
Is there a setting that allows the entire project to be compiled regardless of which file is the currently selected one? This is a bit of a pain since when compiling all of the Global variables, constants etc are held in one file along with EnableExplicit. So the compiler will complain unnecessarily.
Thank you in advance!
Tim
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PB IDE Editor/jaPBe compile project question
Hi Tim
I have not used this myself but if you save your code as an actual PB Project (pbp file), then in Compiler/Set Default Target/ you can flag your main code file as the one to start compiling from.
http://www.purebasic.com/documentation/ ... piler.html
Edit: Tried it out, have to say that I don't find PB Project Management to be intuitive - it's very confusing in fact
I have not used this myself but if you save your code as an actual PB Project (pbp file), then in Compiler/Set Default Target/ you can flag your main code file as the one to start compiling from.
http://www.purebasic.com/documentation/ ... piler.html
Edit: Tried it out, have to say that I don't find PB Project Management to be intuitive - it's very confusing in fact

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: PB IDE Editor/jaPBe compile project question
Yes, it is VERY confusing. However, I do have a project created, and the default target is set. This actually *has* to be done, otherwise it wont even compile. Nevertheless, it appears that the active file must be the main project file. Kind of a PIA - hope someone can enlighten me on a way to compile the *project* regardless of which file has focus.
Tim
Tim
Re: PB IDE Editor/jaPBe compile project question
> Nevertheless, it appears that the active file must be the main project file. Kind of a PIA - hope someone can enlighten me on a way to compile the *project* regardless of which file has focus.
The active file just has to belong to the project. Use "Project->Add file to project" and it should work.
The active file just has to belong to the project. Use "Project->Add file to project" and it should work.
quidquid Latine dictum sit altum videtur
- deeproot
- Enthusiast
- Posts: 284
- Joined: Thu Dec 17, 2009 12:00 pm
- Location: Llangadog, Wales, UK
- Contact:
Re: PB IDE Editor/jaPBe compile project question
Works fine as freak says - any project file compiles the target (using the standard IDE).The active file just has to belong to the project. Use "Project->Add file to project" and it should work.
I'm in a similar situation, lots of VB6 code and now in the middle of my largest, very complex program port. I had a fairly slow start with PB, originally using single files, then moved to a Project. I must say that I found the project option of the PB IDE works better than I expected - no complaints (just my opinion). I don't attempt a one-to-one module conversion, so I have fewer but larger files.
Geoff
Re: PB IDE Editor/jaPBe compile project question
Maybe I made a mistake, in that not all files were originally included. I went back in the PB IDE and double checked, not all were included in the project.
In jaPBe, which in some ways I think is better than the std PB IDE, project stuff is not clear at all. Kind of muddy actually. What I found was that the project seems to be somewhat based on the included files (IncludeFile xxxx). Not really sure since I kind of did several changes at once between the two IDE's.
For my project deeproot, I have also broken some of them up, into a better organized set of files. Most of the porting work right now is typing, removing keywords like "Then", "Case (Select Case xx)" and Exit Function/Sub etc.....
Will get to the core of this sometime next week I imaging....
Tim
In jaPBe, which in some ways I think is better than the std PB IDE, project stuff is not clear at all. Kind of muddy actually. What I found was that the project seems to be somewhat based on the included files (IncludeFile xxxx). Not really sure since I kind of did several changes at once between the two IDE's.
For my project deeproot, I have also broken some of them up, into a better organized set of files. Most of the porting work right now is typing, removing keywords like "Then", "Case (Select Case xx)" and Exit Function/Sub etc.....
Will get to the core of this sometime next week I imaging....
Tim
Re: PB IDE Editor/jaPBe compile project question
I just tried jaPBe, and if I do not click on the main file before clicking the compile button, the entire project is not included in the compile. It errors. In my case, I can see this easily since the compiler complains of missing variable declarations that are contained in a separate file. If I click first on the main file, this complaint does not happen.
However, this is NOT the case with the PB editor. PB does work correctly.
Tim
However, this is NOT the case with the PB editor. PB does work correctly.
Tim
Re: PB IDE Editor/jaPBe compile project question
Btw, you don't need to use the projects feature. You can also simply keep each project in a separate directory, and in all included files, set the main file in the compiler options. Then compiling will always start with this file.
Re: PB IDE Editor/jaPBe compile project question
Trond,
My files are all under one folder, but are broken into a sub folder as well. I agree that my original statement about the std PB IDE was incorrect. It does compile regardless of which file has the focus. The jaPBe IDE does not however. For some reason, I like the jaPBe IDE better EXCEPT for this huge PIA. It is impossible to work with, as it is, for me. I use EnableExplicit and so it has to have all of the files present. The other thing is, it opens every single file that is listed as an included file. They can be closed, but there is alot of them to do. The project tool for PB does a better job for sure.
Anyway, thank you all again for your responses!
Tim
My files are all under one folder, but are broken into a sub folder as well. I agree that my original statement about the std PB IDE was incorrect. It does compile regardless of which file has the focus. The jaPBe IDE does not however. For some reason, I like the jaPBe IDE better EXCEPT for this huge PIA. It is impossible to work with, as it is, for me. I use EnableExplicit and so it has to have all of the files present. The other thing is, it opens every single file that is listed as an included file. They can be closed, but there is alot of them to do. The project tool for PB does a better job for sure.

Anyway, thank you all again for your responses!
Tim
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PB IDE Editor/jaPBe compile project question
Since the old days, jaPBe had file lists (*.pbfl).tseyfarth wrote:... It does compile regardless of which file has the focus. The jaPBe IDE does not however. For some reason, I like the jaPBe IDE better EXCEPT for this huge PIA. ...
A file list is like a project, you can define what files (*.pb/*.pbi) are in the project [Menu:File->Save Filelist], and define a main file [Menu:Project->Main file], which is the file that will be compiled when you hit F5/F6, even if you are not on the main source tab.
That's how the jaPBe project itself is managed.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PB IDE Editor/jaPBe compile project question
Not on topic, but for PB IDE, I thought AutoComplete only works if your files are in a project?Trond wrote:Btw, you don't need to use the projects feature. You can also simply keep each project in a separate directory, and in all included files, set the main file in the compiler options. Then compiling will always start with this file.
This is a huge benefit of Project use. (I don't use declares either.)
...Or are you using jaPBe?
Re: PB IDE Editor/jaPBe compile project question
I took a week/10 days off from this project but will be back on it shortly.
I have been using/trying both. The jaPBe is better in some respects, worse in others.
I had not been pushing F5 or F6 but clicking on the menu. I would expect the same to happen using either command but will try them to see if there is a difference.
I had not seen a file list on the File menu before, although not knowing what it was, or what to look for, I would have overlooked it too.
When I resume on this project, will definitely try this out.
Thanks for your reply!
Tim
I have been using/trying both. The jaPBe is better in some respects, worse in others.
I had not been pushing F5 or F6 but clicking on the menu. I would expect the same to happen using either command but will try them to see if there is a difference.
I had not seen a file list on the File menu before, although not knowing what it was, or what to look for, I would have overlooked it too.
When I resume on this project, will definitely try this out.
Thanks for your reply!
Tim
Re: PB IDE Editor/jaPBe compile project question
You can set autocomplete to work for all opened files.skywalk wrote:Not on topic, but for PB IDE, I thought AutoComplete only works if your files are in a project?Trond wrote:Btw, you don't need to use the projects feature. You can also simply keep each project in a separate directory, and in all included files, set the main file in the compiler options. Then compiling will always start with this file.
This is a huge benefit of Project use. (I don't use declares either.)
...Or are you using jaPBe?
Re: PB IDE Editor/jaPBe compile project question
@Trond, you are correct.
I mis-stated my problem...
If I am editing a Tool or any non-project file, the Context sensitive help does not show up in the PB IDE statusbar.
Strange that all the Autocomplete stuff works.
I do not want to temporarily add the file to the project, cause that is a pain.
I mis-stated my problem...
If I am editing a Tool or any non-project file, the Context sensitive help does not show up in the PB IDE statusbar.

Strange that all the Autocomplete stuff works.
I do not want to temporarily add the file to the project, cause that is a pain.
Re: PB IDE Editor/jaPBe compile project question
This is not a problem for me (but I don't use projects). If I create a new file with a Procedure Hello(Fst.l, Snd.s) and then create yet another file and type Hello(, the statusbar shows the procedure declaration.skywalk wrote:@Trond, you are correct.
I mis-stated my problem...
If I am editing a Tool or any non-project file, the Context sensitive help does not show up in the PB IDE statusbar.
Are you sure you selected the correct option regarding autocomplete? Try "the current project or all files (if none)" or "all open files".