2017-01-03 37 views
0

我跟着在http://forum.dcmtk.org/viewtopic.php?f=3&t=3047&start=15如何構建適用於iOS的DCMTK 3.6.1庫?

發現Russes的指示與他的‘AFAB’混帳分支的一個新的副本,我建立了Xcode項目與命令行x86架構:

cmake -DIOS_PLATFORM=SIMULATOR64 -G Xcode ../dcmtk.public 

或用胳膊拱:

cmake -DIOS_PLATFORM=OS -G Xcode ../dcmtk.public 

然而,我的Xcode項目不能順利建成,因爲,至少,以下錯誤: List of Xcode errors on ofchrenc.cc file (for eg. "No class named Implementation in OFCharacterEncoding")

使用Unix的makefile編譯給出了我的情況下,同樣的錯誤:

Scanning dependencies of target ofstd

0% Building CXX object ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o

dcmtk.public/ofstd/libsrc/ofchrenc.cc:518:28: error: no class named 'Implementation' in 'OFCharacterEncoding' class OFCharacterEncoding::Implementation {};

dcmtk.public/ofstd/libsrc/ofchrenc.cc:556:31: error: out-of-line definition of 'getLocaleEncoding' does not match any declaration in 'OFCharacterEncoding' OFString OFCharacterEncoding::getLocaleEncoding()

/usr/local/include/dcmtk/ofstd/ofchrenc.h:97:21: note: member declaration does not match because it is const qualified const OFString &getLocaleEncoding() const;

[...] dcmtk.public/ofstd/libsrc/ofchrenc.cc:644:34: error: out-of-line definition of 'setConversionFlags' does not match any declaration in 'OFCharacterEncoding' OFCondition OFCharacterEncoding::setConversionFlags(const unsigned flags)

19 errors generated.

make 2: ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o Error 1

make 1: ofstd/libsrc/CMakeFiles/ofstd.dir/all Error 2

make: [all] Error 2

我不明白什麼是錯誤的,我的配置:

  • Mac系統塞拉利昂10.12.2

  • Xcode 8.2

  • CMake 3.7.1(我以前用3.5.2也有同樣的問題版本)

  • GNU讓3.81(對於Unix的makefile編譯)

  • 蘋果LLVM版本8.0.0.8000042

  • 主機

    達爾文版本:16.3.0

  • 大廈最低IOS版本:10.2(SDK版本:10.2)

回答

0

我不確定第一個錯誤消息,但

/usr/local/include/dcmtk/ofstd/ofchrenc.h:97:21: note: member declaration does not match because it is const qualified const OFString &getLocaleEncoding() const;

似乎表明你混合舊版本「ofchrenc.h」(存儲在「在/ usr /本地/ ...」)與較新版本的「ofchrenc.cc」的(存儲的在你的工作目錄中)。

+0

真的很棒!似乎我很久以前已經安裝了一箇舊的DCMTK版本... 我卸載它,現在它的工作原理! 再次感謝您的幫助,我不明白我是如何錯過這一點的。 –

+0

我很高興能幫上忙。由於我是DCMTK的主要開發人員之一,因此我不難「看到」錯誤的來源。但是,我個人沒有編譯iOS(或任何其他Apple OS)的DCMTK的經驗。 –