| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1774 人关注过本帖
标题:vc6.0下如何实现wxwindows框架的程序
取消只看楼主 加入收藏
向前进
Rank: 2
等 级:论坛游民
帖 子:7
专家分:20
注 册:2010-10-6
结帖率:0
收藏
已结贴  问题点数:10 回复次数:1 
vc6.0下如何实现wxwindows框架的程序
最近在学习《c++核心思想》一书
在522页有这样一个程序:
#include<wx/wx.h>
/* a basic application that shows an empty frame
*/
class BasicApp:public wxApp //wxwindow框架的函数名都是以大写的字母开头的
{
public:
    /*constructs the frame.*/
    BasicApp();
    /*shows the frame. return true*/
    virtual bool OnInit();
private:
    wxFrame* frame;
};
DECLARE_APP(BasicApp)
IMPLEMENT_APP(BasicApp)
BasicApp::BasicApp()
{
    frame=new wxFrame(NULL,-1,"Yes,I can!");
}
bool BasicApp::OnInit ()
{
    frame->Show(true);
    return true;
}
我在网上下了个wxWidgets-2.8.7编译并搭建了开发环境:
编译通过
但build:
------------------Configuration: 图形界面test001 - Win32 Debug--------------------
Linking...
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _calloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _malloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _toupper already defined in LIBCD.lib(toupper.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strchr already defined in LIBCD.lib(strchr.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strncmp already defined in LIBCD.lib(strncmp.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _tolower already defined in LIBCD.lib(tolower.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strstr already defined in LIBCD.lib(strstr.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _memmove already defined in LIBCD.lib(memmove.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _realloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtol already defined in LIBCD.lib(strtol.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtoul already defined in LIBCD.lib(strtol.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _abort already defined in LIBCD.lib(abort.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fflush already defined in LIBCD.lib(fflush.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __close already defined in LIBCD.lib(close.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __write already defined in LIBCD.lib(write.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __commit already defined in LIBCD.lib(commit.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __get_osfhandle already defined in LIBCD.lib(osfinfo.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __open_osfhandle already defined in LIBCD.lib(osfinfo.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __snprintf already defined in LIBCD.lib(snprintf.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __CrtSetDbgFlag already defined in LIBCD.lib(dbgheap.obj)
LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library
wxmsw28d_core.lib(app.obj) : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
wxmsw28d_core.lib(statbr95.obj) : error LNK2001: unresolved external symbol __imp__CreateStatusWindowA@16
wxmsw28d_core.lib(spinbutt.obj) : error LNK2001: unresolved external symbol __imp__CreateUpDownControl@48
wxmsw28d_core.lib(listctrl.obj) : error LNK2001: unresolved external symbol __imp__ImageList_GetIconSize@12
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_GetIconSize@12
wxmsw28d_core.lib(listctrl.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Draw@24
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Draw@24
wxmsw28d_core.lib(listctrl.obj) : error LNK2001: unresolved external symbol __imp__ImageList_GetImageCount@4
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_GetImageCount@4
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Create@20
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Create@20
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Destroy@4
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Destroy@4
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Add@12
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Add@12
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_AddMasked@12
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_ReplaceIcon@12
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_ReplaceIcon@12
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Replace@16
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_Remove@8
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_SetBkColor@8
wxmsw28d_core.lib(imaglist.obj) : error LNK2001: unresolved external symbol __imp__ImageList_GetIcon@12
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_SetDragCursorImage@16
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_BeginDrag@16
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_EndDrag@0
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_DragMove@8
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_DragEnter@12
wxmsw28d_core.lib(dragimag.obj) : error LNK2001: unresolved external symbol __imp__ImageList_DragLeave@4
wxmsw28d_core.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__UuidToStringA@8
wxmsw28d_core.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__RpcStringFreeA@4
wxmsw28d_core.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__UuidCreate@4
wxmsw28d_core.lib(uuid.obj) : error LNK2001: unresolved external symbol __imp__UuidFromStringA@8
Debug/图形界面test001.exe : fatal error LNK1120: 25 unresolved externals
执行 link.exe 时出错.

图形界面test001.exe - 1 error(s), 0 warning(s)
这是怎么回事呀?
跪求各位高手看看,指点指点~~~~~!!!!
搜索更多相关主题的帖子: 框架 wxwindows 
2010-10-06 15:20
向前进
Rank: 2
等 级:论坛游民
帖 子:7
专家分:20
注 册:2010-10-6
收藏
得分:0 
谢谢你的建议!顺便问一下,高手,你平时编图像界面程序时觉得最大的困难是什么,你又会如何解决!
我刚自学完c++的一部分,现在正弄图形界面程序。
新手上路,请多多指教!
2010-10-09 14:52
快速回复:vc6.0下如何实现wxwindows框架的程序
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012521 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved