linker-errors

Visual Studio 2012 link errors with static libraries

拟墨画扇 提交于 2019-12-05 13:45:09
问题 I recently upgrade to 2012 from 2005 (I'm pretty sure) and ran into link errors when building my solution. I ran out of ideas after hours of searching google and putsing around. I've set up dozens of projects, so I'm pretty certain I've done everything right, but to be fair, it's been a few years. So, as a test I set up a new project. I called it App, a Windows application (.exe). I created a second project called Core and flagged it as a static library (.lib) in it's Configuration Type. Both

undefined reference to `typeinfo for class' [duplicate]

拟墨画扇 提交于 2019-12-05 13:28:01
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: g++ undefined reference to typeinfo Undefined symbols “vtable for …” and “typeinfo for…”? I can't use my class. class Accel { public: virtual void initialize(void); virtual void measure(void); virtual void calibrate(void); virtual const int getFlightData(byte); }; class Accel_ad : public Accel { public: Accel_ad() : Accel(){} void initialize(void) {/*code code code...*/} void measure(void) {/*measure code*/}

Why do I get an undefined reference( to `glColor3f' ,for example) when I compile a program in c?

血红的双手。 提交于 2019-12-05 13:26:48
I'm compiling an example program that uses opengl in ubuntu (linux). A short snippet of the code is the following: #include <stdlib.h> #include <GL/glut.h> void createBox( GLfloat centroX, GLfloat centroY, GLfloat corR, GLfloat corG, GLfloat corB ) { /* Cor */ glColor3f( corR, corG, corB ); I've installed all of the packages to develop in opengl (in ubuntu), namely: freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev I compile the example like this: gcc -lGL CG_ex04.c -o main and I get the following /tmp/ccDWmJDZ.o: In function

LNK2022: metadata operation failed : Inconsistent field declarations in duplicated types

穿精又带淫゛_ 提交于 2019-12-05 11:18:31
I have problem with compiling my C++ .NET project. I have read "LNK2022: metadata operation failed" driving me insane -- and this is not my case, because in my case i cannot compile one single project -- it fails at link time. i tried all (two) solutions from that topic and that didn't help me. This errors started to rise up just when i have changed the class to be a template class. i have Vector2Di (for int type) class and now need completely the same for float type, so i renamed it to Vector2D and changed it to use template, now i have: template <class T> public ref class Vector2D :

crc32() missing when building libzip on OSX 10.9

折月煮酒 提交于 2019-12-05 08:54:19
I've downloaded the latest release of libzip and am currently trying to build it on OSX and failing: Linking C shared library libzip.dylib Undefined symbols for architecture x86_64: "_crc32", referenced from: __zip_filerange_crc in zip_filerange_crc.o _crc_read in zip_source_crc.o _decrypt in zip_source_pkware.o __zip_string_crc32 in zip_string.o (maybe you meant: __zip_string_crc32) "_deflate", referenced from: _compress_read in zip_source_deflate.o (maybe you meant: _zip_source_deflate) "_deflateEnd", referenced from: _deflate_compress in zip_source_deflate.o "_deflateInit2_", referenced

Android NDK Cmake Linking .a (Static) Libs

空扰寡人 提交于 2019-12-05 08:26:58
I am using Android Studio 2.2.2 with cmake and Android NDK. I have a problem linking .a library (Static lib). Here is my cmake: # Sets the minimum version of CMake required to build the native # library. You should either keep the default value or only pass a # value of 3.4.0 or lower. cmake_minimum_required(VERSION 3.4.1) set(CMAKE_VERBOSE_MAKEFILE on) # Creates and names a library, sets it as either STATIC # or SHARED, and provides the relative paths to its source code. # You can define multiple libraries, and CMake builds it for you. # Gradle automatically packages shared libraries with

1 duplicate symbol for architecture x86_64

风流意气都作罢 提交于 2019-12-05 04:58:42
I am not sure what I have done wrong. I moved my project folder to another folder and copied the backup folder to desktop. I tried to open the backup project and build, I received the linker error. So I decided to I delete my backup folder and moved back my project folder to desktop. I can't compile anymore and received the following error. Showing Recent Issues clang: error: linker command failed with exit code 1 (use -v to see invocation) duplicate symbol _main in: /Users/BRO/Library/Developer/Xcode/DerivedData/SFITNESS-flzvwdymttxhducvwvmhpuaqfzhj/Build/Intermediates.noindex/SFITNESS.build

GLEW: Apple Mach-O Linker (Id) Error

本小妞迷上赌 提交于 2019-12-05 02:58:44
问题 I'm trying to use glew in my Xcode project, but I'm getting this: Apple Mach-O Linker (Id) Error... Undefined symbols for architecture x86_64 I'm using the current version of glew that I downloaded from their sourceforge site. 回答1: Here's what I did: Install Glew via MacPorts. (in terminal run the command sudo port install glew ) In the Xcode project's build settings add the following: other linker flags: -lGLEW header search paths: /opt/local/include/ library search paths: /opt/local/lib/

fftw in Visual Studio?

非 Y 不嫁゛ 提交于 2019-12-05 02:29:30
问题 I'm trying to link my project with fftw and so far, I've gotten it to compile, but not link. As the site said, I generated all the .lib files (even though I'm only using double precision), and copied them to C:\Program Files\Microsoft Visual Studio 9.0\VC\lib , the .h file to C:\Program Files\Microsoft Visual Studio 9.0\VC\include and the .dll to C:\windows\system32 . I've copied the tutorial program, and the exact error I am getting is: 1>hw10.obj : error LNK2019: unresolved external symbol

Link error LNK2005 when trying to compile several CUDA files together

给你一囗甜甜゛ 提交于 2019-12-05 02:19:28
问题 I have a CUDA program that works fine, but that is currently all written in one file. I'd like to split this big file into several smaller ones, in order to make it easier to maintain and navigate. The new structure is : foo.cuh foo.cu bar.cuh bar.cu main.cu The .cuh header files contain structs and function prototypes, and the .cu files contain the function definitions (as usual). The main file includes bar.cuh , and bar.cu includes foo.cuh . All the .cu files include cutil_inline.h, in