0
我爲avr使用了編譯源代碼gcc。我的GCC配置選項有:我如何知道我在編譯mac?
${PWD}/../gcc/configure --prefix="${PWD}/../build/" --exec-prefix="${PWD}/../build/" --datadir="${PWD}/../build/" --target=avr --enable-languages=c --disable-libssp --disable-lto --disable-nls --disable-libgomp --disable-gdbtk --disable-threads --enable-poison-system-directories
當我使用預處理的下面的代碼片段魔術
#if defined __APPLE__
#error "Apple"
#else
#error "Ahh"
#endif
它輸出
error: #error "Ahh"
如果我跑avr-cpp -dM version.h
我看是沒有定義__APPLE__
。如果我運行cpp -dM version.h
我看到__APPLE__
被定義。我需要在配置行(或其他地方)更改以使我的編譯源代碼gcc具有正確定義的__APPLE__
?
我正在編譯avr的mac,因爲正在爲avr編譯windows。
我檢查'__APPLE__'它沒有定義,'AVR-CPP -dM version.h'沒有列出它可以是'cpp -dM version.h'。所以,在我的gcc版本中,有些東西沒有被定義。 – Justin808 2012-03-03 00:35:30