Combining Compiler Conditions
BlitzMax Forums/BlitzMax Programming/Combining Compiler Conditions
| ||
Hey, I was actually just extremely disappointed when this gave me an error: ?Threaded 'stuff in here is only to be compiled in threaded mode ?Win32 And Threaded 'does not work?! 'compile whatever here only in threaded mode on a win32 os! Now, I am running out of ideas.. the following do not work either: - ?Win32, Threaded - ?Threaded Win32 '<= that would rock :P I need to combine those conditions! But how? |
| ||
Yeah... that's unfortunate. It's "bcc" which deals with this. Perhaps you can raise it as a bug, because it does somewhat limit what you can do. |
| ||
Though I found my workaround, it is pretty ugly and I appreciate better ideas. Here I go:File "ROOT.BMX" ============================================= ?Threaded Include "ROOT_THREADED_WIN32.bmx" File "ROOT_THREADED_WIN32".BMX" ============================= ?Win32 Print "You are running threaded mode on Win32!" Ineffectice and ugly, as I said. But at least it works. |
| ||
Shouldn't this work?:?Threaded ?Win32 ' ... ? ? |
| ||
@Plash: That was my first assumption actually, but the conditions are not being nested, and it's not working either. Unfortunately :( Please consider my post above yours (we posted at the same time)! |
| ||
I've always wondered why we can't do this. Cheers Charlie |
| ||
What if you put your threaded stuff in a separate file and just change the name of the Include when you want to compile different versions, which is not often? |
| ||
@IH: Well, a similar kind of include-file-workaround is what I already posted right after Brucey ;) ..different versions, which is not often? Rather unfortunately, in my case it is pretty often. |