- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my code I can do something like:
# ifdef _WIN32
....
# endif
To only include code on a Windows target. Is there a similar symbol that is automatically defined by the NIOS IDE when compiling? I am making a library that I am debugging on Windows and would like to include both NIOS and Windows code separated in this manor, and I would prefer an automatic symbol over a custom made one.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can define any symbol you want in the build->preprocessor options.
If you don't want to add extra symbols and use default project settings, I think you can exploit ALT_DEBUG and ALT_RELEASE.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- You can define any symbol you want in the build->preprocessor options. If you don't want to add extra symbols and use default project settings, I think you can exploit ALT_DEBUG and ALT_RELEASE. --- Quote End --- Those might be good... for extra portability across projects I would rather it be something default as opposed to something we assigned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RTFM:
Try: gcc -E -dM empty_file.c __NIOS2__- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- RTFM: Try: gcc -E -dM empty_file.c __NIOS2__ --- Quote End --- I RTFM, however this detail somehow managed to escape my memory (weird right?)... Anyways that's what I wanted so I'll let you're smugness slide... This time...
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page