我想在OS X Lion上使用Clozure CL使用Commonqt。
但这没有用...
常见问题
Commonqt是Common Lisp绑定到Qt的烟雾库。
http://common-lisp.net/project/commonqt/
我的设定是
OS X Lion 10.7.4
Xcode 4.3.3
Clozure CL版本1.8
qt 4.8.2(git clone git://gitorious.org/qt/qt.git)“ ./configure && make install && make”
抽烟
somkegen(git clone git://anongit.kde.org/smokegen)“ cmake。&& make install”
smokeqt(git clone git://anongit.kde.org/smokeqt)“ cmake。&& make install”
快点
本地项目commonqt(git clone git://gitorious.org/commonqt/commonqt.git)“ qmake && make clean && make”
cf:http://kvardek-du.kerno.org/2011/12/setting-up-commonqt-on-osx.html
qt.asd(在Commonqt中)
(defmethod output-files ((operation compile-op) (c cpp->so)) (values
(loop for filename in '("libcommonqt.so" "libcommonqt.so.1"
"libcommonqt.so.1.0" "libcommonqt.so.1.0.0")
collect (merge-pathnames filename (component-pathname c)))
;; libcommonqt.so* files are never moved to separate FASL directory
t))
所以我被改变了(所以-> dylib)
(defmethod output-files ((operation compile-op) (c cpp->so)) (values
(loop for filename in '("libcommonqt.dylib" "libcommonqt.1.dylib"
"libcommonqt.1.0.dylib" "libcommonqt.1.0.0.dylib")
collect (merge-pathnames filename (component-pathname c)))
;; libcommonqt.so* files are never moved to separate FASL directory
t))
但是发生了错误。例如
源代码
http://pleasegodno.wordpress.com/common-lisp-tutorials/common-lisp-gui-programming-with-commonqt/2-classes-and-methods/
? (main)
MAIN
? > Error: Unable to load foreign library (LIBCOMMONQT.DYLIB-31136).
> Error opening shared library /Users/jk/.quicklisp/local-projects/commonqt/libcommonqt.dylib : dlopen(/Users/jk/.quicklisp/local-projects/commonqt/libcommonqt.dylib, 10): no suitable image found. Did find:
> /Users/jk/.quicklisp/local-projects/commonqt/libcommonqt.dylib: mach-o, but wrong architecture.
> While executing: CFFI::FL-ERROR, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 >
这是我的错误设置吗?还是Commonqt的源在OS X Lion上使用Clozure Cl无法正常工作?
接下来,我该怎么办?
user1234192的建议:ccl-> ccl64
我重试。
> (qt-conv:main)
2012-07-12 21:46:11.630 dx86cl64[93621:c403] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.25/Misc.subproj/NSUndoManager.m:324
2012-07-12 21:46:11.631 dx86cl64[93621:c403] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2012-07-12 21:46:11.633 dx86cl64[93621:c403] (
0 CoreFoundation 0x00007fff8dc49f56 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff9600dd5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8dc49d8a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8de4671f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
4 Foundation 0x00007fff8ddb595f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
5 AppKit 0x00007fff8b15a0ef -[NSApplication run] + 596
6 QtGui 0x000000000346cc60 _ZN19QEventDispatcherMac13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 840
7 QtCore 0x0000000004122838 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 394
8 QtCore 0x0000000004125b0b _ZN16QCoreApplication4execEv + 175
9 libsmokeqtgui.dylib 0x00000000043718e1 _ZN12__smokeqtgui14x_QApplication4x_84EPN5Smoke9StackItemE + 17
10 libsmokeqtgui.dylib 0x00000000043579d8 _ZN12__smokeqtgui18xcall_QApplicationEsPvPN5Smoke9StackItemE + 1304
11 dx86cl64 0x000000000001b0db SPffcall + 99
12 ??? 0x0000000001219328 0x0 + 18977576
)
2012-07-12 21:46:11.634 dx86cl64[93621:c403] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.25/Misc.subproj/NSUndoManager.m:324
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
Unhandled exception 10 at 0x0, context->regs at #xb029af30
Exception occurred while executing foreign code
received signal 10; faulting address: 0x0
? for help
[93621] Clozure CL kernel debugger: help
[93621] Clozure CL kernel debugger: [93621] Clozure CL kernel debugger: [93621] Clozure CL kernel debugger: Segmentation fault: 11
最佳答案
http://kvardek-du.kerno.org/2011/12/setting-up-commonqt-on-osx.html
我在clozure cl(Lion)上获得了成功
和...您的错误消息..“ libcommonqt.dylib:马赫,但体系结构错误”
也许..您的ccl和libcommonqt.dylib是不同的体系结构。
如果您的ccl是x86(32bit),则libcommonqt.dylib必须为x86。
如果您的ccl是x8664(64bit),则libcommonqt.dylib必须x8664 ...
我建议使用64位。
我的英语很丑。抱歉.......