编译wx \samples\html\virtual Topic is solved

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
morya
Experienced Solver
Experienced Solver
Posts: 96
Joined: Fri Dec 14, 2007 2:29 am
Location: Xuzhou, China

编译wx \samples\html\virtual

Post by morya »

我发现,我无法使用dll unicode debug 模式编译这个sample
我重新编译过wx两次
我编译wx使用如下命令
rem bat file

call nmake /f makefile.vc SHARED=1 UNICODE=1 BUILD=debug
call nmake /f makefile.vc SHARED=1 UNICODE=1 BUILD=release

del /s *.obj

可是,我编译virtual的时候,总是被提示下面的error

wxmsw28ud_core.lib(wxmsw28ud_core_vc.dll) : error LNK2005: "public: __thiscall wxSize::wxSize(int,int)" (??0wxSize@@QAE@HH@Z) already defined in wxmsw28ud_html.lib(htmllib_m_image.obj)
wxbase28ud.lib(wxbase28ud_vc.dll) : error LNK2005: "public: __thiscall wxString::~wxString(void)" (??1wxString@@QAE@XZ) already defined in wxmsw28ud_html.lib(htmllib_m_image.obj)
wxbase28ud.lib(wxbase28ud_vc.dll) : error LNK2005: "public: __thiscall wxCharBuffer::~wxCharBuffer(void)" (??1wxCharBuffer@@QAE@XZ) already defined in wxmsw28ud_html.lib(htmllib_helpdata.obj)
wxbase28ud.lib(wxbase28ud_vc.dll) : error LNK2005: "public: __thiscall wxString::wxString(wchar_t const *)" (??0wxString@@QAE@PB_W@Z) already defined in wxmsw28ud_html.lib(htmllib_m_image.obj)
wxbase28ud.lib(wxbase28ud_vc.dll) : error LNK2005: "public: __thiscall wxCharBuffer::operator char const *(void)const " (??BwxCharBuffer@@QBEPBDXZ) already defined in wxmsw28ud_html.lib(htmllib_helpdata.obj)
wxbase28ud.lib(wxbase28ud_vc.dll) : error LNK2005: "public: static class wxAppConsole * __cdecl wxAppConsole::GetInstance(void)" (?GetInstance@wxAppConsole@@SAPAV1@XZ) already defined in wxmsw28ud_html.lib(htmllib_helpctrl.obj)
wxbase28ud.lib(wxbase28ud_vc.dll) : error LNK2005: "public: __thiscall wxEventTableEntry::wxEventTableEntry(int const &,int,int,void (__thiscall wxObject::*)(class wxEvent &),class wxObject *)" (??0wxEventTableEntry@@QAE@ABHHHP8wxObject@@AEXAAVwxEvent@@@ZPAV1@@Z) already defined in wxmsw28ud_html.lib(htmllib_htmllbox.obj)
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library

不知道谁可以帮我确认一下,到底是我步骤有误,还是这个wxHtml lib 编译设定不好

我使用vc直接打开build\msw\wx.dsw这个生成的库就没有问题了。。。
估计,build\msw\makefile.vc有点问题。
在应该使用/MDd的时候,没有使用,所以,包含了wxbase wxcore的库。

当然,我编译virtual的时候,是使用vc打开工程文件然后设定必要项来的,如果用命令行,应该 nmake /f makefile.vc SHARED=1 UNICODE=1 等等
Last edited by morya on Thu Jul 03, 2008 8:17 am, edited 1 time in total.
00061205
Knows some wx things
Knows some wx things
Posts: 41
Joined: Mon Jun 16, 2008 3:43 am
Location: Beijing, China

Post by 00061205 »

我之前自己编译wxWidgets后也有点毛病。我怀疑是你编译wx时有错误而你没注意到。建议直接下载安装wxpack。这个包含了所有已编译好的wx。
http://wxpack.sourceforge.net/Main/Downloads
Regards,

00061205
morya
Experienced Solver
Experienced Solver
Posts: 96
Joined: Fri Dec 14, 2007 2:29 am
Location: Xuzhou, China

Post by morya »

我觉得,我编译选项没有问题,我使用VC打开工程文件可以,以前2.8.7也是一直用这个bat文件编译的,我觉得,应该还是makefile哪里没有生成好
Utensil
Moderator
Moderator
Posts: 423
Joined: Sun Feb 03, 2008 11:38 am
Location: China

Post by Utensil »

我编译Virtual没有问题。不过我使用MinGW编译的。

我到时试试用vc编,看看怎么样。

-Utensil
In fascination of creating worlds by words, and in pursuit of words behind the world.

On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
Post Reply