linker-errors

LNK2022 and LNK2034 linker errors with version 10.0 of the CRT

∥☆過路亽.° 提交于 2019-11-30 04:48:25
问题 Sorry to bother anyone with this question, but I've been researching this for hours, with no resolution yet: I am porting a rather massive application to the 10.0 CRT (compiler) in Visual Studio 2010. The app is managed C++/CLI that uses /clr. Most of the code is native (95%), with a few managed portions here and there in it. So my job is to make the switch in the .vcxproj to target the newer 10.0 CRT (i.e. compiler). We were previously using v90, or using the VC compiler that came with VS

Undefined symbols for architecture error when deployment target is 7.0

大城市里の小女人 提交于 2019-11-30 04:41:44
I am using third party frameworks in my native iOS application (bunch of .a libraries). My application is developed with XCode 5 base SDK 7.0. The libraries compile and link fine when the deployment target is 6.1 (library and header search paths are good). However, when I change the deployment target to be 7.0, I get the following linker error: Undefined symbols for architecture i386: "std::string::find_last_of(char const*, unsigned long) const", referenced from: GetExecutionDir(ECTemplateString<char>&, char*, bool) in myLibrary.a(moPlatForm.o) "std::string::find(char const*, unsigned long)

Linking Boost Library in Linux

ε祈祈猫儿з 提交于 2019-11-30 02:54:43
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_time/posix_time.hpp> int main() { boost::asio::io_service io; boost::asio::deadline_timer t(io, boost::posix_time::seconds(5)); t.wait(); std::cout << "Hello, world!" << std::endl; return 0; } It can be found here on Boost's website. So, initially I just had: -I /usr

Undefined symbols for constexpr function

拜拜、爱过 提交于 2019-11-30 01:47:12
问题 When I attempt compiling the following code I get a linker error: Undefined symbols for architecture x86_64: "Foo()", referenced from: _main in main.o using LLVM 4.2. This behavior only occurs when the function is marked constexpr . The program compiles and links correctly when the function is marked const . Why does declaring the function constexpr cause a linker error? (I realize that writing the function this way doesn't give the benefit of compile-time computation; at this point I am

Symbol not found: kUTTypeImage

半城伤御伤魂 提交于 2019-11-29 21:58:58
I copied some bits of code from apple's documentation - and I got these 2 errors: Undefined symbols for architecture i386: "_kUTTypeImage", referenced from: -[ImagePicker imagePickerController:didFinishPickingMediaWithInfo:] in ImagePicker.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) What am I doing wrong? EDIT: The code: - (IBAction) showSavedMediaBrowser { [self startMediaBrowserFromViewController: self usingDelegate: (id)self]; } - (BOOL) startMediaBrowserFromViewController: (UIViewController*) controller

clang++ -stdlib=libc++ leads to undefined reference

纵然是瞬间 提交于 2019-11-29 18:41:17
问题 Why am I getting the following linker error when using clang with libc++: $ clang++ -stdlib=libc++ po.cxx -lpoppler /tmp/po-QqlXGY.o: In function `main': po.cxx:(.text+0x33): undefined reference to `Dict::lookup(char*, Object*, std::__1::set<int, std::__1::less<int>, std::__1::allocator<int> >*)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Where: $ nm -D /usr/lib/x86_64-linux-gnu/libpoppler.so | grep lookup | c++filt| grep \ Dict::lookup\( 00000000000c1870

Error LNK1561: entry point must be defined

自作多情 提交于 2019-11-29 18:00:04
问题 I am working with Visual Studio 2012. My Solution has 3 projects projectA projectB projectC and the Hierarchy is like projectC depends on projectB which in turn depend on projectA . There is a main function in projectC and no main in projectB and projectA. The errors that i am getting are: error LNK1561: entry point must be defined projectA error LNK1561: entry point must be defined projectB I have tried changing in the Configuration Properties -> Linker -> System -> SubSystem to Console (

g++ Linker errors after upgrading to gcc-4.8 on Debian, libc6

此生再无相见时 提交于 2019-11-29 15:12:16
I have just dist-upgraded a Debian Weezy machine to run gcc-4.8 from gcc-4.7. Previously the build environment was sane and was compiling normally. Now it gives the following linker errors, with any program (even a trivial hello world): /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2 /usr/bin/ld: /usr

GreenHills - small data area overflow

徘徊边缘 提交于 2019-11-29 15:05:47
I'm hoping maybe someone has a quick answer for this but essentially when I turn on optimizations, I get the following error: [elxr] (error) small data area overflow: 0xfff9f6fc (signed) didn't fit in 16 bits while performing relocation in file test_main.o at location __sti___13_test_main_cpp_252229d3+0xc, to reference symbol oe_init_intconn A similar error occurs when I put in this linker directive as well: -auto_sda Their manual doesn't make any mention of this linker error. I'm using Integrity 5.10 This linker error is usually not related to the -Olink optimization -auto_sda . The linker

Why am I getting linker errors for ws2_32.dll in my C program?

时光毁灭记忆、已成空白 提交于 2019-11-29 14:40:52
问题 I am writing my program in Visual Studio 2010. I am unable to link a file named ws2_32.dll with my project. Can anyone tell me how I can do that? 回答1: Typically you dont link to ws2_32.dll directly but to WS2_32.Lib, which you can find in the Windows SDK. So in your code you write #include <winsock2.h> and to your linker-settings you add WS2_32.Lib and you're good to go. The Windows SDK is here: http://msdn.microsoft.com/en-us/windows/bb980924.aspx 回答2: The first order of business is