linker-errors

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

旧城冷巷雨未停 提交于 2019-11-27 17:26:21
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 following error when I attempt to make my project: mkdir -p build/Debug/GNU-Linux-x86 rm -f build

error during making GTest

老子叫甜甜 提交于 2019-11-27 14:23:17
问题 I was trying to set up GTest environment on my Ubuntu machine. but while making the GTest to get the library, i get the following error... som@som-VPCEH25EN:~/Workspace/CPP/gtest-1.6.0/make$ make g++ -I../include -g -Wall -Wextra -lpthread sample1.o sample1_unittest.o gtest_main.a -o sample1_unittest gtest_main.a(gtest-all.o): In function `~ThreadLocal': /home/som/Workspace/CPP/gtest-1.6.0/make/../include/gtest/internal/gtest-port.h:1336: undefined reference to `pthread_getspecific' /home/som

Linker errors after upgrading Xcode to 4.5.2 and OpenCV to 2.4.3

白昼怎懂夜的黑 提交于 2019-11-27 14:13:15
问题 My project was working just fine until this morning. I was using xcode 4.3, and an older version of OpenCV (I'm not sure about the exact version). OSX was already 10.7.x, but not 10.7.5 Today, after upgrading OSX to 10.7.5, xcode to 4.5.2, and downloading OpenCV 2.4.3, I am getting the following linker errors when trying to build the project: Undefined symbols for architecture armv7: "_OBJC_CLASS_$_ALAssetsLibrary", referenced from: objc-class-ref in opencv2(cap_ios_video_camera.o) "cv:

C++ - LNK2019 error unresolved external symbol [template class's constructor and destructor] referenced in function _main

↘锁芯ラ 提交于 2019-11-27 12:27:13
问题 [[UPDATE]] -> If I #include "Queue.cpp" in my program.cpp, it works just fine. This shouldn't be necessary, right? Hey all -- I'm using Visual Studio 2010 and having trouble linking a quick-and-dirty Queue implementation. I started with an empty Win32 Console Application, and all files are present in the project. For verbosity, here's the complete code to duplicate my error. I realize some of the code may, in fact, be wrong. I haven't had a chance to test it yet because I haven't yet been

Duplicate Symbols for Architecture arm64

空扰寡人 提交于 2019-11-27 12:15:52
When I try running my Xcode Project it fails with an error stating that I have duplicate symbols. I looked online where the find these duplicates but have had no luck: Any ideas how to fix this? From the errors, it would appear that the FacebookSDK.framework already includes the Bolts.framework classes. Try removing the additional Bolts.framework from the project. tania_S For me it helped to switch the "No Common Blocks" compiler setting to NO: It pretty much seems to make sense, the setting is explained here: What is GCC_NO_COMMON_BLOCKS used for? Adam G Using Xcode 8, "Update project to

Linker error: “linker input file unused because linking not done”, undefined reference to a function in that file

大兔子大兔子 提交于 2019-11-27 11:57:49
问题 I'm having trouble with the linking of my files. Basically, my program consists of: The main program, gen1 . gen1 - receives input sends to str2value for processing, outputs results str2value , breaks input into tokens using "tokenizer" determines what sort of processing to do to each token, and passes them off to str2num , or str2cmd . It then returns an array of the results. str2num - does some processing str2cmd - ditto author.py - a python script that generates str2cmd.c and str2cmd.h

Apple Mach-O Linker Warning “Directory Not Found For Option…”

我们两清 提交于 2019-11-27 11:52:28
I simply want to rid of the warnings that pop up like these: ld: warning: directory not found for option '-F/Users/m/Desktop/FacebookSDK' ld: warning: directory not found for option '-F/Users/m/Desktop/FacebookSDK/FBAudienceNetwork' ld: warning: directory not found for option '-F/Users/gavin/Downloads/shaffiulla11-bat-b86d81d8adc6' ld: warning: directory not found for option '-F/Users/gavin/Desktop/shaffiulla11-bat-b86d81d8adc6' ld: warning: ignoring file /Users/Gavin/Desktop/FacebookSDK/Bolts.framework/Bolts, missing required architecture x86_64 in file /Users/Gavin/Desktop/FacebookSDK/Bolts

Lua on the iPhone?

老子叫甜甜 提交于 2019-11-27 09:38:19
问题 I am trying to use Lua on the iPhone. On Mac OS X, in a normal (non-iOS) Cocoa application, I used the following code: lua_State* l; l = lua_open(); luaL_openlibs(l); luaL_loadstring(l, "print(\"Hi from Lua\");"); lua_pcall(l, 0, 0, 0); I downloaded Lua 5.1.4 from lua.org/ftp and compiled it for Mac OS X. In the Xcode project, I used "Add Existing Framework" to add liblua.a and I used "Add Existing Files" to add the include directory. This works as expected, and prints the string: "Hi from

dyld: Symbol not found: error how to resolve this issue

时光毁灭记忆、已成空白 提交于 2019-11-27 09:18:28
I have the following code (given below) where I am using NSURLConnection for connecting and parsing the response string. But I am getting the following error: dyld: Symbol not found: _CFXMLNodeGetInfoPtr Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security I have been working on this for a long itme without being able to fix this error.

C++ Static variable and unresolved externals error

北城以北 提交于 2019-11-27 08:51:30
问题 I was hoping I could get some clarification on static variables of a class. For example: I have two different classes which perform completely different functions, alpha and beta. Within alpha, I declare a static variable of type beta so it looks like this: //alpha.h #pragma once #include <iostream> #include "beta.h" class alpha{ public: alpha(){ } static beta var; void func(){ var.setX(3); } void output(){ } }; //beta.h #pragma once #include <iostream> using namespace std; class beta{ public