fltk cmake ubuntu link error

I am trying to compile a simple FLTK program but it always brings a link error. When I build with this command, it works g++ -I/usr/local/include \ -I/usr/include/freetype2 \ -D_LARGEFILE_SOURCE \ -D_LARGEFILE64_SOURCE \ -D_THREAD_SAFE \ -D_REENTRANT

clang - visibility of symbols does not work as expected

I have a sample program like this: #include <stdio.h> #if 1 #define FOR_EXPORT __attribute__ ((visibility("hidden"))) #else #define FOR_EXPORT #endif FOR_EXPORT void mylocalfunction1(void) { printf("function1\n"); } void mylocalf

Incorrect use of incomplete type Qt

I have a little problem : finddialog.h #ifndef FINDDIALOG_H #define FINDDIALOG_H class QDialog; class QWidget; class QLineEdit; class QPushButton; class QCheckBox; class QLabel; class FindDialog : public QDialog { Q_OBJECT public: FindDialog(QWidget

How to link Armadillo with Eclipse

I want to use Armadillo with Eclipse. However all the instructions to link Armadillo is given for Visual Studio. Now I followed the instructions outlined in the ReadMe file of the Armadillo library. I added the Armadillo include folder in project(rig

OpenCV linking problems with ROS

I'm trying to compile this project (following the instructions given). When building it with rosmake, I get a bunch of undefined reference to cv::String::deallocate() and undefined reference to cv::String::allocate(unsigned long). I find curious that

Linking files using makefiles

I have two directories at the same level. I want to use the header file created in one directory in the source file of the other directory. I want to achieve the same without providing relative or absolute path to the header file. The directory struc

How to make a library in C ++ as stl

I have made my own implementations of many of the STL features like Vectors, Lists, BST, Queue, Stack and given them all the functions that an STL corresponding library has.... Now i want to use this library by #include "myLibName.h" What I Did

Apple Mach-O Link Error with Third Party SDK

I've gone through all the Mach-O linker error entries in stackoverflow but could not solve the issue. Please refer to the following information : I am using a third party SDK framework in my application. XCode 5.1, iOS7.1 SDK, iPad Application Mach-O

Reference error not defined in the links

When I'm trying to link two programs with extension .o , gcc compiler "throws" me that undefined reference and something else that I don't understand. I link these programs at Cygwin terminal with that command : gcc -o file file1.o file2.o I don

External symbol not resolved when creating an object

I am trying to run a main.cpp which access 3 different classes. For some reason, I am getting a unresolved external symbol error. From what I've seen online, its clearly a linking error somewhere, but I cannot find it. I've listed the error below, bu

Issues with sqlite3.h with gcc

I'm working on Linux Mint 15. I've downloaded sqlite-amalgamation-3080002.zip from http://www.sqlite.org/download.html (and put the files in my project directory) I've done (even though I know it's redundant to the previous step): sudo apt-get instal

Problems with GLEW with Visual Studios

I have tried several ways to get GLEW working with my VS2010 project. No success. At first I tried using the pre-built libs and dlls from the website. I downloaded these pre-built files from http://glew.sourceforge.net/index.html and did something li

Replace a DLL with the Static Library

Staring point: I have some C++ code that links to a third party static library which links to ws2_32.lib. Goal: I am investigating ways to port this C++ code to an embedded platform that is essentially a Win32 platform, except it does not allow any d

Reduce .rodata's size

I'm crosscompiling C++ in Gentoo for an ARM Cortex M3 (Maple Mini), but seem to have hit a roof with the memory resources when linking the elf-file /usr/libexec/gcc/arm-none-eabi/ld: build/maple_mini.elf section `.rodata' will not fit in region `rom'

Xcode 4.4 clang error: linker failure

After upgrading to Mountain Lion and Xcode 4.4 today, one of my projects is no longer compiling. I've verified that it still compiles ok on Xcode 4.3. This is the output I'm getting - any ideas? Ld "/Users/Adam/Library/Developer/Xcode/DerivedData/Hom

How to use shell32.dll from the C ++ console application

What I need to do is to get ApplicationData path , I've found in Google that there is function called HRESULT SHGetFolderPath( __in HWND hwndOwner, __in int nFolder, __in HANDLE hToken, __in DWORD dwFlags, __out LPTSTR pszPath ); But it exists in she

How to fix a link error with PKEY_Device_FriendlyName

Upon using PKEY_Device_FriendlyName, I'm getting the following errors: Error 1 error LNK2001: unresolved external symbol _PKEY_Device_FriendlyName DefaultAudioDeviceCPP.obj Error 2 fatal error LNK1120: 1 unresolved externals C:\Users\srobertson\Docum

How to call the assembly code library c in Linux?

I'm trying to compile a little program in Linux assembly on Intel architecture. I want to use some functions of the C library, but it doesn't link. Here is my assembly program : .text .globl main main: pushl $512 call malloc addl $4, %esp mov $1, %ea

Unusual VC linker error LNK1107 which refers to link.exe

I am getting a really strange linker error appearing: link.exe : fatal error LNK1107: invalid or corrupt file: cannot read at 0x270 But this is strange, because usually the error message tells you what object is invalid or corrupt. In other words, ty

How to handle linker errors in the C ++ / GNU toolchain?

Given a C++/GNU toolchain, what's a good method or tool or strategy to puzzle out linker errors?With gcc toolchain, I use: nm: to find the symbols in object files ld: to find how a library links c++filt: to find the C++ name of a symbol from its mang

CString link error

I'm getting a linker error using CString the error is: error LNK2001: unresolved external symbol "private: static class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > CConfiguration::_campaignFol

Hierarchical Ldd (1)

Due to using Gentoo, it often happens that after an update programs are linked against old versions of libraries. Normally, revdep-rebuild helps resolving that, but this time it's a dependency on a python library, and python-updater won't pick it up.