我必須在Windows上使用cgicc構建「概念驗證」。但目前我無法構建cgicc。當前版本的cgicc v3.2.9在MinGW(gcc v4.5.0/v3.4.5)和Cygwin(gcc v4.3.4-3)中都不會生成。gnu cgi(cgicc)不能在使用MinGW/Cygwin的Windows上使用gcc編譯
通過gcc v3.4.5及Automake在MinGW的我:
HTMLAttributeList.cpp:51: internal compiler error: in rest_of_handle_final, at toplev.c:2067 Please submit a full bug report, with preprocessed source if appropriate.
使用GCC v4.3.4及Automake給出了Cygwin的:
In file included from CgiEnvironment.cpp:36: ../cgicc/CgiEnvironment.h:52: error: explicit instantiation of 'class std::vector<cgicc::HTTPCookie, std::allocator<cgicc::HTTPCookie> >' in namespace 'cgicc' which does not enclose namespace 'std')
和GCC V4.5.0中MinGW的:
../cgicc/CgiEnvironment.h:52:33: error: explicit instantiation of 'class std::vector<cgicc::HTTPCookie>' in namespace 'cgicc' (which does not enclose namespace 'std')
我試圖忽略Automake和Autoconf腳本。我設置了Eclipse的CDT使用apropriate編譯器開關(我也嘗試代碼::塊):
-DHAVE_CONFIG_H -DWIN32 -I.. -Wall -W -pedantic -g -DDLL_EXPORT -DPIC -DCGICC_EXPORTS
但同樣我:
explicit instantiation of 'class std::vector<cgicc::HTTPCookie, std::allocator<cgicc::HTTPCookie> >' in namespace 'cgicc' (which does not enclose namespace 'std') CgiEnvironment.h /cgicc/cgicc line 52
CgiEnvironment.h:51〜53行中包含ifdef WIN32:
#include <string>
#include <vector>
#include <cstdlib>
namespace cgicc {
...
#ifdef WIN32
template class CGICC_API std::vector<HTTPCookie>;
#endif
...
}
出了什麼問題?有什麼建議麼?
這是在文件CgiDefs.h中完成的,它包含在受影響的類文件的頭文件中。順便說一下,如何使用代碼標籤將代碼添加到此文本框?
– kirsche40 2011-02-01 21:29:22