看板Programming
標 題如何移除特定的 conditional compilation?
發信站交大資訊次世代BS2 (Wed Apr 11 01:31:43 2007)
轉信站ptt!ctu-reader!ctu-peer!news.nctu!news.cis.nctu!BS2
prog.c
-------------------
#include <stdio.h>
#ifdef FOO
void foo(){ ...}
#endif
#ifdef BAR
void bar(){ ...}
#endif
int main(){ ... }
請問有沒有只移除 FOO conditional compilation 的方法?
使得 prog.c 簡化成:
#include <stdio.h>
#ifdef BAR
void bar(){ ...}
#endif
int main(){ ... }
最好是用 gcc / cpp 可以直接做到
如果有其他工具也歡迎
謝謝
--
▄▄▄▄▄▄▄ ▄▄▄▄ ▄▄▄▄▄▄ <telnet://bbs.cs.nctu.edu.tw>
█▄▄▄▄█ █ ▄▄▄▄▄█ Player: roylee
▄█▄▄▄▄█ ▄▄▄█ █▄▄▄▄▄ From: 203-73-27-239.adsl.dynamic.
☆ 次世代BS2 ☆ 可申請個人板
150MB 相簿 http://pic.bs2.to 交大資訊人 250MB