linker

How to prevent a globally overridden “new” operator from being linked in from external library

落花浮王杯 提交于 2020-01-11 19:56:03
问题 In our iPhone XCode 3.2.1 project, we're linking in 2 external static C++ libraries, libBlue.a and libGreen.a. libBlue.a globally overrides the " new " operator for it's own memory management. However, when we build our project, libGreen.a winds up using libBlue's new operator, which results in a crash (presumably because libBlue.a is making assumptions about the kinds of structures being allocated). Both libBlue.a and libGreen.a are provided by 3rd parties, so we can't change any of their

Undefined reference to

徘徊边缘 提交于 2020-01-11 12:32:29
问题 I keep getting this error message every time I try to compile, and I cannot find out what the problem is. any help would be greatly appreciated: C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::List()' C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::add(int)' collect2: ld returned 1 exit status code: //List.h #ifndef LIST_H #define LIST_H #include <exception> //brief Definition of linked list

Undefined reference to

无人久伴 提交于 2020-01-11 12:32:29
问题 I keep getting this error message every time I try to compile, and I cannot find out what the problem is. any help would be greatly appreciated: C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::List()' C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::add(int)' collect2: ld returned 1 exit status code: //List.h #ifndef LIST_H #define LIST_H #include <exception> //brief Definition of linked list

Undefined reference to

一曲冷凌霜 提交于 2020-01-11 12:32:21
问题 I keep getting this error message every time I try to compile, and I cannot find out what the problem is. any help would be greatly appreciated: C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::List()' C:\DOCUME~1\Patrick\LOCALS~1\Temp/ccL92mj9.o:main.cpp:(.txt+0x184): undefined reference to 'List::add(int)' collect2: ld returned 1 exit status code: //List.h #ifndef LIST_H #define LIST_H #include <exception> //brief Definition of linked list

The application was unable to start correctly (0xc000007b) Visual Studio C++

这一生的挚爱 提交于 2020-01-11 12:03:20
问题 I have a simple hello world c++ program which links sqlite3.dll (64 bit version). I have added sqlite3.h and sqlite3.dll correctly in the respective paths. The projects compiles for 64 bit architecture. The compilation and linking goes fine. The problem arises when I try to run the exe. I have seen many questions here that suggest to use dependency walker. I am putting the screenshot here: I don't understands why it fails since the sqlite3.dll is in the exe's folder. And if I understand well

The application was unable to start correctly (0xc000007b) Visual Studio C++

▼魔方 西西 提交于 2020-01-11 12:03:03
问题 I have a simple hello world c++ program which links sqlite3.dll (64 bit version). I have added sqlite3.h and sqlite3.dll correctly in the respective paths. The projects compiles for 64 bit architecture. The compilation and linking goes fine. The problem arises when I try to run the exe. I have seen many questions here that suggest to use dependency walker. I am putting the screenshot here: I don't understands why it fails since the sqlite3.dll is in the exe's folder. And if I understand well

The application was unable to start correctly (0xc000007b) Visual Studio C++

谁说胖子不能爱 提交于 2020-01-11 12:02:08
问题 I have a simple hello world c++ program which links sqlite3.dll (64 bit version). I have added sqlite3.h and sqlite3.dll correctly in the respective paths. The projects compiles for 64 bit architecture. The compilation and linking goes fine. The problem arises when I try to run the exe. I have seen many questions here that suggest to use dependency walker. I am putting the screenshot here: I don't understands why it fails since the sqlite3.dll is in the exe's folder. And if I understand well

MS VC linker (link.exe): Why no warning for 32/64 bit CPU architecture mismatch?

二次信任 提交于 2020-01-11 09:52:12
问题 (Update: As per Hans' suggestion, here's a suggestion to improve link.exe's behaviour, and you can vote for it if you have an account over there.) Okay, I'm a fool. In January I installed Oracle on my computer, Win7 Pro 64 Bit. I installed the 64 Bit version. Yesterday, using MSVC Express, I tried to compile and link a small test programm oci1.c against oci.h and oci.lib . cl /nologo /c /I%ORACLE_HOME%\oci\include oci1.c link /nologo oci1.obj /LIBPATH:%ORACLE_HOME%\oci\lib\msvc oci.lib My

QT undefined reference errors when trying to compile

六月ゝ 毕业季﹏ 提交于 2020-01-11 08:41:51
问题 I added a class IcecastServer to my QT-project, added the header-file to the pro file and added some code. Everytime I compile it the following errors occur: release/icecastserver.o:icecastserver.cpp:(.text+0x39): undefined reference to _imp___ZN10QTcpServerC1EP7QObject' release/icecastserver.o:icecastserver.cpp:(.text+0x50): undefined reference to imp ZN12QHostAddressC1ENS_14SpecialAddressE' release/icecastserver.o:icecastserver.cpp:(.text+0x68): undefined reference to _imp__

gcc link the math library by default in C on mac OS X?

我与影子孤独终老i 提交于 2020-01-11 03:24:13
问题 From this question: Why do you have to link the math library in C? I know that C math library (libm) is separated from C standard library (libc), and is not linked in by default. But when I compiled the code below using gcc filename.c without -lm on mac osx 10.11.1 : #include <math.h> #include <stdio.h> int main (void) { double x = sqrt (2.0); printf ("The square root of 2.0 is %f\n", x); return 0; } There's no link error and the output executable file works correctly. Then I tried otool -L