Restored from previous forum. Originally posted by Paul.
Just wondering how one would go about compiling a project to run under Linux or the Amiga? I see there is a seperate version of PureBasic for the Amiga and Windows but what about Linux?
Compiling on Multi Platform
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Mr.Skunk.
I think that if you use ONLY the included commands within PB (not API call or asm inline), you can compile your project without any modification for amiga/windows/linux version...
And if you want to use non implemented function, you can use the compiler directives:
CompilerSelect #OS
CompilerCase #AmigaOS
; some Amiga specific code
CompilerCase #Linux ; some Linux specific code
CompilerEndSelect
or
CompilerIf
...
[CompilerElse]
...
CompilerEndIf
But you have to write the specific code for all the version you want your program to be compiled to.
Mr Skunk
I think that if you use ONLY the included commands within PB (not API call or asm inline), you can compile your project without any modification for amiga/windows/linux version...
And if you want to use non implemented function, you can use the compiler directives:
CompilerSelect #OS
CompilerCase #AmigaOS
; some Amiga specific code
CompilerCase #Linux ; some Linux specific code
CompilerEndSelect
or
CompilerIf
...
[CompilerElse]
...
CompilerEndIf
But you have to write the specific code for all the version you want your program to be compiled to.
Mr Skunk