static-libraries

error when using a bundle in an iOS project / how to create a correct bundle?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 03:53:19
问题 I'm trying to include a static library in an iOS project. I imported the whole static library project then I linked the lib in the 'target dependencies' and 'link binary with libraries' as that's explained here: http://www.applausible.com/blog/?p=657 But then I'm getting this error when testing the app : Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/alexis/Library/Application Support/iPhone Simulator/5.0

Mingw and Eclipse unable to find library

情到浓时终转凉″ 提交于 2019-12-24 02:13:31
问题 I'm having the issues simlar to what's described here. I created a new project, added the library path in Eclipse and added the name of the library to use. But the MingW linker can't find the library. I've tried using "/" instead of "\" (this was the solution to the issue Iiked to), as well as several other things, but no luck. Couldn't find anything that worked in the mingw documentation. My command is as follows: g++ -LD:/ocv/build/x86/mingw/lib -o OCVTest.exe "src\\OCVTest.o" -ltest.a c:

Statically linking a C++ library to a C# process using CLI or any other way

若如初见. 提交于 2019-12-24 01:55:42
问题 Is it possible to take a static library written in C++ and somehow integrate it into a .NET process in a way that the .NET process will be integrated with the lib into one exe file? What I mean is that I know I can invoke a c++ DLL from within a C# process but the user will still have to have the C++ DLL, but is it possible to use a lib instead of a DLL?(this way the user won't even know that the exe uses my library). and if it is possible, how? 回答1: Unique among other managed languages, C++

incorporate .so into another .so without dependency?

三世轮回 提交于 2019-12-24 01:41:15
问题 i have a c program that relies on a second library whose compilation i can control. i want to be able to compile my program into a shared object library without it linking to the second library. in other words i want a single monolithic shared object library at the end. how can i do this? if i separately compile the second library into a .so and include that as a dependency when compiling my program, i can see that i need that file when i run ldd on the binary. 回答1: You need to compile your

Static linking with Boost and ncurses

夙愿已清 提交于 2019-12-23 23:27:22
问题 I am in the process of making a basic role-playing game. I want to include the Boost libraries statically so that the people who run my game do not need to have them. I researched and looked-up that all you have to do is add -static to the command-line compile, so my command is like this: $ g++ -static -o karthas *.o -lncurses -lmenu -lboost_system -lboost_filesystem But apparently the -static is affecting ncurses. I am getting a whole bunch of errors, most of which are undefined reference to

iOS conditional link static library

本秂侑毒 提交于 2019-12-23 22:13:56
问题 I have a fat static library compiled for armv7 and i386. In my iPhone/iPad project everything works fine, but i can only install my application on armv7 device so iPhone 3gs and up... There is a way to run my project on armv6 so i can install it on an ipod touch and an old iphone version (also if i disable the use of armv7 library). I try this: #ifdef _ARM_ARCH_7 ... //include and use of armv7 library #else ... //not include armv7 library #endif but when i compile my project i have link error

Expose only required functions in C

有些话、适合烂在心里 提交于 2019-12-23 16:25:08
问题 I am writing a small API library sort of module in C. I will compile this module and give it to my fellow developers and I will expose some required functions in header file of my module so developers who will use my module know which function to call for required functionality. Now I want to inquire one thing: Can I expose only desired functions in C. e.g. I have test.c having: #include "test.h" void A() { if( some condition is true ) B(); else return; } void B() { //some code here } and in

How to list all externally-undefined symbols of a static library on Linux?

試著忘記壹切 提交于 2019-12-23 15:11:57
问题 I have a static library libfoo.a , which is just a compression of multiple .o files. I am looking for a way to list all symbols that appear in the static library as UND have no definition in this static library So that I can find out all external symbol dependencies of this library. 回答1: You can use this method: ld -r -o deleteme.o --whole-archive libfoo.a nm -C --undefined-only deleteme.o # `-C` if you might have C++ archive members rm deleteme.o Demo : one.c extern void two(void); void one(

Return the include and runtime lib directories from within Python

99封情书 提交于 2019-12-23 10:39:57
问题 Lets say I want to use gcc from the command line in order to compile a C extension of Python. I'd structure the call something like this: gcc -o applesauce.pyd -I C:/Python35/include -L C:/Python35/libs -l python35 applesauce.c I noticed that the -I , -L , and -l options are absolutely necessary, or else you will get an error that looks something like this. These commands tell gcc where to look for the headers ( -I ), where to look for the static libraries ( -L ), and which static library to

How to build a static library from Ada source that's callable from C++ code?

心不动则不痛 提交于 2019-12-23 09:22:11
问题 I need to build a static library with a bunch of code written in Ada that can be called from code written in C/C++. I've searched through internet and got some knowledge about gnatmake , gnatbind and gnatlink , but still can't get the job done correctly. Also, I've read there are tools that relies upon some kind of project file. I'm not interested in those, I just need a bunch of commands to write in a Makefile . 回答1: This answer assumes you’re using the GCC toolchain. The big hurdle is that