gpt4 book ai didi

ruby - 禁用 ruby 扩展

转载 作者:太空宇宙 更新时间:2023-11-03 17:40:57 24 4
gpt4 key购买 nike

我正在尝试使用 Cygwin 在 Win7 x64 下从 sctraches 编译 ruby​​ 1.9.2-p0.. 几乎一切正常,所有扩展都被编译直到它到达 win32ole ext 失败并出现以下错误:

win32ole.o: In function `load_conv_function51932':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:934: undefined reference to `_CLSID_CMultiLanguage'
win32ole.o: In function `fole_activex_initialize':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:4762: undefined reference to `_IID_IPersistMemory'
win32ole.o: In function `mf_QueryInterface':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:597: undefined reference to `_IID_IUnknown'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:597: undefined reference to `_IID_IMessageFilter'
win32ole.o: In function `QueryInterface':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:699: undefined reference to `_IID_IUnknown'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:699: undefined reference to `_IID_IDispatch'
win32ole.o: In function `EVENTSINK_QueryInterface':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:7571: undefined reference to `_IID_IUnknown'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:7571: undefined reference to `_IID_IDispatch'
win32ole.o: In function `fole_each':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:4014: undefined reference to `_GUID_NULL'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:4031: undefined reference to `_IID_IEnumVARIANT'
win32ole.o: In function `load_conv_function51932':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:934: undefined reference to `_CLSID_CMultiLanguage'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:934: undefined reference to `_CLSID_CMultiLanguage'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:934: undefined reference to `_CLSID_CMultiLanguage'
win32ole.o: In function `find_default_source':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:8174: undefined reference to `_IID_IProvideClassInfo2'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:8190: undefined reference to `_IID_IProvideClassInfo'
win32ole.o: In function `ev_advise':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:8308: undefined reference to `_IID_IConnectionPointContainer'
win32ole.o: In function `load_conv_function51932':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:934: undefined reference to `_CLSID_CMultiLanguage'
win32ole.o: In function `ole_create_dcom':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:2615: undefined reference to `_IID_IDispatch'
win32ole.o: In function `fole_initialize':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:3248: undefined reference to `_IID_IDispatch'
win32ole.o: In function `load_conv_function51932':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:934: undefined reference to `_CLSID_CMultiLanguage'
win32ole.o: In function `fole_respond_to':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:4516: undefined reference to `_GUID_NULL'
win32ole.o: In function `ole_variant2val':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:2262: undefined reference to `_IID_IDispatch'
win32ole.o: In function `ole_invoke':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:3392: undefined reference to `_GUID_NULL'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:3450: undefined reference to `_GUID_NULL'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:3364: undefined reference to `_GUID_NULL'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:3467: undefined reference to `_GUID_NULL'
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:3506: undefined reference to `_GUID_NULL'
win32ole.o:/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:3481: more undefined references to `_GUID_NULL' follow
win32ole.o: In function `fole_s_connect':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:2718: undefined reference to `_IID_IDispatch'
win32ole.o: In function `ole_bind_obj':
/home/Jack/ruby-1.9.2-p0/ext/win32ole/win32ole.c:2656: undefined reference to `_IID_IDispatch'
collect2: ld returned 1 exit status
make: *** [../../.ext/i386-cygwin/win32ole.so] Error 1

makefile 使用以下选项通过 gcc 构建它:

gcc -shared -s -o ../../.ext/i386-cygwin/win32ole.so win32ole.o -L. -L../.. -L. -Wl,--enable-auto-image-base,--enable-auto-import -lruby191 -ladvapi32 -lkernel32 -luser32 -luuid -loleaut32 -lole32 -lpthread -lrt -ldl -lcrypt

我不知道为什么会发生这种情况(可能是 header 资源不可用)但实际上我不太关心这个扩展(我不认为我会使用它)所以我想知道如何禁用make 阶段的 win32ole 扩展并跳过它。

我想有办法,但我不知道如何..

提前致谢!

最佳答案

执行 ./configure --help 并记下选项

--with-exts=EXTS
--with-out-ext=EXTS

我有相同的设置,Win 7 x86_64 和 cygwin 1.7,构建该扩展没有问题。 gcc 命令行和你的一样。 Microsoft 文档提到了一个 mlang.dll,我想您可以检查一下。

关于ruby - 禁用 ruby 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4196910/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com