![]() |
compile GNU/Linux binaries in Windows
... It's just possible, this is what you need :)
http://filebase.bots-united.com/inde...on=file&id=278 It's actually just a mere build of the MinGW source code with some extra configs, as MinGW and GNU/Linux version of gcc are actually the same code. |
Re: compile GNU/Linux binaries in Windows
|
Re: compile GNU/Linux binaries in Windows
it's just a GCC built under Windows in this way:
./configure --prefix=c:/gcc-gnulinux --target=i686-pc-linux-gnu make make install Actually MinGW and *NIX gcc are the same code, this just enabled the GNU/Linux compiling instead of default MinGW Windows compiling. It should compile the same as GNU/Linux, but perhaps you need some extra libraries to compile something other than bots. |
Re: compile GNU/Linux binaries in Windows
Can it do cross-compiles? I'd be interested in compiling native Linux binaries for my metamod stuff without needing to upload my sources each time on the BU server.
|
Re: compile GNU/Linux binaries in Windows
I just tried it with pbmm but it seems to create a .so file twice the size of when it is compiled on linux and also gets a badf load...:(
can i compile on the BU server too? |
Re: compile GNU/Linux binaries in Windows
Anybody who has a shell account on the BU machine can compile his plugins... but I think you don't have one yet because you don't have any website for your bot. One more reason to change that :)
|
Re: compile GNU/Linux binaries in Windows
well I've found the problem... try NOT to use "-march" parameter (like -march=i586 or so) and use "_i386.so" as the end of the filename and it should work in Metamod
also note that "gcc" is the C compiler, and "g++" is the c++ compiler so make sure you are compiling C++ code with "g++" command. but the file size is still big, as it's totally staticly linked. |
Re: compile GNU/Linux binaries in Windows
well you also need to use the "-static" parameter...
here's the work Makefile PHP Code:
|
Re: compile GNU/Linux binaries in Windows
Works fine, thanks! :)
btw, I've just found another similiar way to compile win32 binaries from linux 8D: http://www.wxwidgets.org/technote/crosscmp.htm |
Re: compile GNU/Linux binaries in Windows
Yes, and I believe that's what Will Day does with metamod, he compiles everything on GNU/Linuts :)
|
All times are GMT +2. The time now is 01:15. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.