我正在尝试让 Go ZMQ4 绑定(bind)在 Windows 上工作。 不幸的是,我无法构建 zmq 库和 Gozmq 软件并出现以下错误:
*** Since this library must not contain undefined symbols,
* 因为平台不支持它们或
它是用 -no-undefined 明确请求的,
libtool 只会创建它的静态版本。
make[2]:离开目录/e/Users/mmarques/Desktop/zeromq-4.0.5/src'
make[1]: Leaving directory/e/Users/mmarques/Desktop/zeromq-4.0.5/src'
在文档中制作所有内容
make[1]:进入目录/e/Users/mmarques/Desktop/zeromq-4.0.5/doc'
make[1]: Nothing to be done for全部'。
make[1]: 离开目录 /e/Users/mmarques/Desktop/zeromq-4.0.5/doc'
Making all in perf
make[1]: Entering directory/e/Users/mmarques/Desktop/zeromq-4.0.5/perf'
CXX local_lat.o
CXXLD local_lat.exe
local_lat.o:在函数中main':
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:45: undefined referenc
e to __imp_zmq_init'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:51: undefined referenc
e 到 __imp_zmq_socket'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:57: undefined referenc
e to __imp_zmq_bind'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:63: undefined referenc
e 到 __imp_zmq_msg_init'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:69: undefined referenc
e to __imp_zmq_recvmsg'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:75: undefined referenc
e 到 __imp_zmq_msg_size'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:79: undefined referenc
e to __imp_zmq_sendmsg'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:72: undefined referenc
e 到 __imp_zmq_strerror'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:86: undefined referenc
e to __imp_zmq_msg_close'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:92: undefined referenc
e 到 __imp_zmq_sleep'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:94: undefined referenc
e to __imp_zmq_close'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:100: undefined referen
转到 __imp_zmq_term'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:102: undefined referen
ce to __imp_zmq_strerror'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:81: undefined referenc
e 到 __imp_zmq_strerror'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:59: undefined referenc
e to __imp_zmq_strerror'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:65: undefined referenc
e 到 __imp_zmq_strerror'
e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:96: undefined referenc
e to __imp_zmq_strerror'
local_lat.o:e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:88: 更多你
未定义对 __imp_zmq_strerror' follow
collect2.exe: error: ld returned 1 exit status
make[1]: *** [local_lat.exe] Error 1
make[1]: Leaving directory 的引用/e/Users/mmarques/Desktop/zeromq-4.0.5/perf'
make: * [全递归] 错误 1
我所做的是下载 Zmq Sources 并执行
sh configure
make
谁能帮我弄清楚如何解决这个问题,并在 Windows 环境中设置 Zmq Go 绑定(bind)?
最佳答案
确保您安装了 MinGW gcc 工具链。 Go 需要它能够从 zmq4 正在执行的 Go 代码调用 C 代码。如果您查看 zmq4 存储库,您可以看到 .h 头文件。请参阅:https://golang.org/doc/install和 https://golang.org/cmd/cgo/ .
关于go - ZeroMq Golang 绑定(bind)无法在 Windows 上构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29824285/
我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳
它不等于主线程的binding,这个toplevel作用域是什么?此作用域与主线程中的binding有何不同?>ruby-e'putsTOPLEVEL_BINDING===binding'false 最佳答案 事实是,TOPLEVEL_BINDING始终引用Binding的预定义全局实例,而Kernel#binding创建的新实例>Binding每次封装当前执行上下文。在顶层,它们都包含相同的绑定(bind),但它们不是同一个对象,您无法使用==或===测试它们的绑定(bind)相等性。putsTOPLEVEL_BINDINGput
我在pry中定义了一个函数:to_s,但我无法调用它。这个方法去哪里了,怎么调用?pry(main)>defto_spry(main)*'hello'pry(main)*endpry(main)>to_s=>"main"我的ruby版本是2.1.2看了一些答案和搜索后,我认为我得到了正确的答案:这个方法用在什么地方?在irb或pry中定义方法时,会转到Object.instance_methods[1]pry(main)>defto_s[1]pry(main)*'hello'[1]pry(main)*end=>:to_s[2]pry(main)>defhello[2]pry(main)
我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub