CMAKE – How to properly copy static library’s header file into /usr/include?

A better way for newest cmake version is to use target’s PUBLIC_HEADER properties. project(myproject) add_library(mylib some.c another.c) set_target_properties(mylib PROPERTIES PUBLIC_HEADER “some.h;another.h”) INSTALL(TARGETS mylib LIBRARY DESTINATION some/libpath PUBLIC_HEADER DESTINATION some/includepath ) Some ref: PUBLIC_HEADER CMake install command

After update to Xcode 5 – ld: symbol(s) not found for architecture armv7 or armv7s linker error

Short answer: Remove Build Active Architecture Only (build setting parameter key is ‘ONLY_ACTIVE_ARCH’) from all of your static libraries’ project build settings or overwrite it with ‘NO’ like in the screenshot below: Detailed answer: The problem is that your static library ‘libCordova.a’ which you’re linking in your main app is only compiled for one architecture … Read more

Android Studio : Missing Strip Tool

The default installed NDK doesn’t seem to have the tools required to strip binaries that have been built with ARMEABI support, so it ends up packaging the whole library, which increases the built file size substantially. I’ve found that installing the “NDK (Side by side)” tool from Android Studio -> Tools -> SDK Manager -> … Read more

Xcode: Copy Headers: Public vs. Private vs. Project?

Public: The interface is finalized and meant to be used by your product’s clients. A public header is included in the product as readable source code without restriction. Private: The interface isn’t intended for your clients or it’s in early stages of development. A private header is included in the product, but it’s marked “private”. … Read more

static variable link error [duplicate]

You must define the statics in the cpp file. Log.cpp #include “Log.h” #include <ostream> string Log::theString; // <—- define static here void Log::method(string arg){ theString = “hola”; cout << theString << endl; } You should also remove using namespace std; from the header. Get into the habit while you still can. This will pollute the … Read more

“relocation R_X86_64_32S against ” linking Error

Assuming you are generating a shared library, most probably what happens is that the variant of liblog4cplus.a you are using wasn’t compiled with -fPIC. In linux, you can confirm this by extracting the object files from the static library and checking their relocations: ar -x liblog4cplus.a readelf –relocs fileappender.o | egrep ‘(GOT|PLT|JU?MP_SLOT)’ If the output … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)