1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| /* */
#ifdef __cplusplus
#error This source file is not C++ but rather C. Please use a C-compiler
#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "gn_gnu.h"
int main(int argc, char *argv[])
{
#ifdef GN_GNU /* to be defined externally */
printf("\nLuckily defined: 13=%d\n", H_EDI);
#endif
#ifndef GN_GNU /* to be undefined externally */
printf("Not defined. %s\n", AAA);
#endif
return 0;
}
/* x86_64-w64-mingw32-gcc-7.3.0.exe -DGN_GNU -Wall -ansi -std=c99 gn_gnu.c -o gn_gnu.exe
./gn_gnu.exe */ |