You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was going to ask a question about how to make a preprocessor define when running this project from the command line. But with a bit of extra Googling, I was able to figure it out. So I'm just leaving the answer here in case it's useful to anyone else!
To define a C# preprocessor symbol, you'd normally (i.e. with the actual C# compiler) use the command line switch /define:MY_SYMBOL. So in this project you wrap that with the -csc option, like this: -csc '/define:MY_SYMBOL'.
Now you can have conditional compilation in your C# code, like so: (assuming you define USE_LUA when compiling to Lua:)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Very cool project btw!
I was going to ask a question about how to make a preprocessor define when running this project from the command line. But with a bit of extra Googling, I was able to figure it out. So I'm just leaving the answer here in case it's useful to anyone else!
To define a C# preprocessor symbol, you'd normally (i.e. with the actual C# compiler) use the command line switch
/define:MY_SYMBOL
. So in this project you wrap that with the-csc
option, like this:-csc '/define:MY_SYMBOL'
.Now you can have conditional compilation in your C# code, like so: (assuming you define
USE_LUA
when compiling to Lua:)Beta Was this translation helpful? Give feedback.
All reactions