Hey all !
I made a server in pb. And it is going to be executed on linux, so I have to compile it into linux executable format .
And the problem is, I don't know how to do that in linux and I don't have hours to spend trying to do it.
So I was wondering if there is a way to compile it into linux from windows OS ? (kind of..simulation) And if there is, how to do ?!?
(In my server I only use createfile/deletefile, linkedlists, and of course networking functions. No graphical interface, no messagerequester,...)
One more question : is that all right under linux :
createfile(0, "myfile.txt")
Or should I write
createfile(0,"/ThePathWhereMyExecutableIs/myfile.txt")
Or both are wrong?
Thank you in advance !
Create a linux executable file using windows ???
You are not able to crosscompile your server from Windows(r) to get a Linux binary.
You have to setup a working PB installation on Linux to do that. It's not possible to do that via Cygwin either.
You can use a virtual-Box oder VMWare Image and run a linux (there are several working Image-Files with all needed libs to run PB on the web).
Or just run a Ubuntu-VM-Ware image and use the tutorial from the forum. Will take you less than 10 minutes to have it working.
The path basically should work, if you start the binary from a user's home directory or from another path, we're the owner+executor has write-permission. But if you place your binary in /bin/ a normal user will not have write-permission, so the file won't be created.
Therefore it's better to use or something similar. Important is, that the user/executor of the file has writing permission to the directory. Also, it will keep your filesystem much more clean not to place those files "anywhere".
Hope this helps.
You have to setup a working PB installation on Linux to do that. It's not possible to do that via Cygwin either.
You can use a virtual-Box oder VMWare Image and run a linux (there are several working Image-Files with all needed libs to run PB on the web).
Or just run a Ubuntu-VM-Ware image and use the tutorial from the forum. Will take you less than 10 minutes to have it working.
The path basically should work, if you start the binary from a user's home directory or from another path, we're the owner+executor has write-permission. But if you place your binary in /bin/ a normal user will not have write-permission, so the file won't be created.
Therefore it's better to use
Code: Select all
createfile(0, GetHomedirectory+'myfile.txt')Hope this helps.
cheers,
bembulak
bembulak
Re: Create a linux executable file using windows ???
Hii,
I want to do the same but i have no idea of What is VirtualBox.
Can anyone plzzz guide me with detail step by step process of it.
I have worked on windows for a while but have never used Linux.
Thanks
Chandan
I want to do the same but i have no idea of What is VirtualBox.
Can anyone plzzz guide me with detail step by step process of it.
I have worked on windows for a while but have never used Linux.
Thanks
Chandan
Re: Create a linux executable file using windows ???
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.



