window build decmtk for android

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
de.wang.tang
Posts: 3
Joined: Mon, 2017-08-21, 08:24

window build decmtk for android

#1 Post by de.wang.tang »

window build decmtk for android , lib Generated .a

Will need to compile the lib directory **.a copy to the NDK project, the need also to include the header file.
Application.mk add APP_STL:= gnustl_static,
android.mk import **.a

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := ofstd
LOCAL_SRC_FILES := libofstd.a
include $(PREBUILT_STATIC_LIBRARY)



include $(CLEAR_VARS)
LOCAL_MODULE := dcmimgle
LOCAL_SRC_FILES := libdcmimgle.a
include $(PREBUILT_STATIC_LIBRARY)


include $(CLEAR_VARS)
LOCAL_MODULE := i2d
LOCAL_SRC_FILES := libi2d.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := oflog
LOCAL_SRC_FILES := liboflog.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := dcmdata
LOCAL_SRC_FILES := libdcmdata.a
LOCAL_STATIC_LIBRARIES += ofstd
LOCAL_STATIC_LIBRARIES += oflog
include $(PREBUILT_STATIC_LIBRARY)

#include $(CLEAR_VARS)
LOCAL_LDLIBS =-lm -llog
LOCAL_LDLIBS += -landroid
LOCAL_LDLIBS += -lz
LOCAL_CFLAGS += -g -O0
LOCAL_MODULE := libJniDcmtk
LOCAL_MODULE_FILENAME := libJniDcmtk
LOCAL_SRC_FILES += JniDcmtk.cpp
LOCAL_STATIC_LIBRARIES+= dcmdata
LOCAL_STATIC_LIBRARIES+= dcmimgle

include $(BUILD_SHARED_LIBRARY)



Build JniDcmtk armeabi
[armeabi] Compile++ thumb: JniDcmtk <= JniDcmtk.cpp
[armeabi] SharedLibrary : libJniDcmtk.so
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::addOptions(OFCommandLine&): error: undefined reference to 'OFCommandLine::addOption(char const*, char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::addOptions(OFCommandLine&): error: undefined reference to 'OFCommandLine::addOption(char const*, char const*, char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::addOptions(OFCommandLine&): error: undefined reference to 'OFCommandLine::addOption(char const*, char const*, char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::addOptions(OFCommandLine&): error: undefined reference to 'OFCommandLine::addOption(char const*, char const*, char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::addOptions(O
FCommandLine&): error: undefined reference to 'OFCommandLine::addOption(char const*, char const*, int, char const*, char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::addOptions(OFCommandLine&): error: undefined reference to 'OFCommandLine::addOption(char const*, char const*, int, char const*, char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::beginOptionBlock()'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::findOption(char const*, int, OFCommandLine::E_FindOptionMode)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::findOption(char const*, int, OFCommandLine::E_FindOptionMode)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::findOption(char const*, int, OFCommandLine::E_FindOptionMode)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::endOptionBlock()'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::findOption(char const*, int, OFCommandL
ine::E_FindOptionMode)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::checkConflict(char const*, char const*, bool)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::getValue(OFString&)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::checkValue(OFCommandLine::E_ValueStatus, OFCommandLine*)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::
LogLevel): error: undefined reference to 'OFConsoleApplication::setQuietMode(bool)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::gotoFirstArg()'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::gotoNextArg()'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::getCurrentArg(char const*&)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLe
vel): error: undefined reference to 'OFConsoleApplication::checkConflict(char const*, char const*, bool)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::checkConflict(char const*, char const*, bool)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFCommandLine::getValue(OFString&)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::checkValue(OFCommandLine::E_ValueStatus, OFCommandLine*)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::printError(char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::printError(char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::printError(char const*, int)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(oflog.cc.o):oflog.cc:function OFLog::configureFromCommandLine(OFCommandLine&, OFConsoleApplication&, OFLogger::LogLevel): error: undefined reference to 'OFConsoleApplication::printError(char const*, int)'
D:/iStation-build/TDW_
TEST/app/src/main/jni/prebuilt/liboflog.a(globinit.cc.o):globinit.cc:function _GLOBAL__sub_I_globinit.cc: error: undefined reference to 'OFConsole::instance()'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(globinit.cc.o):globinit.cc:function _GLOBAL__sub_I_globinit.cc: error: undefined reference to 'OFConsole::instance()'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(factory.cc.o):factory.cc:function dcmtk::log4cplus::spi::(anonymous namespace)::UserLocale::createObject(dcmtk::log4cplus::helpers::Properties const&): error: undefined reference to 'std::locale::locale(char const*)'
D:/iStation-build/TDW_TEST/app/src/main/jni/prebuilt/liboflog.a(fileap.cc.o):fileap.cc:function dcmtk::log4cplus::FileAppender::init(OFString const&, std::_Ios_Openmode, OFString const&): error: undefined reference to 'std::locale::locale(char const*)'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [D:/iStation-build/TDW_TEST/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libJniDcmtk.so] Error 1
:app:externalNativeBuildDebug FAILED

FAILURE: Build failed with an exception.

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: window build decmtk for android

#2 Post by Jan Schlamelcher »

You perhaps need to reverse the link order of ofstd and oflog.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest