linker-errors

How to Link a third Party Library (LibUSB) in CMake

老子叫甜甜 提交于 2019-12-18 07:09:07
问题 I am attempting to use LibUSB in a project. However whenever I attempt to use basic libUSB functions I get the following error: ...src/main/main.cpp.o: In function `main': ...src/main/main.cpp:10: undefined reference to `libusb_init' ...src/main/main.cpp:11: undefined reference to `libusb_set_debug' collect2: error: ld returned 1 exit status The package LibUSB-devel is installed (I'm on fedora 22) and my IDE KDevelop finds and recognises the headers, to the point it offers LibUSB code

no ocijdbc9 in java.library.path

廉价感情. 提交于 2019-12-18 06:57:20
问题 When I try to run Java application, I receive the following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path I don't have a file ocijdbc9.* on my PC, but I have ocijdbc10.dll in %ORACLE_HOME%\bin . %ORACLE_HOME% is correctly specified, so I think the problem is that the application is searching for the wrong version (9 instead of 10). Both Oracle and Java Builder are freshly installed, so the problem may be in project preferences? Do you have

What are possible causes of “failed to map segment from shared object: operation not permitted”, and how to debug?

浪子不回头ぞ 提交于 2019-12-18 04:35:12
问题 I have two executables, both cross compiled to run in Android. I have put both on the device in the same directory. I have put all the shared libraries that they are dependent on in the same directory, including ld-linux.so.3. I run the executables by using: ld-linux.so.3 --library-path /path/to/libraries executable_name both work on older versions of Android when running as any user. The both work on the latest version of Android if running as root. Only one works on the latest version of

C++ BOOST undefined reference to `boost::filesystem::detail::copy_file

拟墨画扇 提交于 2019-12-18 03:11:30
问题 I have no clue why boost::filesystem::copy_file is making trouble for me. undefined reference to `boost::filesystem::detail::copy_file // g++ -std=c++11 test.cpp -lboost_filesystem -lboost_system -lrt -lboost_wave #include <boost/filesystem.hpp> int main() { boost::filesystem::create_directory("aaa"); // ok boost::filesystem::copy_file("f1","f2"); // /tmp/ccNWZltB.o: In function `boost::filesystem::copy_file(boost::filesystem::path const&, boost::filesystem::path const&)': // test.cpp:(.text.

What causes the error “undefined reference to (some function)”? [duplicate]

僤鯓⒐⒋嵵緔 提交于 2019-12-17 18:39:18
问题 This question already has answers here : What is an undefined reference/unresolved external symbol error and how do I fix it? (32 answers) Closed 5 years ago . I get the error: main.o(.text+0x1ed): In function `main': : undefined reference to `avergecolumns' collect2: ld returned 1 exit status when I gcc *.o. I'm not quite sure what causes this error. Other posters have explained it as the function is not found or the function is empty. If someone could clarify or refine, it would be greaty

Getting “Repositroy test has failed” error while cloning repository from Gitlab in Android Studio?

南楼画角 提交于 2019-12-17 18:15:05
问题 I will like to clone my android code from gitlab repository in Android Studio 0.8.1.I checked into VCS >> Checked out from Version Control >> Git >> Added HTTP url here.It prompts me that "Repositroy test has failed".Kindly help me to sort out the issue.I have checked the plugins as well.Thanks a lot. 回答1: You need to download and install git from http://git-scm.com/downloads Then you need to track the git.exe on AndroidStudio: Go to Settings > Project Settings > Version Control > VCSs > Git

Unresolved external symbol LNK2019

守給你的承諾、 提交于 2019-12-17 15:42:54
问题 First of all, I know this question is all over this site but I have looked at almost all of them and can't seem to find out what is wrong. This is in VS 2012. Thanks. //Socket.h #pragma once #include <iostream> #include <WinSock2.h> using namespace std; const int STRLEN = 256; class Socket { protected: WSADATA wsaData; SOCKET mySocket; SOCKET myBackup; SOCKET acceptSocket; sockaddr_in myAddress; public: Socket(); ~Socket(); bool SendData( char* ); bool RecvData( char*, int ); void

Trying to include a library, but keep getting 'undefined reference to' messages

瘦欲@ 提交于 2019-12-17 15:26:37
问题 I am attempting to use the libtommath library. I'm using the NetBeans IDE for my project on Ubuntu linux. I have downloaded and built the library, I have done a 'make install' to put the resulting .a file into /usr/lib/ and the .h files into /usr/include It appears to be finding the files appropriately (since I no longer get those errors, which I did before installing into the /usr directories). However, when I create a simple main making a call to mp_init (which is in the library), I get the

CUDA linking error - Visual Express 2008 - nvcc fatal due to (null) configuration file

徘徊边缘 提交于 2019-12-17 09:45:25
问题 I've been searching extensively for a possible solution to my error for the past 2 weeks. I have successfully installed the Cuda 64-bit compiler (tools) and SDK as well as the 64-bit version of Visual Studio Express 2008 and Windows 7 SDK with Framework 3.5. I'm using windows XP 64-bit. I have confirmed that VSE is able to compile in 64-bit as I have all of the 64-bit options available to me using the steps on the following website: (since Visual Express does not inherently include the 64-bit

Exporting static data in a DLL

三世轮回 提交于 2019-12-17 09:38:04
问题 I have a DLL which contains a class with static members . I use __declspec(dllexport) in order to make use of this class's methods . But when I link it to another project and try to compile it, I get "unresolved external symbol" errors for the static data. e.g. In DLL, Test.h class __declspec(dllexport) Test{ protected: static int d; public: static void m(){int x = a;} } In DLL, Test.cpp #include "Test.h" int Test::d; In the application which uses Test, I call m(). I also tried using _