lib

Linking libusb in Mac OS X

匿名 (未验证) 提交于 2019-12-03 10:10:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this very simple piece of code that I'm trying to compile. I'm fairly new to GCC from the command line, so please forgive me. I've tried a quite few different things with GCC, but I'm still unable to get it to compile. I do have libusb installed. How can I get this piece of code to compile? Libusb: anything:usb mymac$ brew list libusb /usr/local/Cellar/libusb/1.0.9/include/libusb-1.0/libusb.h /usr/local/Cellar/libusb/1.0.9/lib/libusb-1.0.0.dylib /usr/local/Cellar/libusb/1.0.9/lib/pkgconfig/libusb-1.0.pc /usr/local/Cellar/libusb/1.0.9

ubuntu 安装sunjdk jdk-8u65-linux-x64.tar.gz

*爱你&永不变心* 提交于 2019-12-03 09:52:59
下载JDK8安装包jdk-8u65-linux-x64.tar.gz 其实tar.gz解压就是安装,只要解压到既定目录,然后配置正确就行,因此需要执行命令。 # tar zxvf jdk-8u65-linux-x64.tar.gz -C /usr/lib/jvm/ 一般是解压到/usr/lib下,可以在该目录下创建jvm,然后解压到既定目录 配置jdk使其生效 # nano /etc/profile 在文件最末尾添加如下所示内容,ctrl+x,y退出即可完成保存,用其他编辑器类似。 export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_65 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH={JAVA_HOME}/bin:$PATH 更新默认jdk # update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_65/bin/java 300 # update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_65/bin/javac 300 #

Can't compile and link programs with clang

匿名 (未验证) 提交于 2019-12-03 09:18:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I recently compiled Clang 2.9 (from here ) on an Ubuntu system. I'm having trouble compiling and linking a simple program. Does anyone know how to fix this? Here's the output I see: a@ubuntu:~/Desktop$ clang add.c /usr/bin/ld: 1: Syntax error: word unexpected (expecting ")") clang: error: linker command failed with exit code 2 (use -v to see invocation) uname -a output Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux gcc -v output: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=

build c++ script with err mysqlcppconn missing (no such file)

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: there is a newbie to c++. I want to prepare working environment for C++ development for Raspi 3. This includes C++ (netbeans IDE on windows, geany on Raspi), mysql (mariDB) and QT. first step was a simple script "hello world" on raspi and make a build with help of cppconn. Second step was make the same script on windows in Netbeans IDE, and build it localy/remotely. I have this simple script: During build I get these Errors: cd 'C:\Users\marek\Documents\c++ projects\hello-world-7-pc-mysql' C : \msys\1 . 0 \b in \make . exe - f

MtGox API and websocketpp

匿名 (未验证) 提交于 2019-12-03 09:13:36
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I can't get info from MtGox API via WebSockets C++ library named websocketpp : #include <websocketpp/config/asio_no_tls_client.hpp> #include <websocketpp/client.hpp> #include <iostream> typedef websocketpp::client<websocketpp::config::asio_client> client; using websocketpp::lib::placeholders::_1; using websocketpp::lib::placeholders::_2; using websocketpp::lib::bind; typedef websocketpp::config::asio_client::message_type::ptr message_ptr; void on_open(websocketpp::connection_hdl hdl) { std::cout << "on_open \n"; } void on_close(websocketpp:

Start HTTP/HTTPS server, python -m SimpleHTTPServer

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to start HTTPS server on my localhost, but getting below error. I have opened cmd as an administrator. C:\Windows\system32>python -m SimpleHTTPServer Traceback (most recent call last): File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Python27\lib\SimpleHTTPServer.py", line 224, in <module> test() File "C:\Python27\lib\SimpleHTTPServer.py", line 220, in test BaseHTTPServer.test(HandlerClass

It's possible to use requests in ironpython 2.7.5?

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've successful installed pip on ironpython. But when i try to install requests with "ipy.exe -X:Frames -m pip install requests" in a administrator console I get the following: ------------------------------------------------------------ C : \Program Files ( x86 ) \IronPython 2.7 \lib\site - packages\pip\__main__ . py run on 02 / 02 / 16 16 : 13 : 53 Downloading / unpacking html5lib Getting page https : //pypi.python.org/simple/html5lib/ Cleaning up ... Removing temporary dir c : \users\panta\appdata\local\temp\pip_build_panta ...

Missing GOMP_parallel or GOMP_4.0 in (Docker) jupyter/all-spark-notebook: both R and Python

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a question regarding GOMP, that I figured is related to gcc. I am using this image as a base for some experiments. It seems that I am using an alright version (4.9.2) based on this unmodified image, but I get some strange behaviour with a number of Cython related packages. Example 1 When running this on the unmodified jupyter/all-spark-notebook docker image, when attempting to run Python I get the following issue, import lightfm Traceback ( most recent call last ): File "" , line 1 , in File "/opt/conda/lib/python3.4/site

python urllib error - AttributeError: &#039;module&#039; object has no attribute &#039;request&#039;

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying out a tutorial code which fetches the html code form a website and prints it. I'm using python 3.4.0 on ubuntu. The code: import urllib.request page = urllib.request.urlopen("http://www.brainjar.com/java/host/test.html") text = page.read().decode("utf8") print(text) I saw previous solutions and tried them, I also tried importing only urllib but it still doesn't work. The error message displayed is as shown: Traceback (most recent call last): File "string.py", line 1, in <module> import urllib.request File "/usr/lib/python3.4

Rails 4.0.0 - Got “no implicit conversion of nil into String”

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Just installed a brand new Rails 4.0.0 app and I got this error ( https://gist.github.com/hartator/6404820 ) on http://0.0.0.0:3000 : no implicit conversion of nil into String activerecord ( 4.0 . 0 ) lib / active_record / connection_adapters / sqlite3_adapter . rb : 24 : in `initialize' activerecord (4.0.0) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in ` new ' activerecord (4.0.0) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `sqlite3_connection' activerecord ( 4.0 . 0 ) lib / active_record /