- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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 kopiert
4 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
--- 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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
RTFM:
Try: gcc -E -dM empty_file.c __NIOS2__- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
--- 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...

Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite