如何用wxWidgets 2.8.7 写一个DLL来导出一个UI

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am

如何用wxWidgets 2.8.7 写一个DLL来导出一个UI

Post by kevin_fly »

各位前辈,经朋友介绍,刚加入这个论坛,心里非常高兴,很高兴认识大家(因为我们都在用wxWidgets)。

我现在用VS2003+wxWidgets2.8.7做一个跨平台的UI,要做成DLL的形式供其他程序使用,但是在编译时出现了批量的连接错误,郁闷ing~~~

附件是我的代码,有兴趣的给看一下问题何在?

哪位兄台有没有现成的例子给参考一下,非常感谢!
Attachments
wxDLL_App_2.8.7.rar
使用wxWidgets2.8.7做一个跨平台的含UI的DLL
(10.89 KiB) Downloaded 251 times
soaringhawkzf
Knows some wx things
Knows some wx things
Posts: 35
Joined: Sun Nov 12, 2006 4:54 am

Post by soaringhawkzf »

可以参考一下我以前写的
http://sourceforge.net/projects/muop-ws
kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am

Post by kevin_fly »

非常感谢,我看看你的代码,如果有问题,还希望能得到您的帮助,再次感谢!
kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am

Post by kevin_fly »

例子我看了一下,和我的需求差别还是比较大,不过还是非常感谢你的帮助!
期待高人指点。。。
kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am

Post by kevin_fly »

the question has resolved.
the attachment is the source code, the version of wxWidgets that i used is 2.8.7
Attachments
wxDLL_App_2.8.7.rar
(10.05 KiB) Downloaded 293 times
jnsting
In need of some credit
In need of some credit
Posts: 5
Joined: Wed May 28, 2008 1:01 pm

Post by jnsting »

很高兴看到你的例子。我真在做同样的事情。但是对于你的例子,我还有一些疑问?这个例子能在LINUX下编译运行吗?
看代码,你没有include windows.h,但是include了wx/msw/private.h。这样的话,是不是还是 windows specific的。
Utensil
Moderator
Moderator
Posts: 423
Joined: Sun Feb 03, 2008 11:38 am
Location: China

Post by Utensil »

楼主的代码的确是只能在Windows下用的。

jnsting,关于你在http://forums.wxwidgets.org/viewtopic.php?p=84375提出的问题,咱们还是在这讨论吧。两个中国人互说英文,还是会有些沟通障碍的 :wink:

-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/
jnsting
In need of some credit
In need of some credit
Posts: 5
Joined: Wed May 28, 2008 1:01 pm

Post by jnsting »

是的。用中文沟通比较容易。

我的希望是,我自己不需要CARE入口到底在哪里,是INCLUDE Windows的头文件还是Unix的头文件?wxWidgets会帮我搞定,它应该替我封装好了。好像wxWidgets没有完全提供这样的方法。

楼主的例子还是给了我启发。更完整的例子可以在wxJavaScript中找到。这样的做法可以达到我的要求了。
kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am

Post by kevin_fly »

windows下和Linux和MAC下的入口是不一样,我现在的代码已经可以运行于windows环境和MAC环境乐,只是在MAC下不能编译出Release版本,原因在于wxWidgets在MAC下的开源代码不提供编译Release版,只有Development/Deployment两个编译选项卡
http://blog.163.com/kevin_fly/
-----我的博客,我的知识库------
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 »

我有一个问题请教楼上诸位。给程序写UI的具体步骤是什么,其基本原理是什么?假如我要写个msn窗口样式的程序。谢谢。
Regards,

00061205
kingkamg
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Tue Apr 08, 2008 1:45 pm

Post by kingkamg »

:shock: :shock: 汗楼上的
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 »

kingkamg wrote::shock: :shock: 汗楼上的
干嘛汗我? :shock:
Regards,

00061205
Post Reply