linker

Variable dissapears in binary which is available in static lib

Hi, I have the problem mentioned. I create an object inside a static lib, it is there when I run nm on the static lib, but when i link the lib to a binary and run nm it has disappeared. I know this problem has been asked before, but I could not find any answers. It is important for me to be able to retain that variable in the binary ...

XCode 3.2.3 running on iOS3 - Wired framework problem

I looked around on Stack Overflow and I didn't find the solution of a strange problem. I started developing a project on XCode 3.1 then I decided to upgrade on XCode 3.2.4 and targeting iOS3 iPhones. I then followed the topics dealing with that and I changed the Base SDK to iOS 4.1 and the target os to 3.0. Everything worked fine until ...

Linking with --whole-archive flag.

Hi, This problem is related to This question I asked yesterday. Now it seems that the linker flag --whole-archive forces the test object to be included in the binary. However, in linking with, g++ main.cpp -o app -Wl,--whole-archive -L/home/dumindara/intest/test.a -Wl,-no--whole-archive I get the following error: /usr/lib64/gcc/x8...

Linker driving me mad! Please help.

Hi, I have 3 tiny files which I use to make a static library and an app: test.h #ifndef TEST_H #define TEST_H class Test { public: Test(); }; extern Test* gpTest; #endif test.cpp #include "test.h" Test::Test() { gpTest = this; } Test test; main.cpp #include "test.h" #include <iostream> using namespace...

Linker question..... again.

Possible Duplicate: ld linker question: the --whole-archive option So, What does this linker flag do? --whole-archive And has anyone had trouble with this? If so how to solve it? Thanks for any help. ...

whole-archive flag doesnt work for me...

Possible Duplicate: Linker driving me mad! Please help. Hi, I have used the --whole-archive flag and it does not have the desired effects. What can I do? Who should I ask? More detailed description here. Please help. Thanks. ...

Linking to wrong library version in a C++ application

I'm troubleshooting a C++ binary on RHEL/CentOS 5, which has problems with the openssl shared libraries. I don't do much C/C++ programming, and I'm having trouble finding the root issue. What seems to be going wrong is that the application is linking to specific versions of libcrypto and libssl (0.9.8), instead of the symlinked paths of...

Why am I getting these linker errors?

I'm getting the following linker errors: Error 1 error LNK2001: unresolved external symbol "public: __thiscall AguiEvent<class AguiEmptyEventArgs>::AguiEvent<class AguiEmptyEventArgs>(void)" (??0?$AguiEvent@VAguiEmptyEventArgs@@@@QAE@XZ) AguiWidgetBase.obj Error 2 error LNK2001: unresolved external symbol "public: void __this...

Linking with new version of libpcap library

Hello, I would like to install and use latest version (1.1.1) of the libpcap on CentOS 5.5 machine. I configured, compiled and installed new libpcap library by: [dima@localhost libpcap-1.1.1]$ ./configure [dima@localhost libpcap-1.1.1]$ make [dima@localhost libpcap-1.1.1]$ sudo make install But when I'm trying to link with libpcap sh...

OpenMP library specification

hello , i am new to open mp and i tried an sample program from the official site #include <omp.h> #include <stdio.h> int main() { #pragma omp parallel printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads()); } and i have set the library in the eclipse as libgomp in project Properties->GCC c++ linker-...

LNK2022 Error When Using /clr

I'm having a problem linking a C++ project in VS2008 when using the /clr compile option. I am getting the following build errors: Class1.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (_PROPSHEETPAGEA): (0x0200046f). Class1.obj : error LNK2022: metadata operation failed (...

fatal error LNK1127: library is corrupt --> after adding extern "C" to function prototype

Hi all, I have an external library made using C code. I wish to call a function from the library in my c++ project. The original format of the function prototype was. extern void butterThreeBp(real_T eml_dt, real_T eml_fl, real_T eml_fu, real_T eml_b3[7], real_T eml_a3[7]); And this caused the following linker error in MSVC2008 error...

Undefined references

Linker Error: $ make g++ -Wall -g main.cpp SDL_Helpers.cpp Game.cpp DrawableObject.cpp `sdl-config --cflags --libs` -lSDL_mixer /tmp/ccdxzrej.o: In function `Game': /home/brett/Desktop/SDL/Game.cpp:16: undefined reference to `Player::Player(Game*)' /home/brett/Desktop/SDL/Game.cpp:16: undefined reference to `Player::Player(Game*)' colle...

Building Mesa 3d 7.9 with llvmpipe from LLVM 2.8

First of all, this regards 64bit builds of both in Windows, by Visual Studio 2008, 32bit is no problem. Quite simple question; has anyone successfully built Mesa 7.9 with LLVM 2.8 as pipe? If so, do you happen to remember if you did any changes to SConstruct or any other build related file? I get numerous linking errors whatever I do. ...

Linker for Clang?

Which linker do I use for clang? If I use clang or ld as a linker, I get massive amounts of errors as if I didn't link with the standard library. g++ $(OBJS) -o $(BINDIR)/obtap It seems I have to use g++ in order to link my clang objects. ...

DelayLoading a DLL and the associated .lib file

I am attempting to delay load wintrust.dll and crypt32.dll in my application (these are used to perform digital signature/publisher checks in a DLL). I am using VS2008. After adding these two DLLs as entries in the Delay Load property in the Linker section of my project properties, I still get LNK4199 warnings that nothing was loaded fro...

Conditional linking of sections in a program using linker command file input to a linker?

hi, Is it possible to link conditionally(like an if..else) by using the linker command file? Suppose i am having two two conditions and i need to link two different section by checking that condition in the linker command file while linking? I am using a custom linker (star core - a flavor of gcc) of Freescale. __Kanu ...

LNK2019 and LNK1120 with functions in an external file

I have taken out some functions from a source file into another since I want to use them also in other files. The current structure is as follows utils/extFuncs.h #ifndef _extFuncs_h #define _extFuncs_h inline int someFunction (float v); #endif utils/extFuncs.cpp #include "utils/extFuncs.h" inline int someFunction (float v) { re...

How do I build a command line tool that links against the iPhone Simulator SDK?

Why the hell would I want to do that? The OpenGL Shader Builder is a great development tool, but it compiles shaders using desktop OpenGL, which allows some things that ES does not. I figure if I can create a tool that links against the OpenGLES.framework in the iPhone Simulator SDK, I can get some error reporting without having to build...

two shared libraries ( have some same source code ) can not be loaded at the same tine?

Development Tool : Sun Studio 11 Flags : CXXFLAGS=-O2 -g I have two shared libraries, libA.so libB.so : /A/root.cpp /A/a.cpp are used to generate libA.so /B/root.cpp /B/b.cpp are used to generate libB.so /A/root.cpp and /B/root.cpp is identifical libA.so and libB.so will be dynamically loaded during main program running when load...