Groups
Groups
Sign in
Groups
Groups
emscripten-discuss
Conversations
About
Send feedback
Help
preprocessor
23 views
Skip to first unread message
Shawn Riordan
unread,
Oct 5, 2020, 2:21:11 PM
10/5/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
If I wanted my code to have a custom preprocessor definition, how do I pass that on the emcc commandline?
Lets say I want my C++ code to have something like:
#ifdef FOO
printf("foo");
#endif
how do I set the value of FOO when I run emcc?
Shawn Riordan
unread,
Oct 5, 2020, 2:47:09 PM
10/5/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
Would it be "-D"?
As in, to enable foo:
em++ -D FOO=1
to disable foo
em++ -D FOO=0
?
Shawn Riordan
unread,
Oct 5, 2020, 11:32:30 PM
10/5/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
BTW, this seems to be correct.
Reply all
Reply to author
Forward
0 new messages