linker

Linker, Libraries & Directories Information

I've finished both my C++ 1/2 classes and we did not cover anything on Linking to libraries or adding additional libraries to C++ code. I've been having a hay-day trying to figure this out; I've been unable to find basic information linking to objects. Initially I thought the problem was the IDE (Netbeans; and Code::Blocks). However I'...

Unable to link to opengl libraries? DOS / MSVC

Is there something wrong with this link.exe command line? OpenGL32.lib and Glu32.lib are found at both of the LIBPATH directories. Is it possible the libraries are somehow incompatible? Is there a way to have the link.exe say that instead of unresolved external symbol? Googling shows that this error usually means the libraries are not fo...

Using a framework in a PreferencePane

Hi, i am currently trying to implement a "third party framework" (FeedbackReporter.Framework) into my preferencepane. Unfortunately I am getting the following error all the time when trying to launch my preference pane: 16.05.10 23:13:30 System Preferences[32645] dlopen_preflight failed with dlopen_preflight(/Users/me/Library/P...

Visual Studio 2008 linker wants all symbols to be resolved, not only used ones

We recently upgraded to Visual Studio 2008 from 2005, and I think those error started after that. In our solution, we have a multitude of projects. Many of those are utility projects, or projects containing core functionality used by other projects. The output of those is lib files that are linked to when building the projects generatin...

linking problem: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Hello, Im trying to run sample app from wxFreeChart library. After compilation on linking there is an error: wxcode_msw28d_freechart.lib(wxfreechart_lib_xydataset.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' I tried to switch linker option\advanced\target machine to MachineX64 but it d...

How to read verbose VC++ linker output

Trying to debug some linker errors, I turned on /VERBOSE and I'm trying to make sense of the output. It occurs to me that I really don't know how to read it. For example: 1>Compiling version info 1>Linking... 1>Starting pass 1 1>Processed /DEFAULTLIB:mfc80.lib 1>Processed /DEFAULTLIB:mfcs80.lib 1>Processed /DEFAULTLIB:msvcrt.lib 1>Proc...

how to link with static mySQL C library with Visual Studio 2008?

Hi, My project is running fine, but its requirement for some DLLs means it cannot be simply dragged and dropped by the end user. The DLLs are not loaded when put side by side with my executable, because my executable is not an application, and its location is not in the few locations where Windows looks for DLL. I already asked a questi...

Eclipse c++ with mingw comiler cant build boost regex example, can find .a library files

Hi, I'm trying to build the boost regex example in eclipse using mingw on vista. I built boost ok with mingw as there are library files XXXX.a. I could build/compile the first boost example that doesnt require any of the compiled boost libraries. When I compile the regex example I get a linker error saying it cant find the library file....

How can I link to a specific glibc version?

When I compile something on my Ubuntu Lucid 10.04 PC it gets linked against glibc. Lucid uses 2.11 of glibc. When I run this binary on another PC with an older glibc, the command fails saying there's no glibc 2.11... As far as I know glibc uses symbol versioning. Can I force gcc to link against a specific symbol version? In my concret...

Link one shared library static to my shared library

I am struggeling a little bit with some options for linking on a project I am currently working on: I am trying to create a shared library which is linked against 2 other libraries. (Lets call them libfoo.so and libbar.so) My output library has to be a shared library and I want to static link libfoo.so to the resulting library, but libb...

linking error on MAC OS

Hi everybody, I am little new to MAC os but while building an cpp application on MAC OS X , using g++ I am getting strange error from linker. first at one step I am creating a library using several object files generated from cpp source and then I am creating a single archive using ar rvs command. If I am linking this library to anot...

Linkage of namespace functions

I have a couple of methods declared at the namespace level within a header for a class: // MyClass.h namespace network { int Method1(double d); int Method2(double d); class MyClass { //... } } then defined in //MyClass.cpp int Method1(double d) { ... } int Method2(double d) { ... } This project compiles cleanly and is a de...

How to compile a C project with more than one main function?

Hi folks, I am new to C, and now read some textbook and going to apply its examples. The problem is, whenever I creates a new project and try to put more than one file that contains a main function, the linker (as I thougt0 explains saying: /home/mohammed/tmp/abcd/main.c:4: multiple definition of `main' (BTW, I used many IDEs, MonoD...

Unresolved symbol when inheriting interface

It's late at night here and I'm going crazy trying to solve a linker error. If I have the following abstract interface: class IArpPacketBuilder { public: IArpPacketBuilder(const DslPortId& aPortId); virtual ~IArpPacketBuilder(); // Other abstract (pure virtual methods) here... }; and I instantiate it like this: class D...

Difficulties getting GraphViz working as a library in C++

Am working on a program that will allow a graph of nodes to be displayed and then updated visually as the nodes themselves are updated. I am fairly new to Visual Studio 2010 and am following the GraphViz guide located at http://www.graphviz.org/pdf/libguide.pdf in order to get GraphViz working as a library. I have the following code whic...

Linker error with Duplicated Symbols, SWIG and C++ Vectors

I came across this error trying to compile a shared object from 2 sets of objects. The first set contains one .os object compiled from one cpp file generated by SWIG. The second set is contains all of the .so files from the individual files that make up the interface to be wrapped. $g++ -shared *.os -o Mathlibmodule.so ld: duplicate...

undefined reference errors in C++

I have files Record.h and Record.cpp. When I just include the Record.h file, I get several undefined reference errors to functions defined in those files. When I also include Record.cpp then the errors go away. Why is that? Record.h has the forward declarations for the functions it says are an undefined reference. Record.h #ifndef RECO...

Xcode compile error: Can't find an (old) file I used to have

This is what happens when I try to compile my iPhone app with Xcode v3.1.4 What in the world does it all mean? (And how do I fix it?) Processing /Users/carol/Documents/MyApp/build/Release-iphonesimulator/MyApp.app/Info.plist TabBarDemo2-Info.plist cd /Users/carol/Documents/MyApp setenv PATH "/Developer/Platforms/iPhoneSimulator.pl...

Ctypes "symbol not found" for dynamic library in OSX

Hello. I have made a C++ library and have built a .dylib dynamic library from it. However when I load it with ctypes, it fails. Something doesn't seem to have linked properly. I have no idea why. The error (The relevant part): cscalelib.setup_framebuffer(flip,surface.frame_buffer,surface.texture,surface._scale[0],surface._scale[1])...

What does the -all_load linker flag do?

I can't find anywhere what the -all_load flag do when compiling Objective-C code. I have some issues uploading binaries to Apple, the they say it's because I didn't use this flag, but my code compiles even without it. Can some one help me with that? Thanks ...