linker

What's the fastest C++ linker for Windows platform?

Hello, Apparently the speed of the C++ linker in Visual Studio 2010 hasn't improved that much (about 25% in our case). This means that we're still stuck with linking times between 30 seconds and two minutes. Surely there are linkers out there that perform better? Does anyone have experience with switching to another linker or even a com...

When Linking: use -l flag or just treat archives as input

I had some problems linking the static library stxxl into a shared library as outlined in my question Linking a static library into Boost Python (shared library) - Import Error The command I was using was g++ -Wall -pthread -march=i686 -I/home/zenna/Downloads/stxxl-1.3.0/include -include stxxl/bits/defines.h -D_FILE_OFFSET_BITS=64 -D_L...

Visual Studio - Finding which modules are causing C1905 (processor incompatibility)

I'm attempting to make an x64 build of a project with Visual Studio 2005. It's currently failing with linker error C1905, 'Front end and back end not compatible (must target same processor).' From what I gather, this is essentially saying that my x64 build is attempting to link with x86 modules. Unfortunately, this project links with a ...

Name mangling problems when using GNU linker to link to VC++ compiled library.

In asking this question, I'm looking for either better understanding of the situation or preferably a solution. I'm created C++ code and I would like to be able to use the Eclipse CDT IDE rather than Visual Studios, (my workplace is more Eclipse friendly). This implies that, practically speaking, I must use the GNU tool chain to compil...

Name mangling problems when using GNU linker to link to VC++ compiled library.

Possible Duplicate: Name mangling problems when using GNU linker to link to VC++ compiled library. In asking this question, I'm looking for either better understanding of the situation or preferably a solution. I'm created C++ code and I would like to be able to use the Eclipse CDT IDE rather than Visual Studios, (my workplac...

Why do I need special libraries (binaries) built for each Visual C++ version?

There are a lot of C++ libraries (most?) that come with special binaries built for each Visual C++ version (2003, 2005, 2008, 2010). What's the problem about linking a C++ library built for Visual C++ 2008 with Visual C++ 2010? ...

C++ - building static library question

Hello! I built libbz2 (static variant) using MinGW (GCC 4.5.0) compilation system and now try to import this library into my MSVS2008 project. I've done these things already and everything worked fine, for example, with zlib (which means that created C libraries are actually interchangeable). However, when doing the same with libbz2, ...

LNK1561 Linking Error in MSVS2010 when main is defined

I have been making several projects to compile small SDL code tutorials from a tutorial site in Microsoft Visual Studio 2010 using C++>Empty Projects; and all of these projects have compiled fine. In all of these projects I've used this version of main for my entry point: int main (int argc, char* args[]) { //code... return 0; }...

Force gcc to use one linker over another

Lately I have been working on OS X. Things were going pretty peachy for a while until somehow ld got on my system and now gcc won't use dyld. Furthermore, all of my shared libraries are in *.dylib format, and ld is stubornly ignoring there existance. If I mv ld from PATH, gcc just complains it cant find ld. Please help me to get gcc ...

Turning on linker flags with CMake

When generating VS2010 targets with CMake, I would like the /LTCG flag turned on (only for release + releasewithdebinfo if possible, but its okay if its on for debug builds). How do I modify the linker flags? add_definitions() doesn't work because that only modifies compiler flags. And yes, I have wrapped it in if(MSVC). How do I modify...

Is it good to link a shared library against other shared libraries?

I have an application X which uses shared libraries A,B and C. Shared library C also uses some symbols from Shared library A. Application X is linked against A and B during compile time and it does dlopen to load C at run time. My question is Is it a good idea to link C against A during link time or leave the symbol resolution for run...

Linker error 348: Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Greetings everyone. I am hitting a road block on a very strange linker error and I thought I would throw it out here in the community to see if anyone has any thoughts (or better yet has seen it before). The error is this: error 348: Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions pr...

linux g++ linking 64 bit shared library code to static libraries

Context: I can create a shared object library which is linked to a static library without any problems on 32bit linux. When I attempt the same build on 64bit linux, I see this linker error: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC This error is quite common on...

On which Linux distribution should I link for best binary compatibility?

I'm wondering which Linux distribution would be best (i.e. introduces the least dependencies) when linking a binary that should work on as many distributions as possible against shared libraries. I've done it on Ubuntu, but the list of dependencies is horrible. SDL introduces PulseAudio and whatnot. My next guess would be to use Debian ...

How can I isolate third-parties' C/C++/ObjC libraries' symbols from each other?

I have a project that needs to incorporate two third-party libraries, libA and libB. I have little, if any, influence over the third-party libraries. The problem being is that both libA and libB include different versions of a common library, ASIHTTPRequest. As a result, I'm getting errors like: -[ASIFormDataRequest setNumberOfTimesToRe...

How to include a dll file that is been wrapped into a new dll?

In my application I have to explicitly link to a dll. The application is in QT with gcc compiler. The dll the application have to link to is a wrapper around another old dll. The purpose is to fit the old dll to a new interface. I use implicit linking when compiling the new dll. The new dll is compiled with msvc 2008. The reason is th...

Suppress output to cout from linked library

I need to link my C++ programs against a couple shared libraries which generate way too much output to std::cout and std::cerr rendering them both useless for my uses. I have access to the C++ source code of these libraries, but cannot modify them. Is there a way to redirect their output to a different stream or suppress it when linked ...

Visual Studio Linking errors. MFC, CRT order?

This questiod had been brought up numerous times, but Visual Studio never gives up to challange me. We have an application that should be self sufficient, i.e not depend on any dlls. This is why we build everything statically with MT(d) code generation flags. The app depends on Qt, zlib, OpenSSL and DCMTK. All of them were built as sta...

mfc42u.dll Error while migrating from VC6 to VS2005

I have migrated my VC6 application to VS2005, all my code got compiled with some changes and there is no compilation error. But I am getting a linking error LNK1104. LINK : fatal error LNK1104: cannot open file 'mfc42u.lib' I have imported the dsw of VC6 in Visual Studio 2005, not sure from where it is still referring to the mfc42u.lib ...

Is it possible to read an LLVM bitcode file into an llvm::Module?

I'm writing a compiler with LLVM. Each source file is compiled into an LLVM bitcode file. Eventually the linker links and optimizes all the bitcode files into one final binary. I need a way to read the bitcode files in the compiler in order to access the type information. The LLVM documentation shows a class called BitcodeReader, but th...