簡體   English   中英

如何強制emmake使用config.h文件並進行預處理?

[英]How to force emmake use config.h file and do preprocess?

我正在嘗試使用emscripten(latest)構建項目,並且已經完成了emconfigure ./configure。 現在嘗試做emmake make。 但是它找不到預處理指令中所需的new.h文件,我敢肯定,本機配置可以使配置文件很好。 它可以使用本地品牌進行編譯。 因此,問題是如何使emmake進行正確的預處理?

#if defined(UNDER_CE)
# ifndef __WCEALT_H__
inline void * operator new(size_t, void * ptr) { return ptr; }
# endif
#elif defined(AUTOCONF) && defined(HAVE_STDINCLUDES)
# include <new>
#else
# include <new.h>
#endif

PS:也許有人知道在編譯之前如何進行預處理? 要刪除無用的代碼? 類似於g++ -e或類似的東西,但是我找不到具有大型項目的良好工作流程。

PS:輸出emmake:

libtool: compile:  /Users/tau0/reader/emsdk_portable/emscripten/1.16.0/em++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -c GOS.cpp  -fno-common -DPIC -o .libs/GOS.o
In file included from GOS.cpp:63:
In file included from ./GException.h:120:
./DjVuGlobal.h:72:11: fatal error: 'new.h' file not found
# include <new.h>
      ^
1 error generated.

默認情況下,Emconfigure禁用stl,因此請檢查新的config.h中是否有HAVE_STDINCLUDES。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM