linker

How variables of .bss are resolved in final image?

Hi, Pardon me if this question is too trivial! It is known that the final executable does not allocate space for the uninitialized data within the image. But I want to know, how are the references to the symbols with in .bss get resolved? Does the object file contain only the addresses of these variables of .bss some where else and N...

link with libc-dbg and libc-prof

I got multiple versions of libc installed, how do I choose which to link with at compile time? Right now i'm compiling like g++ prog.cpp ...

Error in linking to friend functions

I have a class 'Vector3' which is compiled successfully. It contains both non-friend and friend functions, for example, to overload * and << operators when Vector3 is the second operand. The problem is I can't link to any of the friend functions, be it operator overloaded or not. So I can confirm that the error is not specific to operato...

TI C2800 DSPs: troubleshooting linker problems between C++ and assembly code

I have a function sincos_Q15_asm() in assembly, in file sincos_p5sh.asm with directives as follows: .sect ".text" .global _sincos_Q15_asm .sym _sincos_Q15_asm,_sincos_Q15_asm, 36, 2, 0 .func 1 The function works fine when I test it by itself (assembly only), but when I try to link to it, I get a linker error: undefined ...

Linking С++ - BDB - LNK2001

BDB is compiled on the same PC, under same VS. #include <db_cxx.h> int main(){ Db b(NULL, 0); return 0; } 1>main.obj : error LNK2001: unresolved external symbol ""public: virtual __thiscall Db::~Db(void)" (??1Db@@UAE@XZ)" 1>main.obj : error LNK2001: unresolved external symbol ""public: __thiscall Db::Db(class DbEnv *,unsigned ...

SDL with Code::Blocks and Visual Studio 2008 VC++ Compiler

I've looked around on Google for tutorials on setting up SDL with it. The problem is that all the tutorials for linking to SDL with Code::Blocks is with the Mingw compiler, and never with VC++ 2008 Compiler. I have the SDL for VS downloaded at C:\SDL. The problem is, I can't get it to work with Code::Blocks. What do I need to do? I tri...

What happens to identifiers in a program?

Hello, I'm a novice programmer. I just wanted to see output at different phases compilation, assembling & linking. I don't know assembly language also. I wrote a simple program #include <stdio.h> int humans = 9; int main() { int lions = 2; int cubs = populate(lions); return 0; } int populate(int crappy...

not clear with the job of the linker.

I'm using C language on windows. This question was previously part of http://stackoverflow.com/questions/1986549/what-happens-to-identifiers-in-a-program . I broke it to reduce no. of questions. This is a standalone query (doesn't depend on the previous question) If there is nothing to link (i.e.. I'm not using any libraries. I know it ...

System.Web.Extensions Assembly cannot be resolved

I am trying to run a .NET 4.0 Console application that references a sister library project (Bar.dll) which itself references System.Web.Extensions in VS2010 B2. I am currently only interested in getting access to System.Web.Scripting.JavaScriptSerializer. Both projects have references to System.Web.Extensions (using the one listed under...

How do I sort the symbols of other sections besides the "COMMON" section?

The gnu linker "ld" supplies the option "-sort-common" which sorts the uninitialized global parameters, known as the COMMON section symbols, by their size. When the linker aligns the symbols to even addresses, this option helps minimizing the holes in the section. For example, if we define: --main.c char a; short b; ch...

windbg 6.11 doesnt work properly, and didnt load my pdb file. the old version works

i wrote a masm test program, compiled it with ml /c /coff /Zi then linked with link /debug /subsystem:console /entry:start test.obj kernel32.lib it works after compile/link . now , i just open the windbg 6.11, load the exe then press F10 twice, it doesnt show the source code. and the test.pdb is not loaded. my symbol path include the ...

What is the equivalent of Linux's ldd on windows?

What is the equivalent of Linux's ldd on windows? ...

debug via going into preprocessing, compilation, assembly and linking

Hi, Sometimes when there are errors output by gcc, one will break down the the process for each stage of preprocessing, compilation, assembly, linking by options like -E, -S and -c. Here is an example. I just wonder what types of errors could happen at each of these four stages and if there is one error occuring at one of these stages ...

Linking error VC++

I download Neoncube downloader and tried to compile. After I resolved some linking issues, there's still three that I can't solve. 1>main.obj : error LNK2019: unresolved external symbol _UnEmbedBrowserObject referenced in function "long stdcall NoticeWindowProcedure(struct HWND *,unsigned int,unsigned int,long)" (?NoticeWindo...

linking objective c++

I am trying to figure out why when I convert my main.m file to a main.mm file, it no longer will link properly. I have reduces the problem to the following example code: #import <Foundation/Foundation.h> #import <AppKit/AppKit.h> int main( int argc, const char ** argv ) { return NSApplicationMain( argc, argv); } I am using gnustep an...

Can I link unresolved reference to abort?

I'm trying to write some small tests for a fairly small part of a fairly large project. Attempting to link this beast is unfortunately fairly impossible without linking the entire project together, which I don't want to do (it's a pretty complex system for finding all the dependencies and stuff, and I perfer not to meddle with it). Now,...

Link an external library at runtime in .NET

Hi, Is it possible for my application to monitor a folder that if we copy a DLL (library) in it, the application will pick it up and link it? I did a similar thing in C++ back in the days but is it possible to dynamically link a library in .NET? Thanks ...

ambiguous symbols

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5934) : error C2872: 'IDataObject' : ambiguous symbol 1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(251) : System::Windows::Forms::IDataObject IDataObject' 1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows....

Troubleshooting compile time link errors

I'm trying to statically link to libcrypto.a (from the openssl library) after building it from source with a new toolchain. However whenever I try to use any of the functions from that library, I keep receiving "undefined reference" errors. I've made sure the right header file was included. I've also double checked the symbol table of li...

Why does the C++ linker require the library files during a build, even though I am dynamically linking?

I have a C++ executable and I'm dynamically linking against several libraries (Boost, Xerces-c and custom libs). I understand why I would require the .lib/.a files if I choose to statically link against these libraries (relevant SO question here). However, why do I need to provide the corresponding .lib/.so library files when linking m...