Giter Site home page Giter Site logo

Comments (2)

bk138 avatar bk138 commented on August 17, 2024

Right, I think LDLIBS is for shared libraries only. In my case, the build script just built .a static libs.

You'll have to define a module for the static library and use this for linking

#
#
TOP_LOCAL_PATH := $(call my-dir)
include $(call all-subdir-makefiles)

LOCAL_PATH := $(TOP_LOCAL_PATH)


# define static boost threads lib
include $(CLEAR_VARS)
LOCAL_MODULE    := libboost_thread.
LOCAL_SRC_FILES := boost-for-android/lib/libboost_thread-gcc-mt-1_49.a
include $(PREBUILT_STATIC_LIBRARY)


# now libaweseome shared lib
include $(CLEAR_VARS)
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/boost-for-android/include/boost-1_49
#LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog.

LOCAL_MODULE    := awesome
LOCAL_SRC_FILES := Source.cpp Source2.cpp
LOCAL_STATIC_LIBRARIES := libboost_thread


include $(BUILD_SHARED_LIBRARY)

from boost-for-android.

 avatar commented on August 17, 2024

Ok thanks for the little sample :)

I think the result is concretely the same whether you use LDLIBS or LOCAL_STATIC_LIBRARIES. I assume they just piggyback on LDLIBS to add the "-lblablabla" parameter to the command line.

I thought (and I was wrong) it was somehow enforced somewhere, but it's not.

I think using LOCAL_STATIC_LIBRARIES and defining a module is more academic however :) (that's what I did)

from boost-for-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.