Precompiled support libraries for DCMTK 3.6.1 and libiconv

Compilation and installation of DCMTK

Moderator: Moderator Team

Message
Author
theonlylawislove
Posts: 34
Joined: Thu, 2014-07-17, 09:07

Precompiled support libraries for DCMTK 3.6.1 and libiconv

#1 Post by theonlylawislove »

You guys only provide precompiled windows binaries for DCMTK 3.6.0, not 3.6.1.

I am looking for windows binaries for libiconv 1.13.1. I tried to compile manually with Visual Studio, but it is a head ache. I imagine you guys got some binaries floating around?

Hook us up with support libraries for 3.6.1 please! Super please for x64 support libraries as well.

Admin
Site Admin
Posts: 24
Joined: Fri, 2004-10-29, 21:21
Location: Oldenburg, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#2 Post by Admin »

Thanks for the request - this is on our to-do list, and we will make support libraries for 3.6.1 available as time permits.

Holger Franke
Posts: 20
Joined: Tue, 2007-09-04, 13:24
Location: Chemnitz, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#3 Post by Holger Franke »

For the support of far east languages we want to use the amazing function convertToUTF8 beneath MS Visual C++.
Unfortunately the precompiled windows binaries still not contains the libiconv-1.13.1 library files.
Can someone help us with the missing files?
Thank you so much!

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#4 Post by Michael Onken »

Hi Holger,

I recently compiled libiconv 1.14 for Windows for a project of mine (Windows 10, VS 2015). I dropped the libiconv source, build and install tree of my Windows build here for download. For myself I configured for DLL build, Release mode, /MD dynamic runtime library, 64 bit.

I used this guide on how to build libiconv on Windows systems.

Best regards,
Michael

P.S: If you find that build or install tree rely on absolute folders, I had source, build and install directories in a subfolder called C:\crosspir\devel.

Holger Franke
Posts: 20
Joined: Tue, 2007-09-04, 13:24
Location: Chemnitz, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#5 Post by Holger Franke »

Hey Michael,
thanks for the information. Unfortunately the link http://dicom.guru/download/libiconv_1.14_VS2015.zip is broken.
Could we use libiconv 1.14 to compile DCMTK 3.6.1? I'm not so familiar with Visual C++, because we use Embarcadero C++ Builder.

Regards, Holger

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#6 Post by Michael Onken »

Hello Holger,

I fixed the link by renaming the file on the server, sorry.
Yes you can use the current libiconv 1.14 to compile DCMTK 3.6.1.

Best,
Michael

Holger Franke
Posts: 20
Joined: Tue, 2007-09-04, 13:24
Location: Chemnitz, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#7 Post by Holger Franke »

Hello Michael,
the link works now, many thanks.

But we run into the next problem. First we've compiled DCMTK successful without libiconv to make sure, that no other problems appear.
Then we enabled DCMTK_WITH_ICONV and configured C:/LIB/libiconv-1.14 as path in CMake.
When we build the solution DCMTK, we get the first error message:

Code: Select all

------ Rebuild All started: Project: ofstd, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'ofstd', configuration 'Debug|Win32'
Building Custom Rule C:/DCMTK/ofstd/libsrc/CMakeLists.txt
CMake does not need to re-run because C:\DCMTK-BIN\ofstd\libsrc\CMakeFiles\generate.stamp is up-to-date.
Compiling...
ofchrenc.cc
..\..\..\DCMTK\ofstd\libsrc\ofchrenc.cc(236) : error C2664: 'libiconv' : cannot convert parameter 2 from 'char **' to 'const char **'
        Conversion loses qualifiers
And later a lot of linker errors caused by the missed ofstd.lib:

Code: Select all

LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\ofstd.lib'
Do you know this error, is there a newer version of ofchrenc.cc available?
Any other hints?

Best Regards, Holger

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#8 Post by J. Riesmeier »

Which DCMTK snapshot version (3.6.1) do you use, i.e. what is the timestamp?

I'm asking because there is a configure test for the second argument of iconv().
The result is stored in the compiler macro (define) LIBICONV_SECOND_ARGUMENT_CONST.

Holger Franke
Posts: 20
Joined: Tue, 2007-09-04, 13:24
Location: Chemnitz, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#9 Post by Holger Franke »

