static-linking

MSBuild.ILMerge.Task not allowing Duplicate Types

喜你入骨 提交于 2020-01-07 04:24:47
问题 I'm getting the following error from a call to ILMerge. ILMerge.Merge: ERROR!!: Duplicate type 'System.Net.Http.HttpRequestMessageExtensions' found in assembly 'System.Net.Http.Formatting'. Do you want to use the /alllowDup option? And you'd think this would be straightforward to solve. The error message says what to do. But my call to ILMerge is made by MSBuild.ILMerge.Task And it seems I'm already doing what I need to do to get this to happen... From my ILMerge.props file: <!-- added in

Problems linking CUDA-compiled with Boost-using code

亡梦爱人 提交于 2020-01-07 03:09:43
问题 Questions about CUDA-cum-Boost interaction occasionally pop up her on SO, but they are always (?) about compilation : CUDA has trouble with Boost's voodoo tricks. The common wisdom is to isolate your code using Boost from your CUDA-compiled code. So, I've done this: I'm writing a small CUDA utility, with boost::program_options nicely limited to use in the implementation of a single class. My problems are in linking . I'm working on Debian Stretch (64-bit), which is built with GCC 5.x (and

linking with static library in C

隐身守侯 提交于 2020-01-06 04:26:24
问题 Hi I'm a beginner in C and Linking, I was reading a book that has a question in linking with static library: Let a and b denote object modules or static libraries in the current directory, and let a→b denote that a depends on b, in the sense that b defines a symbol that is referenced by a. For each of the following scenarios, show the minimal command line (i.e., one with the least number of object file and library arguments) that will allow the static linker to resolve all symbol references:

qmake gives code 3 when attempting to configure qt for static building

百般思念 提交于 2020-01-05 04:14:27
问题 I have the latest Qt SDK. I'm trying to configure it for static building with VS2010 (dynamic linking works fine) I have it at this location: C:\QtSDK\Desktop\Qt\4.8.0\msvc2010 When I go there with the VS2010 command prompt and try to run configure -static, or configure -static I get some output but in the end it fails with Generating Makefiles... WARNING: c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\projects.pro:44: Unable to find file for inclusion src\src.pro WARNING: c:\QtSDK\Desktop\Qt\4.8.0

Statically link OpenSSL in XCode

我是研究僧i 提交于 2020-01-02 05:46:09
问题 I am trying to link libssl.a and libcrypto.a static libraries in XCode command line project [under Link Binary With Libraries]. I have included Openssl header files in search path. Compilation succeeds but execution fails with dyld: Library not loaded: /usr/local/ssl/lib/libcrypto.1.0.0.dylib . Why does it look for dylib when I am linking it statically? How can this be fixed? Any help would be appreciable. 回答1: Why does it look for dylib when I am linking it statically? How can this be fixed?

What's the use of the .eh_frame section in C programs?

自作多情 提交于 2020-01-02 02:22:08
问题 I have a statically linked executable compiled from a C program. objdump -x a.out indicates the presence of the .eh_frame section, even after strip -s . Why is this section useful in a C (non-C++) program? What are the risks of stripping it (with strip -R .eh_frame )? 回答1: From remyabel's comment and OP's confirmation, the answer to the OP question is available via another SO question as linked by: Why GCC compiled C program needs .eh_frame section? 来源: https://stackoverflow.com/questions

poco c++ static linking problems with undefined references to symbols

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 10:56:09
问题 I'm trying to link to static versions of the POCO C++ libs like this: g++ BCCMain.o -L$_POCO_LIBS -Wl,-Bstatic $_POCO_LIBS/libPocoFoundation.a $_POCO_LIBS/libPocoUtil.a $_POCO_LIBS/libPocoXML.a $_POCO_LIBS/libPocoJSON.a -Wl,-Bdynamic -o BCMain Unfortunatelly this gives errors about some undefined references to symbols like: Poco::Logger::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) even though Poco::Logger::get(std::string const&) actually IS defined in

g++ including boost library

五迷三道 提交于 2020-01-01 09:38:08
问题 i builded my boost library with bjam, and then moved all the .a files into c:\Server\libs\boost_1_46_0\lib if i want to compile my program there is some error: the compile command g++ -Ic:\Server\libs\boost_1_46_0\ -Lc:\Server\libs\boost_1_46_0\lib\ -lboost_thread-mgw45-mt-1_46 -o try1 try1.cpp the errors C:\Users\FEHERG~1\AppData\Local\Temp\ccB46To7.o:try1.cpp:(.text+0xe9): undefined reference to `_imp___ZN5boost6thread4joinEv' C:\Users\FEHERG~1\AppData\Local\Temp\ccB46To7.o:try1.cpp:(.text

Xcode Multiple Static Libraries and Duplicate Symbols

懵懂的女人 提交于 2020-01-01 03:22:10
问题 I'm developing an iPad application which relies on two static utility libraries (libBFSDK & libBetfair-Platform). Both static libraries include AFNetworking. When I try to include the two static libraries in my iPad application, I get a linking error like: duplicate symbol _OBJC_METACLASS_$_AFImageCache in: /Users/osheas/Library/Developer/Xcode/DerivedData/Betfair-gnnjnwtovdmtoxakuxbjyvetciyy/Build/Products/Debug-iphonesimulator/libBFSDK.a(UIImageView+AFNetworking.o) /Users/osheas/Library

Difference between linking OpenMP with -fopenmp and -lgomp

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 02:38:06
问题 I've been struggling a weird problem the last few days. We create some libraries using GCC 4.8 which link some of their dependencies statically - eg. log4cplus or boost. For these libraries we have created Python bindings using boost-python. Every time such a library used TLS (like log4cplus does in it's static initialization or stdlibc++ does when throwing an exception - not only during initialization phase) the whole thing crashed in a segfault - and every time the address of the thread