linker

fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2' version '20050411'

I compile my project with VIsual Studio 2005 Express Edition, and get this linking error. Can anyone suggest how to solve that? ...

Why does fatal error "LNK1104: cannot open file 'C:\Program.obj'" occur when I compile a C++ project in Visual Studio?

I've created a new C++ project in Visual Studio 2008. No code has been written yet; Only project settings have been changed. When I compile the project, I receive the following fatal error: fatal error LNK1104: cannot open file 'C:\Program.obj' ...

Visual Studios Link.exe error: "extra operand"

Our build process uses Visual Studios 2003 link.exe for linking. On one machine we're seeing the following error: _X86_Win32/Debug/Intermediate/OurApp.exe LINK: extra operand `/subsystem:windows' Try `LINK --help' for more information It appears to be using the same version of visual studios as the other machines. Has anyone encount...

What does the "no version information available" error from linux dynamic linker mean?

In our product we ship some linux binaries that dynamically link to system libraries like "libpam". On some customer systems we get the following error on stderr when the program runs: ./authpam: /lib/libpam.so.0: no version information available (required by authpam) The application runs fine and executes code from the dynamic libra...

Is it feasible to compile Python to machine code?

How feasible would it be to compile Python (possibly via an intermediate C representation) into machine code? Presumably it would need to link to a Python runtime library, and any parts of the Python standard library which were Python themselves would need to be compiled (and linked in) too. Also, you would need to bundle the Python in...

#defines in linker scripts

For an embedded system I need to place a few data structures at fixed addresses, so that a separate control CPU can access them at a known location. I'm using linker scripts for the embedded target to accomplish this, plus #defines of those same addresses for the control CPU. It bothers me that these address constants are therefore defi...

gcc3.3 undefined reference to std::_Rb_tree<>::insert_unique

I'm building a shared library with g++ 3.3.4. I cannot link to the library because I am getting ./BcdFile.RHEL70.so: undefined symbol: _ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13insert_uniqueERKj Which c++filt describes as std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>, std::a...

linker woes - undefined reference

Hi! I'm having a problem with my compiler telling me there is an 'undefined reference to' a function I want to use in a library. Let me share some info on the problem: I'm cross compiling with gcc for C. I am calling a library function which is accessed through an included header which includes another header, which contains the proto...

Why is my parameter passed by reference not modified within the function ?

I have got a C function in a static library, let's call it A, with the following interface : int A(unsigned int a, unsigned long long b, unsigned int *y, unsigned char *z); This function will change the value of y an z (this is for sure). I use it from within a dynamic C++ library, using extern "C". Now, here is what stune me : y ...

Strange MFC / VC++ Linker Error (std::list<CRect> already defined)

I've got a really odd error message that only occurs when I add the following line to my project: std::list<CRect> myVar; It's worth noting that it doesn't have to be a std::list, it can be std::vector or any other STL container I assume. Here is the error message: Error 1 error LNK2005: "public: __thiscall std::list ...

Increase Stack Size on Windows (GCC)

Is there a way to increase the stack size of a Windows application at compile/link time with GCC? ...

Does static array constness affect shared library layout?

Consider these two C++ header cases: Case 1: class Test { public: static int TEST_DATA[]; }; int Test::TEST_DATA[] = { 1, 2, 3, 4 }; Case 2: class Test { public: static int const TEST_DATA[]; }; int const Test::TEST_DATA[] = { 1, 2, 3, 4 }; Is const in the latter case only for self-imposed compile-time checks or does i...

Unresolved External Symbol Errors switching from build library to exe or dll

I am building an application as a library, but to make sure I can get the output that I'd like, I switched it over to produce an exe. As soon as I did, I got several errors about unresolved external symbols. At first I thought that I didn't have a path set to the 3rd party library that I was referencing, so I added the folder to my pat...

Static and dynamic library linking

In C++, static library A is linked into dynamic libraries B and C. If a class, Foo, is used in A which is defined in B, will C link if it doesn't use Foo? I thought the answer was yes, but I am now running into a problem with xlc_r7 where library C says Foo is an undefined symbol, which it is as far as C is concerned. My problem with th...

Linking against a specific shared library version in linux

My build process consists of Qt's qmake Makefile generator and the typical make utility bundled with linux. My application consists of a few shared libraries and the main application is linked against them. How can I apply the typical linux versioning scheme on my libraries? (Use version 2 -> link against foo.so.2 that points to foo.so.2...

What library should be included to use TransparentBlt?

What library should be included to use TransparentBlt? This is VC98 (Visual Studio 6) linking to the Gdi32.lib. (Other GDI functions such as BitBlt link as expected), and the compilers compiles with out error or warning. Even though the Gdi32.lib is included, yet the linker returns this error: mtcombo.obj : error LNK2001: unresolved ...

linker out of memory LNK1102

My colleagues and I have tried to build a project containing several thousand classes , but we're getting a LNK1102 error ( Linker out of memory ) . I've seen several tips on the internet , such as increasing the virtual memory . We tried but this didn't help . We've also seen some as enabling different warning levels when compiling the ...

C# Default scope resolution

I have inherited a c# class 'Button' (which I can't change) which clashes with the BCL class 'Windows.Forms.Button'. Normally, Id be very happy to go: MyPackage.MyClass.Button; But there are a large number or references to this class which is a pain to have to re-type. Is there any way to get the compiler (linker?) to default to usin...

static variables in an inlined function

I have a function that is declared and defined in a header file. This is a problem all by itself. When that function is not inlined, every translation unit that uses that header gets a copy of the function, and when they are linked together there are duplicated. I "fixed" that by making the function inline, but I'm afraid that this is a ...

Problem with static library in C++

Hi all, I'm trying to use a static library created by me in Visual C++ 2005 (unmanaged C++). I declare one function "int myF(int a);" into a .h file, I implement it in a .cpp file, I compile it - the .lib file is produced. I create a new project (a separate solution) in VC++ 2005 (also native C++), I add the paths for the include file ...