linker

Building llvm-gcc: linker errors

Hi, I have downloaded llvm and llvm-gcc sources to my machine. I was able to build both of them fine. Then I created a new source file in LLVM Analysis folder which calls into another library (sqlapi). I installed this lib into the usual LLVM libs location. I am able to build LLVM fine but when I try to build LLVM-GCC I get undefined s...

Linking error while using Visual Studio 2005(VC8)

I am getting a bunch of linking errors while trying to link the release version of an executable(debug version does not have the same issue). Comparing the command line for the link does not reveal any issues. there are broadly 2 types of errors neither of which I can get a handle on. The first kind complains about a unresolved external...

In which segment is memory for library functions allocated?

The way automatic variables/local variables go on to stack,dynamically allocated objects/data type go on to heap; where is the memory for library function calls (say printf()) allocated. In which segment? ...

How to get complete linking command instead of just CCLD / How to disable silent rules in make file

I am currently building an app and getting error in linking, here is a command, CCLD Programs/GtkBonker Now I want see the Complete linking Command, Any help is appreciated. PS. I am using GNU Build System with c++ programming language, with Ubuntu 10.04. ...

What is the right way to link to a DLL which was linked to a static library and other shared libraries?

Greetings, I hope someone has the patience to read this. I have a setup at hand, which is slightly confusing me. I have a C source code directory generated by an Eiffel Compiler. I want to use this output from Java, so I need a DLL for JNI, in which I'll implement some JNI functions. When I compile the C code, it gives me a static libr...

How do I get make to figure out the correct dependencies to link in the correct downstream object files?

I'm going to use a small example for reference. Consider a project with: inner_definitions.o : inner_definitions.cpp inner_definitions.h gcc $^ -o $@ inner_class_1.o : inner_class_1.cpp inner_class_1.h inner_definitions.h gcc $^ -o $@ inner_class_2.o : inner_class_2.cpp inner_class_2.h inner_definitions.h gcc $^ -o $@ ...

Unable to load external images in Silverlight

Hi All, I'm trying to load an image from a URL in Silverlight and have followed the steps at this site but to no avail. My code is as follows: imageUri = new Uri("http://php.scripts.psu.edu/dept/iit/hbg/philanthropy/Images/BlueSkyLarge.jpg", UriKind.Absolute); System.Windows.Media.Imaging.BitmapImage bi = new System.Windows.Media...

Replacing a C function from a common .o file for the scope of a single test executable

So, I've got a library call init_foo(), and a function bar() that calls it. These live in library.o along with some other useful stuff that both need. I want to write some code, bar_init_failure.t.c, to test what happens when init_foo() fails, without actually setting up the failure. In Perl, the bulk of our codebase, I'd launch Test::R...

Can't Find Framework .h File

I downloaded Andy Potion's "PFLetsMove" framework here and added the Xcode Project to my application's project. I then dragged the framework from that to the Link Binary with Libraries and Copy Files build phases. Now, if I compile the application with a call to PFMoveToApplicationsFolderIfNecessary() it works fine, so the framework is...

How to get a pointer to a binary section in MSVC?

I'm writing some code which stores some data structures in a special named binary section. These are all instances of the same struct which are scattered across many C files and are not within scope of each other. By placing them all in the named section I can iterate over all of them. In GCC, I use _attribute_((section(...)) plus some ...

What are the internal processes involved for a C compilation ?

hi, I have a set of *.C files(embedded related). Could anyone please detail to me the steps/processes(internal information) involved while compiling followed by linking to create the final executable(I need the information/steps regarding what a preprocessor/compiler generally performs to a C src code) Also i just want to get an idea ...

What is the __NULL_IMPORT_DESCRIPTOR good for (MSVC map file)?

I have a map file generated with microsoft visual studio. It contains a relatively big area named __NULL_IMPORT_DESCRIPTOR. What is this good for? It has something to do with linked dlls but I cannot figure out the exact purpose of it. ...

Using Visual Studio combined with Intel Fortran, how to solve using with different types of name-mangling

I have obtained program that is lovely mesh of fortran and c code. In order for this program to compile it requires a series of libraries that comes precompiled from software vendor. This included among others Intel MKL, MPICH2 etc. On linux everything works just fine. But on windows I am stuck: Using the command line, I can compile the...

Linking in C using gcc

If I wanted to link the following objects and libraries, p.o → libx.a → p.o Where a → b denotes that b defines a symbol that is referenced by a. Would UNIX% gcc p.o libx.a be enough in the command line or do I need to do something like: UNIX% gcc p.o libx.a p.o Thanks. ...

Symbol(s) not found. Collect2: Id returned 1 exit status

I received the following error: Undefined symbols: "_OBJC_CLASS_$_SurveyDelegate", referenced from: objc-class-ref-to-SurveyDelegate in Menus.o ld: symbol(s) not found collect2: ld returned 1 exit status The error was caused by removing SurveyDelegate and was fixed when I removed the code that tried to use a survery delegate. ...

cannot find -lcantpp collect2: ld returned 1 exit status Fatal Error CCD1105

Linking with "gcc" C:\MinGW\bin..\lib\gcc\mingw32\3.4.5........\mingw32\bin\ld.exe: cannot find -lcantpp collect2: ld returned 1 exit status Fatal Error CCD1105: Linking failed Please help me how to fix? ...

Linking to a Library requires MFC80U.LIB

I am trying to compile the SkpWriter example from the latest SketchUp C++ SDK. However, the linker gives me LNK1104 saying that "mfc80u.lib" could not be found since one of the static libraries (Utils.lib) in the SDK depends on some MFC 8 libraries. I am using VS2008 and only mfc90u.lib is available. Is there a way to use mfc90u.lib in ...

Boost Libraries: Unable to link regex library on MAC OS X

I'm trying to use the Boost Libraries ... but to no avail. I attempted to follow the Getting Started tutorial on Boost's website (for Unix Variants), but having problems along the way. I compiled the libraries into a directory in my Downloads folder: /Users/myUsername/Downloads/boostCompiled When I use the full path to the library .....

VS2008 not linking to all functions in a library

Our project is a VS2008 based project using Boost and Qt heavily. However, today we have a new linking problem that doesn't make any sense. What is happening is that during the link For program A, our static library Foobar is finding links to 5 of the 8 member functions. For program FoobarUnitTest, everything from Foobar links and ru...

OpenCV link problem

HI I switched from visual studio 2008 to 2010, now I have problem linking my lib files from opencv 1.1 I've added required libs and .h files. but I get following error: "Error 53 error LNK1181: cannot open input file 'cv.lib.obj' C:\Users..\SOLOUTION_NAME\PROJECT_NAME\LINK" ...