• 11377阅读
  • 9回复

求助,程序无法在其他机器上运行 [复制链接]

上一主题 下一主题
离线basket1111
 

只看楼主 正序阅读 楼主  发表于: 2010-10-29
— 本帖被 XChinux 执行加亮操作(2010-11-04) —
我在Leopard10.5的虚拟机上进行开发,编译后的程序,在虚拟机下运行没有问题,可以把编译好的程序,拿到leopard 10.6的机器上(没有安装QT),程序无法运行,check  with the developer to make sure  ... with this version of MAC OS X  .....
从字面上的理解是由于系统的版本不一样而造成的,这个目前曾在试,试试在10.6的机器上编译试试
如果不是版本的问题,还可能是其他的什么问题么?比如缺少库文件之类的(类似于windows下 dll的东西)?
第一次在Mac下写程序,谢谢各位指点了
离线shiziyang

只看该作者 9楼 发表于: 2011-04-15
Command+Shift+3 截全屏
Command+Shift+4 截框选区域
不要用小键盘的键
该命令不带-dmg只是把它依赖的库复制到自己的app包里并批量修改对应的依赖库的路径。
带-dmg则完后会自动生成dmg镜像,至少我用下来是这样。
其实不用这个命令也可以,用otool命令看依赖路径,用install_name_tool命令手动修改对应的依赖的动态库路径
[ 此帖被shiziyang在2011-04-19 09:29重新编辑 ]
离线uidab

只看该作者 8楼 发表于: 2011-04-13
回 6楼(shiziyang) 的帖子
不会在苹果下截屏,
出现一个提示框:   testSysinfo意外退出。 点按“重新打开”以再次打开应用程序。点按“报告”以查看更详细的信息并将报告发送给 Apple。
我点击忽略,就什么都没了。

还有就是 下载别人的应用程序是 *.dmg等格式的 。我自己做的程序编译后就是*.app。所以并不是真的打包,我说的打包是制作安装包。
有时候为了工作直接获得答案,而我却失去了思考的乐趣!


飘啊飘,何时能安居!
离线uidab

只看该作者 7楼 发表于: 2011-04-13
回 6楼(shiziyang) 的帖子
谢谢,我一会试一下。
有时候为了工作直接获得答案,而我却失去了思考的乐趣!


飘啊飘,何时能安居!
离线shiziyang

只看该作者 6楼 发表于: 2011-04-12
WARNING: Perhaps macdeployqt was already used on "testSysinfo.app" ?
看你这输出应该是之前已经打过包了,再打就没用了。
你可以先放到没有qt环境的机器上去试试。
离线uidab

只看该作者 5楼 发表于: 2011-04-07
引用第4楼shiziyang于2011-04-07 14:44发表的  :
macdeployqt X.app/ -verbose -dmg
带dmg可以直接给出dmg镜像,不带就只把app包打出来,具体请看该命令的帮助。
如果程序用到非qt的第三方库,使用前先把这些库放到系统默认搜索路径下,如/usr/lib等




我用qt creator编译release版本后,输入命令后出现了很多警告和错误?不清楚这是什么意思?我也是在虚拟机下开发,但是在真实的Mac机上测试生成的dmg只是一闪而过,报错。


localhost:testSysinfo-build-desktop ljie$ macdeployqt testSysinfo.app/ -verbose=1 -dmg
WARNING:
WARNING: Could not find any external Qt frameworks to deploy in "testSysinfo.app"
WARNING: Perhaps macdeployqt was already used on "testSysinfo.app" ?
WARNING: If so, you will need to rebuild "testSysinfo.app" before trying again.
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/accessible/libqtaccessiblewidgets.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/bearer/libqgenericbearer.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/bearer/libqgenericbearer.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/bearer/libqnmbearer.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/bearer/libqnmbearer.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqcncodecs.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/codecs/libqcncodecs.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqjpcodecs.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/codecs/libqjpcodecs.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqkrcodecs.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/codecs/libqkrcodecs.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqtwcodecs.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/codecs/libqtwcodecs.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/graphicssystems/libqtracegraphicssystem.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqgif.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/imageformats/libqgif.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqico.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/imageformats/libqico.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqjpeg.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/imageformats/libqjpeg.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqmng.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/imageformats/libqmng.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqtiff.dylib"
ERROR:  to "testSysinfo.app/Contents/PlugIns/imageformats/libqtiff.dylib"
WARNING:
WARNING: "testSysinfo.app/Contents/Resources/qt.conf" already exists, will not overwrite.
WARNING: To make sure the plugins are loaded from the correct location,
WARNING: please make sure qt.conf contains the following lines:
WARNING: [Paths]
WARNING:   Plugins = PlugIns
localhost:testSysinfo-build-desktop ljie$



有时候为了工作直接获得答案,而我却失去了思考的乐趣!


飘啊飘,何时能安居!
离线shiziyang

只看该作者 4楼 发表于: 2011-04-07
macdeployqt X.app/ -verbose -dmg
带dmg可以直接给出dmg镜像,不带就只把app包打出来,具体请看该命令的帮助。
如果程序用到非qt的第三方库,使用前先把这些库放到系统默认搜索路径下,如/usr/lib等
离线uidab

只看该作者 3楼 发表于: 2011-04-02
引用第2楼shiziyang于2011-03-24 17:32发表的 :
打包时把Qt的framework打进去了吗?


qt编译好的程序,在Mac OS下该如何打包啊????
有时候为了工作直接获得答案,而我却失去了思考的乐趣!


飘啊飘,何时能安居!
离线shiziyang

只看该作者 2楼 发表于: 2011-03-24
打包时把Qt的framework打进去了吗?
离线wd007

只看该作者 1楼 发表于: 2010-11-14
这个不好说,你不妨试试,在机器上安装Qt,看看还会有提示吗?

一步一步的排除错误,或者说是定位错误所在。
欢迎访问我的博客,一起学习提高
http://blog.csdn.net/qter_wd007
快速回复
限100 字节
 
上一个 下一个