static-libraries

Building OpenSSL VC++ Static 64bit Libs

我只是一个虾纸丫 提交于 2019-12-24 16:35:21
问题 I am attempting to build OpenSSL 1.0.1e static 64-bit libs with VC++ 2010. (The last one that I successfully built like this was 1.0.1c, if that might be a factor. And currently I am also able to successfully build the 32-bit flavor of 1.0.1e with no problems.) I am using ActiveState Perl, nasm, and all the correct tools to do this build, I believe. The INSTALL.W64 file only has instructions for building the DLL, which unfortunately I cannot use. I am calling the proper "%VS100COMNTOOLS%....

Much larger static library generated by xcode

99封情书 提交于 2019-12-24 14:59:41
问题 I have a C++ project which is compiled to a universal shared library. Now, I also want a static library for the same. When I reuse the shared library Xcode project to create static library, the size of static library created is much smaller (~ 3MB) as compared to when I create a separate Xcode Static Library project to compile my code ( ~19 MB) . (universal - 32 & 64 bit) Here is what I tried with the shared library project: xcodebuild -project MyLibrary.xcodeproj build MACH_O_TYPE=staticlib

How to compile an application with Static OpenCV Library on macOS via CMake

江枫思渺然 提交于 2019-12-24 12:19:46
问题 I have a question about how to configure the CMakeLists.txt file so that I can compile a program on macOS without using shared library, means it can be run on another macOS computer without requiring the installation of OpenCV. I have added the set(BUILD_SHARED_LIBS=OFF) to the CMakeLists.txt file, but when I check the compiled program by typing otool -L ./MyProgram on Terminal, it show me the following: /usr/local/opt/opencv/lib/libopencv_gpu.2.4.dylib (compatibility version 2.4.0, current

How can I install Armadillo on Windows?

扶醉桌前 提交于 2019-12-24 10:58:10
问题 I need to install and use Armadillo library to deal with linear algebra . I went to their websites and downloaded .tar.xz file, but I have no idea how to install it. How can I install Armadillo ? (I'm primarily using Dev-C++ , but I also sometimes use XCode ) 回答1: If you are using Windows, you might be using Visual Studio for compilation. Extract tarball using 7zip or other extraction software and save it in the directory of your choice. For example your path could be, C:\armadillo . In the

Unresolved external symbol when linking my library

血红的双手。 提交于 2019-12-24 09:59:57
问题 I've compiled my own library file(.lib) with VS2010, but when I try to reference it like #pragma comment(lib,"path/to/lib.lib") I keep getting unresolved external symbols...What am I doing wrong? the #pragma comment(lib, "*.lib") worked for any library so far, and I also tried linking it under settings, no succes. 回答1: 1) Open a VS command console (Tools/Visual Studio Command Prompt). 2) Use cd command to change to the directory containing the library in question. 3) Enter: dumpbin /all my

Buildroot: Build only one package as both shared and static lib, all others shared only

只愿长相守 提交于 2019-12-24 09:55:02
问题 buildroot offers to possibility to build only static, only shared, or both shared and static libs of the selected packages. The assigned configuration elements are BR2_STATIC_LIBS , BR2_STATIC_LIBS , and BR2_SHARED_STATIC_LIBS . Question: Is it possible to build both a shared and static lib for one package only , while building only shared libs for all the other packages ? The one project which I want a static lib of would be an autotools-based package. My effort: I did read the manual, but

An executable and a shared library dependent on a same statically linked library

心已入冬 提交于 2019-12-24 05:59:48
问题 Suppose you're developing a shared library libshared.so . And you have a static library libstatic.a with some internal classes and functionality you need. You'd like to link it to your .so like this: g++ -o libshared.so -shared myObj.o -lstatic Also you have an executable.sh which will use your .so and dynamically open it in the runtime dlopen("libshared.so", RTLD_NOW) You know this executable was as well statically linked against libstatic.a (but you're not sure the version of the library is

An executable and a shared library dependent on a same statically linked library

徘徊边缘 提交于 2019-12-24 05:59:07
问题 Suppose you're developing a shared library libshared.so . And you have a static library libstatic.a with some internal classes and functionality you need. You'd like to link it to your .so like this: g++ -o libshared.so -shared myObj.o -lstatic Also you have an executable.sh which will use your .so and dynamically open it in the runtime dlopen("libshared.so", RTLD_NOW) You know this executable was as well statically linked against libstatic.a (but you're not sure the version of the library is

Compile errors with C++ static library include in Swift project

倾然丶 夕夏残阳落幕 提交于 2019-12-24 05:09:08
问题 I created a static library that includes the follow C++ files: //TestClass.h File: #ifndef TESTCLASS_H_ #define TESTCLASS_H_ using namespace std; #include <string> class TestClass { public: TestClass(); virtual ~TestClass(); int sum(int x, int y) const; string chain(const string& x, const string& y) const; }; #endif /* TESTCLASS_H_ */ //TestClass.cpp File: #include<iostream> #include "TestClass.h" TestClass::TestClass() { } TestClass::~TestClass() { } int TestClass::sum(int x, int y) const {

Static library with dynamic dependencies

◇◆丶佛笑我妖孽 提交于 2019-12-24 04:38:11
问题 I have come across quite a few similar questions, however I didn't really get my answer. So, I have an App.exe that depends on Static.lib, which in turn depends on a dynamic library Dynamic.dll. In Static.lib I link to Dynamic.lib import library. I do understand that now the App.exe has to have Dynamic.dll in it's directory in order to run successfully, however when I try to link the code I get an error that the App project can't find Dynamic.lib import library. My question is, why does the