关于windows环境下QT开发ICE程序无法正确连接类库的解决方法
来源:互联网 发布:圣诞节礼物 知乎 编辑:程序博客网 时间:2024/06/06 07:52
在使用QT开发ICE应用的时候,有些人还是会在windows环境的。居然遇到了ld链接错误,在论坛上转了一圈看到有人提出相同问题:http://topic.csdn.net/u/20110408/16/1703cbf9-3a77-42f5-8506-1da8ff6e6651.html?seed=24563544&r=72977941#r_72977941
现参考zeroc论坛中2006年的一段讨论:
引自:http://www.zeroc.com/forums/help-center/2066-ice-qt-opensource-windows.html
01-31-2006 #1
Registered User
Name: Paul Drummond
Organization: Iode Software
Project: chat room
- Join Date
- Jan 2006
- Location
- Sunderland, UK
- Posts
- 25
Ice & Qt Opensource on Windows
Hi All,
I am trying to compile a project written in Qt4.1 using the open source windows version. The project also uses Ice obviously
The problem is with MinGW (which Qt4.1 uses). When I try to link my project with the MSVC7.1 Ice libraries I get about 10 A4 pages worth of "undefined reference" errors. The same is true if I try to link against the VC6.0 package.
I assume this is a compability problem with using MinGW compiler and linking to a MCVS7.1 library? However, my project also links with the "python" library which itself is compiled with a MSVC compiler (7.1 I think) so why is Ice incompatible?
Oh, I also get the annoying "Only multi-threaded dll's can be built with Ice" message. To get around this I just comment out the relevant code in the config.h file.
Cheers,
Paul Drummond
Software Engineer
Serco Integrated Transport
Developing Traffic Control Subsystem
01-31-2006 #2
ZeroC Staff
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
- Join Date
- Feb 2003
- Location
- Florida
- Posts
- 1,827
This warning is there for a reason--don't comment it out! You must use multi-threaded DLLs with Ice, otherwise your application won't work.Originally Posted by Paul Drummond
What undefined references do you get? Without seeing the actual link errors, it's hard to tell what's going wrong.
01-31-2006 #3
ZeroC Staff
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
- Join Date
- Feb 2003
- Location
- Florida
- Posts
- 1,827
I just looked up MinGW, this seems to be a GCC version for Windows, right? Does this version of GCC have a C++ binary format that is compatible with Visual C++ 6.0 or 7.1? If not, then you cannot use MinGW together with Visual C++ libraries. Instead, you would have to try to compile Ice using MinGW from the sources. Unfortunately, we cannot be of any assistance with this, as we do not support GCC on Windows.Ice is a C++ application, while Python is written in C only. The C binary APIs of different compilers are usually compatible, but the C++ binary APIs are usually not.Originally Posted by Paul Drummond
Last edited by marc; 01-31-2006 at 07:18 AM.
01-31-2006 #4
Registered User
Name: Paul Drummond
Organization: Iode Software
Project: chat room
- Join Date
- Jan 2006
- Location
- Sunderland, UK
- Posts
- 25
My project does use multi-threaded libraries - it just doesn't define _DLL or _MT!Originally Posted by marcThank you for clearing that up - I was confused why Python would link but Ice wouln't - now I know. I forgot Python was C only - silly me!Originally Posted by marc
So I need to compile Ice using MinGW - how hard can it be ???
Cheers,
Paul Drummond
Software Engineer
Serco Integrated Transport
Developing Traffic Control Subsystem
-------------------------------------------------------
看得出来ICE并非发布了支持MinGW类库的发布包,要想彻底解决,只能自行编译了。要是想图省事,就换到linux环境下开发去,如果非要在windows环境上,也就只有重新编译这一条路了。:)
- 关于windows环境下QT开发ICE程序无法正确连接类库的解决方法
- Windows下Ice开发环境搭建
- 关于MAC环境下ADT模拟器无法连接网络的解决方法
- Windows 下 QT 开发环境的搭建
- Windows下Qt开发环境的配置
- Windows下QT开发环境的搭建
- Windows下QT开发环境的搭建
- Windows环境下搭建Qt开发环境
- Windows环境下设置Qt编译环境 - 关于Qt的静态链接库的配置和生成方法
- 在QT环境下编译关于xml编程的程序
- windows下完美的"免费"QT开发环境: QtCreator + VC2008Express
- windows下完美的"免费"QT开发环境: QtCreator + VC2008Express
- 纯净/最小的Windows下Qt开发环境
- 一种Windows下搭建QT开发环境的简单方法
- windows下搭建Qt的Android开发环境
- windows下完美的"免费"QT开发环境: QtCreator + VC2008Express
- 【OpenCV】--Windows下配置OpenCV的Qt开发环境
- Qt在Windows下的开发与调试环境配置
- app网络模块定义
- vici mvc 开发事例——调用ajax实现分页
- 兼容DC双缓存绘制(可以滚动视)
- Struts2弹出信息提示窗口
- 生活随笔:生活感想记录
- 关于windows环境下QT开发ICE程序无法正确连接类库的解决方法
- dead beef
- MYSQL中遇错:Can't Create table...
- 避免使用虚函数作为库的接口
- 启动问题 NAND擦写问题
- UBUNTU10.04 下安装 lamp
- Eclipse快捷键大全
- hdu 1394 树状数组版!!!
- Apache+Tomcat负载实战调优记录