c++ - Remove stdc++ library dependency -



c++ - Remove stdc++ library dependency -

i have library written in c++ isn't using stdc++ library because not available in platforms.

however, still have stdc++ library dependency in libsmartrest.la makes libraries depending on library fail link.

here configure.ac , makefile.am:

# process file autoreconf produce configure script. # see http://www.openismus.com/documents/linux/building_libraries/building_libraries introduction. ac_init([cumulocity smartrest c++ library], [1.0.0], [support@cumulocity.com], [libsmartrest], [https://bitbucket.org/m2m/cumulocity-clients-c/]) # must come before am_init_automake. ac_config_macro_dir([m4]) # these automake arguments, not compiler arguments. am_init_automake([-wall foreign subdir-objects]) ac_prog_cxx am_prog_ar([act-if-fail]) lt_init # checks typedefs, structures, , compiler characteristics. ac_type_size_t # checks library functions. ac_check_funcs([strerror]) ac_func_malloc ac_config_headers([config.h]) ac_config_files([makefile]) ac_output dnl print configuration summary cat <<eof ===================== $package_name (version $package_version) configured. can build, test , install $package_name using makefile, calling \$ create \$ create check # optional \$ create install eof

makefile.am:

aclocal_amflags = -i m4 lib_ltlibraries = libsmartrest.la libsmartrest_la_sources = \ src/aggregator.cpp\ src/charvalue.cpp\ src/floatvalue.cpp\ src/integervalue.cpp\ src/nullvalue.cpp\ src/parser.cpp\ src/parsedrecord.cpp\ src/parsedvalue.cpp\ src/smartrest.cpp\ src/record.cpp\ src/composedrecord.cpp\ src/staticdata.cpp libsmartrest_la_cxxflags = -fpic -wall -wextra -wno-deprecated libsmartrest_la_ldflags = -version-info 1:0:0 libsmartrest_hdir = $(includedir)/smartrest libsmartrest_h_headers = \ src/abstractclient.h\ src/abstractdatasink.h\ src/abstractdatasource.h\ src/aggregator.h\ src/charvalue.h\ src/datagenerator.h\ src/floatvalue.h\ src/integervalue.h\ src/nullvalue.h\ src/parser.h\ src/parsedrecord.h\ src/parsedvalue.h\ src/smartrest.h\ src/record.h\ src/composedrecord.h\ src/staticdata.h\ src/value.h extra_dist = readme \ license tests = $(check_programs) check_programs = values parser client values_sources = \ test/values/mainvalues.cpp\ test/mock/buffereddatasink.cpp\ test/values/charvaluetest.cpp\ test/values/parsedvaluetest.cpp\ test/values/aggregatortest.cpp\ test/values/integervaluetest.cpp\ test/values/floatvaluetest.cpp\ test/values/composedrecordtest.cpp values_cxxflags = -wall -wextra -i$(srcdir)/src values_ldadd = -lsmartrest parser_sources = \ test/parser/mainparser.cpp\ test/mock/buffereddatasource.cpp\ test/parser/parsertest.cpp parser_cxxflags = -wall -wextra -i$(srcdir)/src parser_ldadd = -lsmartrest client_sources = \ test/client/mainclient.cpp\ test/client/smartresttest.cpp\ test/mock/buffereddatasource.cpp\ test/mock/buffereddatasink.cpp\ test/mock/mockclient.cpp\ test/mock/mocksmartrest.cpp client_cxxflags = -wall -wextra -i$(srcdir)/src client_ldadd = -lsmartrest

the compilation on desktop scheme goes well. however, in .la file:

dependency_libs=' -l/home/ec2-user/sdk_bovine_ntc_6200/libstage/lib /home/mattf/src/buildbot/sandbox/slave/release_ntc_6200/build/bovine_src/staging_sdk/sdk_bovine_ntc_6200/compiler/arm-cdcs-linux-gnueabi/lib/libstdc++.la'

can tell me how remove dependency?

probably using rtti based c++ functionality exceptions or typeof/dynmaic_cast. can seek building -fno-rtti -fno-exceptions. should remove dependency or show have it.

if doesn't help , using gcc 4.5 or newer, seek compiling -static-libstdc++.

c++ linker autotools

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -