linker-errors

Odd linker issue “relocation R_X86_64_32 against” - not a typical -fPIC issue

☆樱花仙子☆ 提交于 2019-12-11 20:39:15
问题 I have an odd problem when trying to create a fat shared library on Ubuntu 14.04 (64). The error messages are what you typically get if you forgot to add -fPIC or link to a wrong architecture library: /usr/bin/ld: /usr/lib/libproj.a(pj_init.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/lib/libproj.a: error adding symbols: Bad value The first static library is compiled like this: gcc -c -fPIC -m64 NativeDB.c After

Undefined reference to cv::imread

时光毁灭记忆、已成空白 提交于 2019-12-11 20:33:36
问题 I know this has been asked several times but still I am struggling with linker error undefined reference for simple opencv code. This is my code: #include <opencv2/highgui.hpp> using namespace cv; int main(int argc, char** argv) { Mat inputImage = imread(argv[1]); imshow("Input Image", inputImage); waitKey(0); } I am using eclipse IDE, cygwin g++ compiler and opencv 3.0. I have correctly given include path, library search path as "C:\opencv\build\x64\vc11\lib" & "C:\opencv\build\x64\vc11

Apple Mach-O Linker Error in Parse Push Notification Framework

感情迁移 提交于 2019-12-11 20:23:03
问题 I have this Error: ld: 91 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) I searched for a solution for hours, but nothing really helped. Please help me, this is very annoying. I already tried a lot of things, nothing worked for me. If you still need something, let me know! This error appears, since I'm using Parse Push Notifications. Thanks, Jannes 回答1: Pls follow these link: Add all required frameworks. https://parse

Building OpenCV 2.49 with visual studio 2012

早过忘川 提交于 2019-12-11 19:15:29
问题 I try to build the OpenCV libraries with visual studio 2012 but I always get the following Error: LINK : fatal error LNK1104: cannot open file "....\lib\Debug\opencv_core249d.lib". I downloaded the latest code from the git repository and used Cmake 2.8.10.2 to create the projects. I also disabled the cuda support due to the cuda 5.0 and visual 2012 incompatibility. 回答1: Since OpenCV 2.43 does not work well with Visual Studio 2012. So I wrote a simple tutorial. http://answers.opencv.org

LNK2005, LNK1169 errors, “int __cdecl g(void)” (?g@@YAHXZ) already defined

可紊 提交于 2019-12-11 18:52:40
问题 I have 3 files in a Visual Studio project: test.cpp , date.cpp and main.cpp - test.cpp: int g() { return 0; } date.cpp: /*totally empty*/ main.cpp: #include "test.cpp" #include "date.cpp" int main() { return g(); } I understand that defining functions in a header file leads to violation of One-Definition Rule if header file is called multiple times. But here, I am calling it only once from only one file/translation unit. Why is it still throwing LNK2005? 回答1: You are including "test.cpp" in

static library works in console but not in GUI app - strange

依然范特西╮ 提交于 2019-12-11 17:57:02
问题 I have a strange error that has bothered me all day. I have a library function that I have compiled. I statically link the library to test it in a separate console application and everything builds and works ok. It is just a simple sqrt function called sqrtval at the moment. However, when I include this library in a larger graphical project then I get linker errors. I have set the Additional library directories and Additional dependency settings identically in both the console app (that works

How to get the WTTLog.lib and wttlogger.h header file for 64-bit version of WTTLog.DLL

可紊 提交于 2019-12-11 16:45:05
问题 This is in continuation for the thread "Unresolved external symbol error occurring only in 64-bit mode and not in 32-bit build" . I have a VC++ code (built using VS2008), which makes use of some static libraries (*.lib files linked statically during compile time). For ease of understanding let's refer my EXE code as "AAA.EXE" & refer the lib files as "A.lib", b.lib and LOGGER.lib (the library which is causing the below error) Both the AAA.EXE code and static libraries code (LOgger.lib) are

Error in Assembly masm linker 'link: extra operand'

浪尽此生 提交于 2019-12-11 16:23:32
问题 I installed masm for assembly programming but i have problem with link below code .586 .MODEL FLAT .STACK 4096 INCLUDE io.h .DATA prompt BYTE "shalgham", 0 .CODE _main PROC output prompt mov eax, 0 ret _main ENDP END when i assemble above code by commandLine every thing is ok but when i want to link it below error will be print in commandLine C:\Users\mahdi\Desktop\New folder>ml /c /coff simple.asm Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All

C++ Newbie: Having all sorts of problems linking

微笑、不失礼 提交于 2019-12-11 15:49:03
问题 I am having several problems with tessdll in Visual Studio 2008. FYI, I created this app as an MFC application, I did this just to take advantage of the simple GUI I needed. It is just straight C++ and win32 from there on out. This builds fine as a debug release for some reason (as I have included the header files and lib files that I need, and dll resides in every directory I could put it......). So, there is a linking problem during building a release version: Linking... MTGOBot.obj : error

MpLab Link Error: Could Not Allocate Section (C30 Compiler)

↘锁芯ラ 提交于 2019-12-11 15:11:44
问题 I have put the two pieces of code together (originally described in This Question Here). I have now just experienced this error from MpLab (Microchip MPLAB C30) Link Error: Could not allocate section .nbss, size = 20004 bytes, attributes = bss near Strangest thing, I looked for that message, even sub-strings of that message, in the Compiler manual (Microchip publication DS51284F) and found nothing. I even looked for the single word allocate and found it only three or four times, never with an