linker-error

MinGW linking problem

I have a linking problem with MinGW. These are the calls: g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug/Simulation.exe debug/LTNetSender.o debug/main.o debug/simulation.o debug/moc_simulation.o -L'c:/Programmieren/Qt/4.5.2/lib' -lmingw32 ...

Error and warnings in Xcode when declaring Array of NSString* as a global extern

I am declaring an array of NSString* in a header file of a class. PolygonShape.h NSString* POLYGON_NAMES[] = {@"Invalid Polygon", @"Monogon", ...}; Now I am using this in PolyginShape.m as follows: - (NSString*) name { return (POLYGON_NAMES [self.numberOfSides]); } numberOfSides is an iVar which will indicate the index at which the...

QT 4.5 - How do I enable LTCG in VS2005 when linking to QT libraries?

While attempting to link with QT 4.5 release, I run into this error message fatal error C1047: The object or library file 'c:\qt\2009.02\qt\lib\qtmain.lib' was created with an older compiler than other objects; rebuild old objects and libraries I have been using the same compiler for my current projects to compile QT 4.5 ...

Confused by Unresolved external symbol error

I'm trying to build a wrapper library with VC++'s compiler. ErlDriver.c #define __WIN32__ #define DLL_EXPORT __declspec(dllexport) #include "erl_driver.h" DLL_EXPORT int _driver_output(ErlDrvPort port, char *buf, int len) { return driver_output(port, buf, len); } build.bat cl /I%ERL_DRIVER_H% /LD /MD ErlDriver.c When I attem...

linker problem a list of const reference::push_back in boost::lambda::if_then

Hi experts, The following codes compiled and linked fine with g++-4.0 on a Mac OSX for_each(As.begin(), As.end(), boost::lambda::if_then( boost::lambda::bind(&A::get_string, boost::lambda::_1)==" CA ", boost::lambda::bind(&std::list<A>::push_back, &As_copy, boost::lambda::_1) ) ); But when I try to populate a conta...

xcode linker error

I'm trying to compile a bundle that uses a third party library. I've had this working a while ago, but now it just refuses to link. Here's a sample of the errors: "lwpp::GlobalBase<char const* ()(char const*)>::globPtr", referenced from: __ZN4lwpp10GlobalBaseIFPKcS2_EE7globPtrE$non_lazy_ptr in main.o __ZN4lwpp10GlobalBaseIFPKcS2_E...

Link errorLNK2005 in VC++

I have a programme I which I want to implement button class. I have declared all my variable in button.h and defined all methods in button.cpp and I am calling these functions in WINMAIN the following error appears. keylogger.obj : error LNK2005: "struct HBITMAP__ * hOldBmp" (?hOldBmp@@3PAUHBITMAP__@@A) already defined in Button.obj Th...

Building FLTK Project in Eclipse

I am having trouble getting set up with FLTK in Eclipse. I am trying to create an OpenGL window with the following code (which I found here): #include <FL/Fl.H> #include <FL/Fl_Gl_Window.H> #include <FL/gl.h> // // Simple resizable 2D GL window // erco 10/08/05 // class MyGlWindow : public Fl_Gl_Window { // DRAW METHOD // ...

Problem Linking Boost Library in Linux

I am trying to build a project using Boost's Asio and I am having some trouble. Initially, I tried to build the project without any additional libraries since everything is supposedly in the header files. The program I am trying to build looks like this: #include <iostream> #include <boost/asio.hpp> #include <boost/date_time/posix_tim...

Trying to include a library, but keep getting 'undefined reference to' messages

I am attempting to use the libtommath library. I'm using the NetBeans IDE for my project on Ubuntu linux. I have downloaded and built the library, I have done a 'make install' to put the resulting .a file into /usr/lib/ and the .h files into /usr/include It appears to be finding the files appropriately (since I no longer get those err...

"Nonrepresentable section on output" error during linking on linux

I get this error at the linker stage when compiling the webkit-1.1.5 package on my Ubuntu 9.04 box: libtool: link: gcc -ansi -fno-strict-aliasing -O2 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -W...

iPhone library: file is not of required architecture

Hey, I have searched for hours however I still have no clue what is wrong with my configuration. My project uses a self-written libray (myLib). This library is compiled to work only for simulator and it works perfectly there. What do have to change so it compiles for my iPhone Device as well? This is my current warning: ld: warning:...

LNK2019 and LNK1120 with templated function

After having some problems with these two linker errors on SO, I have them again. However, this time the source seems to lie at another point. compiler error shows that it cannot find a function with signature ""public: unsigned int __thiscall MyClass::myFunction<unsigned int>(int)const ". However, moving the contents of myClass.cpp to...

Multiple definitions of Split

Maybe I should still be in bed. I woke up wanting to program. At any rate, now I'm getting some linker errors that I'm baffled over. What do you make of all this? I hope I'm not posting too much of it. I was going to post just a piece, but that didn't feel right. I checked some of the header files mentioned in the errors, but I didn't se...

LNK2001 using a std::vector of a custom struct

I want to have some data cache which contains some objects which I can update over an UpdateCache function. However, I'm getting problems with a LNK2001 followed by a LNK1120. HeaderFile.h #ifndef headerfile_included #define headerfile_included #include <vector> struct MyObject { unsigned int A; unsigned int B; }; class MyClass...

Accessing private variable from Category generates linker error

I have the following code: @interface UIAcceleration (Simulation) - (id) initWithTimestamp:(NSTimeInterval)aTimeStamp X:(UIAccelerationValue)ax Y:(UIAccelerationValue)ay Z:(UIAccelerationValue)az; @end @implementation UIAcceleration (Simulation) -(id)initWithTimestamp:(NSTimeInterval)aTimeStamp X:...

Boost::Archive causing weird linker error.

Does anyone have a clue why those two lines would cause that linker error? std::ifstream ifs("filename.file"); boost::archive::binary_iarchive iarchv( ifs ); Error 8 fatal error LNK1104: cannot open file 'F:\dev\project\build\win32-unit\tests\Debug\framework_core_tests.lib' ramework_core_tests framework_core_tests T...

C++ Newbie in Linker Hell

Hello all, Using g++ and having linker errors. I have a simple program in split into two modules: main.cpp and Dice.h Dice.cpp. main.cpp: #include <iostream> #include "Dice.h" int main(int argc, char **argv) { int dieRoll = Dice::roll(6); std::cout<<dieRoll<<std::endl; std::cin.get(); return 0; } Dice.h: #ifnde...

FLTK in Cygwin using Eclipse (Linking errors)

I have this assignment due that requires the usage of FLTK. The code is given to us and it should compile straight off of the bat, but I am having linking errors and do not know which other libraries I need to include. I currently have "opengl32", "fltk_gl", "glu32", and "fltk" included (-l), each of which seem to reduce the number of e...

Undefined reference

I'm getting this linker error. I know a way around it, but it's bugging me because another part of the project's linking fine and it's designed almost identically. First, I have namespace LCD. Then I have two separate files, LCDText.h and LCDGraphic.h. LCDText.h: //[snip] void TextDraw(Widget *w); void TextBarDraw(Widget *w); void T...