linker

Beginner questions regarding to "building a library", in Xcode on iPhone specifically.

Hi, I have never been clearly understand all these linking/building/dependency business. Now, I am trying to build the FreeType library (which is in C++), into the *.a library file for the iPhone (because another library I am trying to use, openFrameworks, would depend on FreeType). I know that to compile C++ with iPhone I simply need ...

How can I disable "demand paging" for one of my userspace programs ?

For an dedicated test I have to disable "demand paging" for exactly one of my userspace programs http://en.wikipedia.org/wiki/Demand_paging Any idea how I could do this ? (embedded linux appliance; 2.6 kernel) ...

What am I missing from my environment variables for my linker to fail with LNK1181?

I have a Qt project which I have had a debug console displayed whilst I am developing, I am about to ship the product to I removed the qmake console command: CONFIG += console However when I do that I get the following error: link /LIBPATH:"c:\Qt\4.5.0\lib" /NOLOGO /INCREMENTAL:NO /LTCG /MANIFEST /MANIFESTFILE:"./_obj/win32\Lynx.interm...

"Multiple definition of" C++ compiler error

I can't seem to get rid of these seemingly random compiles errors in one of my classes. I get about 4 errors such as: multiple definition of `draw_line(float, float, float, float)' and multiple definition of `near_far_clip(float, float, float*, float*, float*, float*, float*, float*)' that are flagged in the middle of the method. I a...

log4cpp in borland codegear 2007

I'm trying to make work the library and run the tests provided with the latest version of log4cpp on Borland Codegear 2007, in which it's included a bpr project for Borland C++ Builder 5, which it's meant to be able to build and run the different tests. The problem is that i'm trying to open this project with the 2007 version, which has ...

Linux linker flag -lXi not finding lib when compiling Lazarus code

After I solved my first problem I got into another one. Looks like I'm missing some kind of library, making the linker complain that the -lXi is not working. I've included most of the Xorg devel packages, what more do I need? ...

How to translate the -lXi flag in a linux linker to the appropriate lib?

How does one find out what is the lib that the above flag is referring to? How would I do it for some other one? ...

several definitions of the same class

Playing around with MSVC++ 2005, I noticed that if the same class is defined several times, the program still happily links, even at the highest warning level. I find it surprising, how comes this is not an error? module_a.cpp: #include <iostream> struct Foo { const char * Bar() { return "MODULE_A"; } }; void TestA() { std::cout << "...

How to get memory locations of library functions?

I am compiling a C program with the SPARC RTEMS C compiler. Using the Xlinker -M option, I am able to get a large memory map with a lot of things I don't recognize. I have also tried using the RCC nm utility, which returns a slightly more readable symbol table. I assume that the location given by this utility for, say, printf, is the l...

Linker Error while building application using Boost Asio in Visual Studio C++ 2008 Express

I just started writing a small application in C++ using Visual Studio C++ 2008 Express. I installed the Boost Library using the windows installer. While compiling the program i get the following error : Compiling... stdafx.cpp Compiling... websave.cpp GoogleAuthenticate.cpp Generating Code... Compiling manifest to resources... Microsof...

Trying to make a flash advert link to a website

I have three Flash adverts that need to act as a direct link to the advertiser's website. I can't get it to work! I am putting in the code, directly into the advert and the cursor will now come up over the advert, but it won't click. ...

How do linkers decide what parts of libraries to include?

Assume library A has a() and b(). If I link my program B with A and call a(), does b() get included in the binary? Does the compiler see if any function in the program call b() (perhaps a() calls b() or another lib calls b())? If so, how does the compiler get this information? If not, isn't this a big waste of final compile size if I'm l...

Framework linking error, image not found?

I'm using DarwiinRemote's WiiRemote.framework in my app. I already fixed some issues by downloading the source code and requiring garbage collection, and building for 10.5. However, when I try to add it to my project, I get the console error: dyld: Library not loaded: @executable_path/../Frameworks/WiiRemote.framework/Versions/A/WiiRe...

Complicated error LNK2005: already defined C++

Hi, I'm getting the LNK2005: already defined in (...) error when building my project in Visual Studio 2008. I've referenced other related questions, but mine seems to be a bit more complicated due if nothing else to the number of files I'm working with. First, I think it will be helpful for me to map out the #include statements I have i...

What is the link_.exe file?

I am having trouble with my linker, I asked a question but have not got an exact solution. However its a problem with a linker called LINK_.exe Does anybody know why this file is different or why it is called just after LINK.exe during my compile? I am using Visual Studio 2008 SP1 on Windows XP SP3. For a C++ project. Further to tha...

linking a shared library using gcc

Hello, I have a shared library (*.so) created using Real View Compiler Tools (RVCT 3.2) on windows target. Then i try to link this *.so file with my application using gcc on linux system. What is the gcc option to link this shared library with my application linux? My question is the option -shared used as gcc -shared myfile.so is u...

How do you "decode" Visual Studio Link Errors?

I'm not very experienced in C++, and when I have to work with another library and I get link errors, I'm completely in the dark on what the compiler is trying to tell me (other than it can't find something reference somewhere). Are there any good links that describe, in detail, the meaning of the symbols and characters in a link error m...

Best Way to automatically find links to your content?

So, here is the task I've found myself thinking of. Pretend for a moment, that I have a large body of content. I want to see what websites are linking to my content. I know that I could look into TrackBack or PingBack but what about those that aren't using tools capable of dealing with that? It would seem that some form of Web Crawler t...

How do you build a debug .exe (MSVCRTD.lib) against a release built lib (MSVCRT.lib)?

I'm using Visual C++ 2008, SP1. I have a QT app (gui, .exe) in debug build config. It's set to use the Multi-threaded Debug DLL version of the CRT, aka MSVCRTD.lib. I'm linking against a 3rd party library that is built in release mode and using the Multi-threaded DLL (non-debug) version of the CRT, aka MSVCRT.lib. It links and runs but...

What are the negative consequences of including and/or linking things that aren't used by your binary?

Let's say that I have a binary that I am building, and I include a bunch of files that are never actually used, and do the subsequent linking to the libraries described by those include files? (again, these libraries are never used) What are the negative consequences of this, beyond increased compile time? ...