Hello Mr. Riesmeier, hello Mr. Onken,
after your question, we have updated to the current snapshot 3.6.1_20161102.
Compiling still raises the same error. LIBICONV_SECOND_ARGUMENT_CONST is not set in the project.
Because LIBICONV_SECOND_ARGUMENT_CONST is used only once, we changed the source code. After this compiling is successful. :D

But the linker searches for a library C:\LIB\libiconv-1.14\lib\libiconv_o.lib.
In this directory we only have the files iconv.lib and iconv.dll provided by Mr. Onken.

Is it possible to change the solution, that iconv.lib is used or could you send us the Library libiconv_o.lib (MT) ?
Any other hints would be helpful.

Is there a reason why precompiled windows binaries still not contains the libiconv library files?

Best regards,
Holger Franke

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#10 Post by J. Riesmeier »

Is there a reason why precompiled windows binaries still not contains the libiconv library files?
The pre-compiled (executable) binaries for Windows (and other platforms) are based on the official release 3.6.0. Support for character set conversion has been added later to the DCMTK. Also the Windows support libraries are only updated for a new release... there are plans to change this but... On other platforms, such as Linux, the support libraries are either provided by the maintainers of the distribution or compilation of the source code is as easy as calling "./configure && make && make install".

Holger Franke
Posts: 20
Joined: Tue, 2007-09-04, 13:24
Location: Chemnitz, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#11 Post by Holger Franke »

Yes I understand. MS Visual C++ is somewhat more difficult to handle.

It looks like we need not only libiconv_o.lib, but also libchset_o.lib.
Does anyone see a way to help us in our situation?

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#12 Post by J. Riesmeier »

The libcharset is part of the libiconv package, i.e. when built from source. The "*_o.lib" is just the renamed Release version of the library (in contrast to the "*_d.lib" Debug version).

By the way, if you work for a company and want to use libiconv in a product you probably want to link it dynamically in order to avoid the GPL restrictions.

Holger Franke
Posts: 20
Joined: Tue, 2007-09-04, 13:24
Location: Chemnitz, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#13 Post by Holger Franke »

J. Riesmeier wrote:By the way, if you work for a company and want to use libiconv in a product you probably want to link it dynamically in order to avoid the GPL restrictions.
You're right. We have already tried this. Mr. Onken sent us the files iconv.h, localcharset.h, iconv.lib and iconv.dll.
Question: Are these all the necessary files that we need to create DCMTK with UTF8 support?

The projects compile successfully, but the linker does not find libiconv_o.lib.
Is libiconv_o.lib the same as iconv.lib ?
After renaming the library (makes this sense?) the linker raises some other errors like:

Code: Select all

ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol __imp__locale_charset referenced in function "public: class OFCondition __thiscall OFCharacterEncoding::updateLocaleEncoding(void)" (?updateLocaleEncoding@OFCharacterEncoding@@QAE?AVOFCondition@@XZ)
We get the same errors after changing the project options to include iconv.lib.

Unfortunately it is very difficult to build DCMTK with UTF8-support under Visual C++, we are trying all week to create the library. :?
Any Hints?

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#14 Post by Michael Onken »

Yes, libiconv_o.lib should be the same as iconv.lib.

For your linker error, try also linkingt to libcharset in addition.

Best,
Michael

P.S: Well, the problem is maybe in compiling libiconv on Windows, and configuring the linker... nothing to do with DCMTK :)

Holger Franke
Posts: 20
Joined: Tue, 2007-09-04, 13:24
Location: Chemnitz, Germany
Contact:

Re: Precompiled support libraries for DCMTK 3.6.1 and libico

#15 Post by Holger Franke »

Hello Michael,
Michael Onken wrote:Well, the problem is maybe in compiling libiconv on Windows, and configuring the linker... nothing to do with DCMTK :)
Yes, I have already suspected this.
Our DCMTK DLL is the first and only project that we have to develop beneath Visual C++ after OFFIS has stopped Borland C++ Builder support. We have many problems with Visual C++.
Unfortunately we have libcharset.lib not available. We can not find them on the internet either.
Do you have a version of libcharset.lib that fits to the file link you sent us on Tuesday?
Many thanks you for your efforts!

Best regards, Holger

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest