linker

PVCS compiler -- Linkflags and LINK : warning LNK4044: unrecognized option '/link'; ignored

I am using the PVCS compiler in conjunction with Microsoft Visual Studio 2008 (a/k/a version 9.0). In any event, we are using a “.inc” file to set up our makefiles. The situation for linkflags is not good, We need something like: LINKFLAGS = /link /NODEFAULTLIB:MSVCRT.lib If the “/link” part is removed, the flags are not seen or rec...

static linking on AIX with pthread

I've been reading and researching this for a couple of days now, and decided I need some outside assistance! (and this site seemed like a nice place, so I thought I'd post my question here and see how it goes) our little company hasn't built our applications on AIX for several years, and I've been assigned this task (good thing I like ...

Stomp.framework iPhone linking. Anyone have experience?

Having trouble linking the Stomp.framework into an iPhone SDK application. http://code.google.com/p/stompframework/ I follow the instructions, adding it to the project, adding a Build Phase for Copying the Files, and including it via #import . I keep getting "image not found". Anyone try this and/or have a clear idea why? ...

Extending std::list

I need to use lists for my program and needed to decide if I use std::vector or std::list. The problem with vector is that there is no remove method and with list that there is no operator []. So I decided to write my own class extending std::list and overloading the [] operator. My code looks like this: #include <list> template <clas...

Beginner C++ Question - Unresolved external symbols!

Don't be too hard on me! Simply put: foo.h: #include "bar.h" class foo { private: bar it; void DoIt(); } bar.h: class bar { public: void Test(); } foo.cpp: void foo::DoIt() { it.Test(); } This will result in a: error LNK2001: unresolved external symbol Why? ...

What should I do in order to succesfully link a C++ Builder 6 project in C++ Builder 2009 without unresolved external references to CodeGuard things?

Here's what I did: I've opened a C++ Builder 6 - project in C++ Builder 2009. Auto-converted it to a C++ Builder 2009 project. Told it (C++ Builder 2009) to build everything. Here's what it did: Successfully compiled everything. Failed to complete ILINK32, exiting with "Error: Unresolved external '_CG_DESC' referenced from MyProj...

How would you list the available functions etc contained within a compiled library?

How do I determine whether a function exists within a library, or list out the functions in a compiled library? ...

How do I link PDCurses to a C++ application on Windows?

I'm building a C++ application and need to use PDCurses on Windows. I'm compiling with VC++ from MS VS 2005 and I'm getting a link error. error LNK2019: unresolved external symbol __imp__GetKeyState@4 referenced in function __get_key_count There are 11 errors all with the same error code and different symbols. The missing symbols...

profile linking times with gcc/g++ and ld

I'm using g++ to compile and link a project consisting of about 15 c++ source files and 4 shared object files. Recently the linking time more than doubled, but I don't have the history of the makefile available to me. Is there any way to profile g++ to see what part of the linking is taking a long time? Edit: After I noticed that the ...

Installing and Linking PhysX Libraries in Debian Linux

Hello! I am trying to get PhysX working using Ubuntu. First, I downloaded the SDK here: http://developer.download.nvidia.com/PhysX/2.8.1/PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz Next, I extracted the files and installed each package with: dpkg -i filename.deb This gives me the following files located in /usr/lib/PhysX/v2.8.1: li...

How is it possible to resolve unresolved symbols (LNK2001) for _RTC_InitData and _RTC_Shutdown

I am building an x64 lib in Visual Studio 2008, and separately linking it into an x64 DLL (specifically using the WDK Build.exe toolchain in this case). Most general C runtime symbols link fine, indicating that the library versions are sufficiently well-matched, but these two RTC_* symbols specifically fail. Forcing different runtime lib...

How to include/link C .lib files in a Delphi project.

We have a .lib file with functionality that must be included in a Delphi application. It is easy to include .obj files, but for some unknown reason, this won't work for .lib files. The help is not very helpful on this. And a google search did not help that much (most helpful was to use an other linker but I would like to avoid it if pos...

How to link a .DLL statically?

We have a (pure native C++) .DLL that is build by VS. As clients we have some native C++ applications and a .Net-Wrapper around this DLL written in C++/CLI. Finally there are some client applications for the .Net-Wrapper written in C#. My problem is that the native.dll must be distributed in a different way than the .Net world works and...

C++ Standard and Global Symbol Removal

Anyone have a link to what the C++ standard says regarding a compiler removing global and static symbols? I thought you weren't guaranteed that the compiler will remove global symbols if they're not referenced. A colleague of mine asserts that if your global symbols are included in the main translation unit, those symbols will not be re...

Global Variable identification in C code base

I have a C code base and need to programmatically identify all of the global variables used. I think that gcc can be made to produce a memory map file but don't know how and this might let me see which variables are global? Any help would be appreciated. Cheers ...

C++ Linker Error

Hi, I had a function like this, that wasn't within a class: // Gets the maximum number of tracks displayable const utils::uint32 GetConstMaxSystemRange() { return constMaxSystemNumber - constMinSystemNumber + 1; } It compiled fine in VS2005, but then I got linker errors for each file after the first one to include it, even thoug...

Limiting visibility of symbols when linking shared libraries

Some platforms mandate that you provide a list of a shared library's external symbols to the linker. However, on most unixish systems that's not necessary: all non-static symbols will be available by default. My understanding is that the GNU toolchain can optionally restrict visibility just to symbols explicitly declared. How can that b...

Reduce windows executable size

I have a C++/MFC app on windows - dynamically linked it's only 60kb static it's > 3Mb. It is a being distributed to customers by email and so needs to be as small as possible. It statically links the MFC and MSCVRT libraries - because it is a fix to some problems and I don't want more support calls about missing libs - especially the...

Environment overrides for Linux linker/loader

Earlier today I asked a question about environ, and one of the more interesting replies suggested that I could gather information using LD_DEBUG. Now I've known about some linker/loader environment variables (such as *LD_PRELOAD*) for awhile, but this one was new to me. Googling, I found a Linux-specific man page discussing environment ...

Linking issue with indirect dependencies on Mac OS X

Hi all, we have some linking problems with indirect dependencies. Guessing from what I read on the web it may be because of two-level namespace usage. This happens when we link against a boost library, boost_filesystem to be precise, which itself depends on boost_system. The linker doesn't resolve the dependency between boost_filesystem ...