[Compiler Request] Make the compiler use the IDE options
[Compiler Request] Make the compiler use the IDE options
It would be great if the compiler could parse the IDE options inside the source file. Maybe using a new compiler switch like /IDEOPTIONS ?
Would make it a lot easier to switch between batch and IDE compiling.
Would make it a lot easier to switch between batch and IDE compiling.
Re: [Compiler Request] Make the compiler use the IDE options
Since we have projects now it would be cool if either the IDE or compiler could compile project targets from the commandline.
Re: [Compiler Request] Make the compiler use the IDE options
I totally agree.mback2k wrote:Since we have projects now it would be cool if either the IDE or compiler could compile project targets from the commandline.
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: [Compiler Request] Make the compiler use the IDE options
I just run into the same problem:
we have a projekt with one zentral program which starts other programs.
All programs are written in PB and shares at least 2 pbi files.
So if something is changed in one of these 2 files we have to compile all pb files.
For that I wrote a batch file and ...
I have to add for each different file several different options like
/exe .. /icon ... and for some /thread
It would really a lot easier if there is a parameter that the compiler uses the info from inside of the file.
For now I'm writing a PB program which scans the files, creates the batchfile and run it.
Bernd
we have a projekt with one zentral program which starts other programs.
All programs are written in PB and shares at least 2 pbi files.
So if something is changed in one of these 2 files we have to compile all pb files.
For that I wrote a batch file and ...
I have to add for each different file several different options like
/exe .. /icon ... and for some /thread
It would really a lot easier if there is a parameter that the compiler uses the info from inside of the file.
For now I'm writing a PB program which scans the files, creates the batchfile and run it.
Bernd
Last edited by infratec on Thu Nov 07, 2013 1:43 pm, edited 1 time in total.
Re: [Compiler Request] Make the compiler use the IDE options
+1, I was about to make that feature request too!mback2k wrote:Since we have projects now it would be cool if either the IDE or compiler could compile project targets from the commandline.

Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: [Compiler Request] Make the compiler use the IDE options
The IDE can build projects/target from commandline: http://www.purebasic.com/documentation/ ... dline.html
Re: [Compiler Request] Make the compiler use the IDE options
Oh wow, how did I miss that... 

Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: [Compiler Request] Make the compiler use the IDE options
I would still prefer the pbcompiler use the data within the source code.
It seems more direct and I don't have to bother with the xml project files or resource files.
Is the IDE code to read in the version info not easily added to the pbcompiler.exe?
This works but I lose all version info in my dll or exe.
For now, I run a tool from the IDE but this requires more clicks.
It seems more direct and I don't have to bother with the xml project files or resource files.
Is the IDE code to read in the version info not easily added to the pbcompiler.exe?
This works but I lose all version info in my dll or exe.

Code: Select all
c:\Program Files\PureBasic\Compilers>pbcompiler c:\myproj\myapp.pbi /EXE c:\myproj\myapp.dll /DLL
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: [Compiler Request] Make the compiler use the IDE options
> I would still prefer the pbcompiler use the data within the source code
Yes, it'd be good to have commands like "EnableThreadSafety" so we
don't need to set it in the options. Even on these forums, people post
code samples and have to put comments to remind us to enable thread
safety and so on. If it were a command, it would just work.
Yes, it'd be good to have commands like "EnableThreadSafety" so we
don't need to set it in the options. Even on these forums, people post
code samples and have to put comments to remind us to enable thread
safety and so on. If it were a command, it would just work.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: [Compiler Request] Make the compiler use the IDE options
This one is not possible to set in the code, as it's a global switch (it uses different code generation). You can put a check with CompilerIf #PB_Compiler_ThreadSafe = 0 and CompilerError to force that.
Re: [Compiler Request] Make the compiler use the IDE options
Regarding the original feature request: It would still be great to have a console-type application that is able to compile using project files. The problem with using the IDE is that it opens a new console window if you run it from within a console shell.