Win32 bcc on Linux?

BlitzMax Forums/BlitzMax Programming/Win32 bcc on Linux?

BORNtobeNAMELESS(Posted 2009) [#1]
Is there a way to switch the linux native bcc into win32 mode, so i can compile a bmx-file for windows on linux? At the moment i have to use wine for bcc and fasm(Because fasm needs to unserstand the incbin paths it gets from bcc) to do so.
Or would it be possible to compile the win32-bcc as a native linux binary? I think bcc does not use any platform-dependend code. A cmdline-switch would of course be the best solution.


plash(Posted 2009) [#2]
http://www.blitzbasic.com/Community/posts.php?topic=84840


Mark Tiffany(Posted 2009) [#3]
The question is actually still valid, as Brucey's process also runs bcc.exe under wine. As per the above, it would be nice if bcc could be recompiled (or have the option) to run natively on linux and macos, but generate output for win32.

As it stands, all that seems to prevent macos from being the one-stop shop of choice for BlitzMax cross-compilers is the existence of a copy of the linux bcc compiled to run on Intel MacOS. If Mr Sibly were to provide copies of bcc for each platform (or make it an option on any platform), then a few more cross-compilation options will emerge...


Brucey(Posted 2009) [#4]
Or would it be possible to compile the win32-bcc as a native linux binary?

Drop BRL an email and see what they say.


skidracer(Posted 2009) [#5]
I'm not entirely positive but I would guess the only difference between the two builds of bcc is the format declaration output on the first line.

You may be able to simply rewrite the first line of the .s output from "format ELF" to "format MS COFF" before invoking fasm and be on your way. maybe....


Brucey(Posted 2009) [#6]
No, I already looked at this, and there appears to be differences all the way through - although most of it is similar.


BORNtobeNAMELESS(Posted 2009) [#7]
I'd like to know if there if the chance for a solution to this sometimes in the future? I can't image that it would be very complicated to build in a command line switch to select the target OS.


Brucey(Posted 2009) [#8]
You mean like this?
./bmk makemods -l win32



BORNtobeNAMELESS(Posted 2009) [#9]
This would be great, too.
But the first step for this would be a bcc that runs native on Linux(Not using wine) but outputs Win32 asm.


Brucey(Posted 2009) [#10]
But the first step for this would be a bcc that runs native on Linux(Not using wine) but outputs Win32 asm.

As far as I know, this is very unlikely to happen (anytime soon).

In the case of using wine, I can honestly say that running my BMK on my 4-core Linux box, it still appears to build at the same speed as my native Linux compilation. (I haven't sat and timed it though, so this assertion is merely through basic observation)
Anyway, installing wine only took me a minute or so, with absolutely no configuration on the part of wine itself. I simply had my BMK build script execute bcc via wine.

The other thing you are of course forgetting with your native bcc problem, is that you will *still* need win32/mingw native ld/ar binaries, and the set of .a dll stubs in BlitzMax/lib.

Or you go in the direction I took, which requires a copy of MinGW for Linux. This also allows you to rebuild all the modules (and 3rd-party modules), which would be impossible otherwise.