• 6557阅读
  • 4回复

请教? XChinux? ,  (问题已经解决6月23号下午14:28) [复制链接]

上一主题 下一主题
离线hainanyunyu
 

只看楼主 正序阅读 楼主  发表于: 2008-06-03
— 本帖被 XChinux 从 Qt for Linux/X11 移动到本区(2010-02-08) —
请教一下XChinux 老兄,能不能把你qt开发环境配置详细说一下呢?
情况是这样的:
我看到你在这个版上发了“Qt  Eclipse Integration 1.4.0下载”,估计你的开发环境都能正常使用吧。
所以想请教一下你配置情况。

我现在的配置如下
eclipse-cpp-europa-winter-win32.zip
jdk-1_5_0_15-windows-i586-p.exe
qt-eclipse-integration-win32-1.4.0.exe
qt-win-opensource-4.4.0-mingw.exe
mingw5.1.4
gdb-6.8-mingw-3

操作系统:windows xp  professional  sp2    打了系统的各种最新补丁
硬件: intel pentium dual  e2140    +  1G 内存

我的配置现在问题是: 在eclipse 中新建一个QT GUI 项目,能正常编译。debug 和 release 编译完成后,这两个版本的程序均能运行。没有任何错误。但是如果在eclipse 中启动调试时出现了错误。

错误类型一(出现这种错误时,调试器能新建线程进入调试步骤):
Warning: /Qt/4.4.0/src/xmlpatterns/type;D: No such file or directory.
Warning: /Qt/4.4.0/src/xmlpatterns/utils;D: No such file or directory.
Warning: /Qt/4.4.0/src/xmlpatterns;D: No such file or directory.
Warning: /Qt/4.4.0/src;D: No such file or directory.
Warning: /zcl/workspace/newqt2/release;D: No such file or directory.
Warning: /zcl/workspace/newqt2/debug;E: No such file or directory.
Warning: /zcl/workspace/newqt2/.settings;E: No such file or directory.
Warning: /zcl/workspace/newqt2;E: No such file or directory.
Warning: E:\zcl\workspace
ewqt2/E: No such file or directory.
[New thread 4020.0xe34]
Cannot access memory at address 0x0  (调试启动后出现的错误信息)

错误类型二(调试根本不能启动,):
Warning: /Qt/4.4.0/src/xmlpatterns/type;D: No such file or directory.
Warning: /Qt/4.4.0/src/xmlpatterns/utils;D: No such file or directory.
Warning: /Qt/4.4.0/src/xmlpatterns;D: No such file or directory.
Warning: /Qt/4.4.0/src;D: No such file or directory.
Warning: /workspace/new33/release;D: No such file or directory.
Warning: /workspace/new33/debug;D: No such file or directory.
Warning: /workspace/new33/.settings;D: No such file or directory.
Warning: /workspace/new33;D: No such file or directory.
Warning: D:\workspace
ew33/D: No such file or directory.
[New thread 3064.0xec8]
gdb: unknown target exception 0xc0000135 at 0x7c984ed1

希望各位仁兄告知我一个能正常运行(特别是调试功能)的开发环境软件组合。
现在手上有个很重要的项目,急。以前做QT项目都是在linux下,windows下的qt环境没搭建过。

----------------------------------------------------------------------------
问题已经解决,请看方法请看楼下。
[ 此贴被hainanyunyu在2008-06-03 14:48重新编辑 ]
离线hainanyunyu

只看该作者 4楼 发表于: 2008-06-03
Re:请教  XChinux  ,
这个问题解决了!!!

我现在的配置如下
eclipse-cpp-europa-winter-win32.zip
jdk-1_5_0_15-windows-i586-p.exe
qt-eclipse-integration-win32-1.4.0.exe
qt-win-opensource-4.4.0-mingw.exe
mingw5.1.3    (发生上述错误时是 mingw5.1.4)
gdb-6.3-2        (发生上述错误时是gdb-6.8-mingw-3)
操作系统:windows xp  professional  sp2    打了系统的各种最新补丁
硬件: intel pentium dual  e2140    +  1G 内存

另外在eclipse中作如下修改:
1、进入Eclipse,以此选择【Window】-【Preferences】。
2、选择【C/C++】-【Debug】-【Common Source Lookup Source】。
3、右边点击【Add…】,选择【Path Mapping】。然后点选刚才增加的Path Mapping,【Edit…】,再【Add…】,在Compilation path中填写\mingw\c,Local file system path里面填写c:\便可解决。
这里如果你的工程放在其他盘的话,建议也在这里加上。


ps: 估计mingw5.1.4也行,没空去尝试了。
离线hainanyunyu

只看该作者 3楼 发表于: 2008-06-03
Re:请教  XChinux  ,
我在windows的cmd下,把exe文件路径:
原:e:\tool\ep.exe  写成这样 e:\\tool\\ep.exe

启动gdb ,
在gdb下输入 file  e:\\tool\\ep.exe ,
然后就能正常调试了。

虽然不能在eclipse下调试,还是有办法解决。哈哈哈


ps: 我估计我上面提到的问题,是gdb 在windows的控制台下识别路径的问题造成的。
理由:
1、eclipse下调试出现:Warning: /workspace/new33;D: No such file or directory.
2、控制台下直接输入类似的路径E:\zcl\workspace\debug\new2.exe ,gdb也识别不了。
3、奇趣官网的一篇文章:
If building Qt or Qt programs fails with something like the following errors:
cd tools\moc && c:/MinGW/bin/mingw32-make.exe
/usr/bin/sh: cd: toolsmoc: No such file or directory
Make sure sh.exe is not in your path. Make will use sh.exe instead of Windows' standard shell if sh.exe is in the path. Unfortunately sh.exe does not understand Windows-style paths and discards the '\' separator. There's not much Qt can do to work around this make feature. Both Cygwin and MSYS provide sh.exe. Avoid MSYS while building Qt or Qt programs.
离线hainanyunyu

只看该作者 2楼 发表于: 2008-06-03
Re:请教  XChinux  ,
多谢哈,
上一个qt项目是给基于linux和s3c2410的,当时调试也是基本靠qDebug()。感觉很郁闷。
现在本想搞个方便的调试环境,看来还是要等了哟。

对微软的东西不感冒。所以这次新任务虽然是windows下的,还是决定用开源的东西。

哎,不能在IDE里调试算了,还是要继续用。调试还有qdebug
离线XChinux

只看该作者 1楼 发表于: 2008-06-03
Re:请教  XChinux  ,
写帖子当时我只是下载试验了一下,但我平常都是使用控制台+VIM来写程序的。
个人习惯的原因吧,不怎么使用调试功能(debug编译),除非万不得已,一般来说通过简单的qDebug(), std::cout等就能进行“调试”了。

如果你要调试,还是使用VC Express(Qt需要用msvc编译)吧,用qmake -t vcapp来生成对应的VC工程文件,然后进行调试,比较方便。
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
快速回复
限100 字节
 
上一个 下一个