Page 1 of 2
Problems passing options to the shell compiler...
Posted: Mon Jan 05, 2004 4:41 am
by DeeCee
I'm not sure if this is a bug or a case of "newbie-ness", but I cannot seem to get the shell compiler to accept any arguments.
Example 1:
According to the doc's, the /? should present a list of options. Instead, I get:
$ pbcompiler /?
******************************************
PureBasic Linux x86 v3.81
******************************************
The file '/?' isn't found or can't be opened !
Example 2:
Compiling while using the /EXE "filename" option is supposed to create an executable using the name specified. Here are the results copied diectly from the shell:
$ pbcompiler /EXE "test" Example.pb
******************************************
PureBasic Linux x86 v3.81
******************************************
Loading external modules...
Starting compilation...
33 lines processed.
Creating the executable.
- Feel the ..PuRe.. Power -
**Note- In this case the executables *are* being generated, but always as "purebasic.exe" instead of the name specified.
Any ideas or tips?
-DeeCee-
Posted: Mon Jan 05, 2004 9:12 am
by robink
pbcompiler -h
lists alls options and you can create an executable with:
pbcompiler -e filename filename.pb
Posted: Mon Jan 05, 2004 1:11 pm
by Christian
Hi!
This should really be included in the help. I've also searched for this.
But why does the Debugger (pbcompiler -d code.pb) does not work? I've tried to compile a easy ...
... but it didn't work.
best regards,
Christian
Posted: Mon Jan 05, 2004 1:19 pm
by robink
Ok i tried to compile that too, and i get an error message:
Code: Select all
******************************************
PureBasic Linux x86 v3.81
******************************************
Loading external modules...
Starting compilation...
3 lines processed.
Creating the executable.
gcc: purebasic.o: No such file or directory
- Feel the ..PuRe.. Power -
robin@robin:~/purebasic$ sh: line 1: ./purebasic.exe: No such file or directory
Posted: Mon Jan 05, 2004 1:22 pm
by Saboteur
robink wrote:Ok i tried to compile that too, and i get an error message:
Code: Select all
******************************************
PureBasic Linux x86 v3.81
******************************************
Loading external modules...
Starting compilation...
3 lines processed.
Creating the executable.
gcc: purebasic.o: No such file or directory
- Feel the ..PuRe.. Power -
robin@robin:~/purebasic$ sh: line 1: ./purebasic.exe: No such file or directory
I get this error when I try to compile a program that access to Linux API

Posted: Mon Jan 05, 2004 1:32 pm
by Christian
@robink:
Exactly the same like me! Strange ...
This is also a strange thing: Every time compiling a code, this 'purebasic.exe' is compiled.
@Saboteur:
Which Linux API commands? GTK, SDL or other? Perhaps you have some example?
best regards,
Christian
Posted: Mon Jan 05, 2004 1:46 pm
by robink
The purebasic.exe is your compiled program, you can change the outputfile with -e filename.
Posted: Mon Jan 05, 2004 2:34 pm
by Saboteur
I tried to compile the example: linux_api.pb (in examples/sources), but with no exit.
Posted: Mon Jan 05, 2004 9:07 pm
by TronDoc
I have something different on RedHat 9..
..I can compile fine, but cannot execute from the terminal window.
If I use the file browser and double click, then the program runs.
..a simple console app I cannot get the executable to run either
from the terminal window nor the file browser; however,
if I just pbcompiler filename.pb
it runs from the terminal window and outputs there..
..I think I saw something about that in another posting; so please
excuse another (Linux) newbie...
Joe
Posted: Tue Jan 06, 2004 10:59 am
by Saboteur
The exactly message I get with linux_api.pb is:
Code: Select all
******************************************
PureBasic Linux x86 v3.81
******************************************
Loading external modules...
Starting compilation...
24 lines processed.
Creating the executable.
gcc: c: No such file or directory
- Feel the ..PuRe.. Power -
8O
Posted: Tue Jan 06, 2004 12:49 pm
by Christian
@RobinK:
This seems to be logical.

But why is this file an exe-file? I think this is windows specific?
@TronDoc:
I'm not sure, but the help says that the console functions just run under windows.
@Saboteur:
OK ... know it becomes scary. Have the same problem now, too. But I know exactly that the linux_API.pb example worked fine, some days ago. So there is a problem with the libgcc ...
Tried to include the gcc-library in the code and it worked then:
Code: Select all
lib.l = OpenLibrary(1, "/lib/libgcc_s.so.1")
*Buffer = CallFunction(1, "malloc", "10000")
If *Buffer
MessageRequester("PureBasic", "Memory allocated", 0)
; Free the memory block by calling 'free'
CallFunction(1, "free", Buffer)
EndIf
CloseLibrary(1)
End
I don't know what distro you have, but I hope the lib is on the same place like mine. If not, try to find it on your system.
So purebasic have a problem to find the lib. Don't know why ... (perhaps Fred has an idea?) ... nevertheless it's strange that it worked first without including the lib directly.
regards,
Christian
PS: Perhaps anybody else tries the linux_API.pb example?
Posted: Tue Jan 06, 2004 1:15 pm
by robink
Some of the console functions are working under Linux and i can execute console applications
from the terminal but not from the filemanager.
I've got the same problem with the linux_api.pb and Christian's code works on my pc.
Posted: Tue Jan 06, 2004 4:31 pm
by TronDoc
Christian wrote:PS: Perhaps anybody else tries the linux_API.pb example?
Code: Select all
[trondoc@TronDoc samples]$ pbcompiler linux_api.pb -e linux_api.bin
******************************************
PureBasic Linux x86 v3.81
******************************************
Loading external modules...
Starting compilation...
24 lines processed.
Creating the executable.
gcc: c: No such file or directory
- Feel the ..PuRe.. Power -
[trondoc@TronDoc samples]$
looks like it doesn't work here either!

Posted: Tue Jan 06, 2004 5:20 pm
by Christian
Seems really to be a bug. I'll send a PN to Fred.
best regards,
Christian
Posted: Tue Jan 06, 2004 10:18 pm
by pbdep
I dont see the problem? Works fine here...
pbdep.