linker

how to avoid "already defined error" in C++

I am gettings these type of errors in a MFC VS6 project while linking the application: msvcrt.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in LIBC.lib(atox.obj) I know what it means (a function exists in 2 different libraries); to solve it I should have to exclude one of the 2 libraries (msvcrt.lib or libc.lib). But if I do ...

Howto debug a (slow) linker on a debian system

Hello, at my company we have a really annoying problem with our linker (ld 2.17). It links very very slow on a relatively fast system (Core Duo, 2GB Ram) and i don't really now how to fix this. It takes about five to ten minutes to compile a relatively big project (which takes about 5 seconds to link on my Gentoo system). Personally i ...

Flex linking: Why is the size of my swf file smaller than the sum of it's swc's?

Here's a dumb question. I compile my Flex application with several swc's (libraries) and it creates a swf file. The sum of the swc's is roughly 4 MB yet the actual swf generated is only 1.6 MB. How is this possible? Thanks! ...

Article/book: from source code to executable program?

I'm looking for a "human readable" article which describes, with examples, if possible, the transition from source code, say C, to an executable program. Ideally, the article shall contain descriptions about the object file format, how different sections of the code maps to to that of object files et.al. That hypothetical article would a...

How to link against boost.system with cmake

...

How can I link a subroutine to Autodyn?

I want to model reinforced concrete structures in Autodyn v6.1 under blast loading. So I am writting an user subroutine to model concrete with modified properties but I cann't link writed subroutine to Autodyn. So I am trying to find the solution or find some references/websites that can help me. ...

C++ Linking and COM Registration issue

Hi I've added a new library to my application (multiple projects-DLLs) - SQLite, to perform some in memory caching. There is just one library/project that is affected by this change - Lib1. A build goes through fine. All libraries are built successfully and no errors are reported, including a couple of Com Objects. If I try to registe...

Linking errors from C language in fortran lib.

Hi, I am porting the application with old fortran compiler and old visual studio(VC5) to new fortran compiler 11 and visual studio 2005. Application contains both 'C' and fortran code. I am compiling the fortran code and creating library called server_lib.lib(library is createing with some warnings) and linking to the 'C' code. while l...

Why is msbuild and link.exe "hanging" during a build?

We have a few C++ solutions and we run some build scripts using batch files that call msbuild.exe for each of the configurations in the solutions. This had been working fine on 3 developer machines and one build machine, but then one of the projects started to hang when linking. This only happens on the newest machine which is a quad co...

How do I determine the target architecture of static library (.a) on Mac OS X?

I'm interested in verifying if a given iPhone static library has been built for ARM or Intel. Its more curiosity than anything. Is there some kind of Mac OS X or BSD specific tool to do this? This post gives an example in Linux. ...

How to call actions between classes?!

Hi guys, yeah it's me again :) I've got a little problem. I've got a custom cell with a TextField. I want the keyboard to hide when i tap "done" so normally i do this jus with [sender resignFirstResponder]. In this case that doesn't work because the custom cell is a class itself and has its own .h and .m files. How is it possible to...

Definition of fix-up?

I've seen this term in the Python Lisp compiler and some C linker's sources. My guess is that a fix-up is just some wrapper around an Assembly routine that makes sure the alignment is right, but I'm not sure at all about anything here. ...

restructuring dependencies of some files in a project using precompiled headers causes linker errors

I'm using MSVC++ 6 to build a very large project. Some of the source files in this project are shared with a small utility that we use for maintaining the application. Previously, this small utility required linking against many libs from the main app and also required the main app's DLLs at runtime. I was tasked with removing these d...

Why does removing const give me linker errors?

I have a global variable: const std::string whiteSpaceBeforeLeadingCmntOption = "WhiteSpaceBeforeLeadingComment"; When I remove the const on this variable declaration, I get many occurrences of the following linker error: error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > whiteSpac...

GCC C++ Linker errors: Undefined reference to 'vtable for XXX', Undefined reference to 'ClassName::ClassName()'

Hi, I'm setting up a C++ project, on Ubuntu x64, using Eclipse-CDT. I'm basically doing a hello world and linking to a commerical 3rd party library. I've included the header files, linked to their libraries, but I still get linker errors. Are there some possible problems here other than the obvious (e.g. I am 99% sure I'm linking to ...

How does function-level linking deal with variables declared at file level?

As I understand function-level linking builds (explicitly or not) a graph of all possible calls and only includes the reachable functions' code into the produced binary. But how does it deal with variables declared at file level? Say I have MyClass GlobalVariable; static MyClass StaticGlobalVariable; in some file that contains only t...

Release build time takes so long in VS2008

Hi, When i build the project, build time get so much time if it is release. in release, linking time is : 130secs in debug, linking time is : 15secs for the same project. there is no difference in compiling, but linking there is a huge difference. do you know why it could be? ...

How do I make an Action Script 3 class, used in two SWF files, resolve to the same class when one SWF dynamically loads the other?

Background I am developing a highly modular application in pure Action Script 3 (we are using Flex 4 SDK to automate our builds, but all our code must be able to compile directly in Flash CS4 Professional). We have a "framework.swc" file which contains interface definitions which are shared between all our modules, we have a "mainmodul...

Using boost on the iPhone

After alot of hacking i have managed to compile the boost-libraries for iphone, both device and simulator, but when i try to use them i get an error in the xcode debugger saying: dyld: Library not loaded: libboost_graph.so.1.40.0 which im guessing is a dynamic library loader which isn't allowed on the iphone. i'm linking the app with -...

Error linking with GCC 4.3.2 on RHEL 5.3 and libstdc++.so. Any GCC gurus?

Trying to use the RHEL5.3 GCC 4.3.2 compiler to build my software on that platform. I get the following error no matter what I try when compiling with -O2, but it builds fine without optimization. Any ideas? /usr/bin/ld: myapp: hidden symbol `void std::__ostream_fill<char, std::char_traits<char> >(std::basic_ostream<char, std::char_tr...