linker

Assembly/Linking problem with nasm and ld

I have a sample assembly file that I compile with nasm: nasm -f elf syscall.asm This generates a syscall.o file. I try to link it with ld: ld -o syscall syscall.o The ld command fails with the following error: ld: i386 architecture of input file `syscall.o' is incompatible with i386:x86-64 output However, if I do ld -o syscall...

Static library & Dynamic library : Confusion

I need little clarification in this area. I feel that the terms Static library & Dynamic Library are not correct. lib1.o + lib2.o + lib3.o --> "LinkerOutputFile"(executable or library). If this "LinkerOutputFile" contains the code of all the files lib1.o , lib2.o, lib3.o then its said that "LinkerOutputFile" is satically-linked "Linke...

Multiple projects need to use 1 SNK file

I'm using Visual Studio 2008 and I have a solution which contains multiple projects. I have 1 snk to sign my assemblies and this lives in a solution folder. I've linked the snk to each of my projects but now when I attempt to sign my project with that linked snk I can't find the snk file with the file dialog. Have I missed a step here...

Why am I getting "undefined reference to `glibtop_init'" during linking?

I'm building a very small C/C++ project using eclipse and i'm getting the following during build: make all Building file: ../Metric.cpp Invoking: GCC C++ Compiler g++ -I/usr/include/glib-2.0 -I/usr/include/libgtop-2.0 -I/usr/lib/glib-2.0/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Metric.d" -MT"Metric.d" -o"Metric.o" "../M...

Linking to boost_filesystem in a bjam-based project

I'm trying to set up Boost.Build for my own project, which references libboost_filesystem. When I run bjam release avg_asp I get the following output: andreas@rodin:~/src/libdoas/src/tools$ bjam release avg_asp -n /home/andreas/lib/build/boost_1_42_0/Jamroot:637: in modules.load rule targets.create-metatarget unknown in module Jamfi...

[VSC++][OpenGL] Huge Amount of Linker Issues with Release Build Only

Anyone have idea on this? Linker errors are way out of my wheelhouse, especially ones like this. Thanks for any help provided. ^_^ Is there any more info I should include? 1>Linking... 1>freeglut_static.lib(freeglut_window.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification 1>LIBCMTD.lib(dbgheap.obj) : ...

gcc ignore casing of symbol names while linking

A software I am working on ships with NETLIB BLAS/LAPACK embedded into its sources using all-lowercase symbol names but now while porting the application to windows I discovered that Intel MKL and several other BLAS/LAPACK implementations for this platform use all-uppercase symbol names. Is there a way to tell the gnu compiler/linker to ...

What COFF (windows .obj object file) viewers are available?

I am only aware of 2: dumpbin which is included with Visual Studio PEView from http://www.magma.ca/~wjr/. ...

Is compiling in debug mode possible despite a third party library having no debug-build lib?

I have an application I'm working on that uses two third party libraries, each with pre-compiled libs and dlls, one of which provides necessary .lib files for both debug and release builds (A[d].lib) and the other which provides only .lib files for release builds (B.lib). Compiling in Release mode (using MSVC9) works fine, however attemp...

How do I troubleshoot boost library/header inclusion via autoconf/automake?

I'm new to autom4te, and I'm trying to use autoconf/automake to build and link a C++ program on multiple architectures. Complicating the linking is the fact that the project requires boost (filesystem, system, program_options). I'm using boost.m4 (from http://github.com/tsuna/boost.m4/tree/), and it seems to locate all the libraries and...

How to list exported functions in a shared lib on Ubuntu

I have just built a shared lib on Ubuntu, and when I attempt to use the function, the application that loads the library is reporting 'xxx' symbol not found. I want to check (i.e. list) the functions that are exported by my library so I can investigate this issue further. Relevant details: OS: Ubuntu 9.10 compiler: gcc 4.4.1 link...

[VS - C++] Linker Errors - Unresolved external symbol

Howdy. I am working on a C++ assignment for my class. I am almost done but can't seem to figure out these errors: error LNK2001: unresolved external symbol "public: virtual void __thiscall HasQuarterState::dispense(void)const " (?dispense@HasQuarterState@@UBEXXZ) gumball.obj Gumball error LNK2001: unresolved external symbol "public: vir...

undefined reference to `boost::system::get_posix_category()'

g++ simple_wget.cpp -lssl -lboost_system -lpthread -lcrypto -lboost_filesystem /tmp/cc2jNHvk.o: In function `__static_initialization_and_destruction_0(int, int)': simple_wget.cpp:(.text+0x5eb): undefined reference to `boost::system::get_posix_category()' simple_wget.cpp:(.text+0x5f5): undefined reference to `boost::system::get_posix_cate...

DLL and fully-specialized template class

Hello, Environment: Visual Studio 9, C++ without managed extensions. I've got a third-party library which exports a fully-specialized template class MyClass<42> defined in MyClass.h. It gets compiled into a helper loader .lib and a .dll file. The .lib file contains compiled code for this specialization, and necessary symbols. The MyCla...

Is it possible to mix static, multi-threaded, DLL libraries in one project?

Is it possible to use distinct libraries A, B, C in the same project in Visual Studio, where A is a static library, B is multi-threaded and C is a multi-threaded DLL? Or do they all have to be the same type for a single .exe output? Edit: Sorry, A is a single-threaded static library. B is a multi-threaded static library, C is a multi-th...

Linking Error in Xcode

Hi All, I am getting this error after adding the libxml2.2.dylib file Linking /Users/Biranchi/Desktop/Funmovies TabBarController/build/Debug-iphonesimulator/funmovies.app/funmovies (1 error) in /Developer/Platforms/iphoneOS.platform/Developer/SDKs/iphoneOS3.0.sdk/lib/libobjc.A.dylib, missing required architecture i386 in file Comman...

Windows & C++: extern & __declspec(dllimport)

Hello, What is the difference/relationship between "extern" and "__declspec(dllimport")? I found that sometimes it is necessary to use both of them, sometimes one is enough. Am I right that: "extern" is for statically linked libraries, "__declspec(dllimport)" is for DLL (dynamically linked libraries), both do actually the same job fo...

ld linkage problems: /usr/bin/ld: cannot find [libraryname]

Im using Qmake to build a shared library on Ubuntu 9.10 This shared library (A) has a dependency on another shared library (B). project B has been successfully built. in the .pro file for project A, my LIBS variable looks like this: LIBS += -L../datelib/bin -llibdatelib_release.so.1.0.0 (I used the full shlib name because the libra...

How do I use a 3rd party C library in Xcode for my iphone project?

Hello Stack Overflow, love this site and all helpful people! I'm newbie to Xcode and iPhone programming but I've pretty much got the hang of using the SDK to make programs in Obj-C (simple programs right now but make me happy). My experience is web programming (such as PHP and Perl) and I'm not really used to a lot of the new Xcode/deskt...

Good linker documentation needed!

I need to write a little library, to be loaded by setting LD_PRELOAD, and which will override some functions in the standard C library but also call those functions in the standard library. Specifically, I want my shiny new library to let users provide their own resolv.conf so they can, eg, specify their default domain, or set aliases i...