3.6.7 : Problem with linking JpegLS static library on Windows
Moderator: Moderator Team
-
- Posts: 32
- Joined: Mon, 2018-11-12, 20:01
3.6.7 : Problem with linking JpegLS static library on Windows
Current status below.
Last edited by artemmikheev on Sun, 2023-02-26, 16:39, edited 4 times in total.
-
- Posts: 32
- Joined: Mon, 2018-11-12, 20:01
problem linking JpegLS static library
On Windows 11 (VS 2022/ x64)
1. Now I am able to compile DCMTK 3.6.7 as several DLLs and able to run my application fine.
BUT.
If I specify to Build as Static Libraries (by specifying CMake flag SHARED_LIBS=OFF, then I am not able fully
link it with my application.
Now there are only 3 errors in linking:
2>dcmjpls.lib(djcodece.obj) : error LNK2019: unresolved external symbol JpegLsEncode referenced in function "private: class OFCondition __cdecl DJLSEncoderBase::compressRawFrame(unsigned char const *,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,class OFString const &,class DcmPixelSequence *,class OFList<unsigned int> &,unsigned long &,class DJLSCodecParameter const *)const " (?compressRawFrame@DJLSEncoderBase@@AEBA?AVOFCondition@@PEBEGGGGGAEBVOFString@@PEAVDcmPixelSequence@@AEAV?$OFList@I@@AEAKPEBVDJLSCodecParameter@@@Z)
2>dcmjpls.lib(djcodecd.obj) : error LNK2019: unresolved external symbol JpegLsDecode referenced in function "private: static class OFCondition __cdecl DJLSDecoderBase::decodeFrame(class DcmPixelSequence *,class DJLSCodecParameter const *,class DcmItem *,unsigned int,unsigned int &,void *,unsigned int,int,unsigned short,unsigned short,unsigned short,unsigned short)" (?decodeFrame@DJLSDecoderBase@@CA?AVOFCondition@@PEAVDcmPixelSequence@@PEBVDJLSCodecParameter@@PEAVDcmItem@@IAEAIPEAXIHGGGG@Z)
2>dcmjpls.lib(djcodecd.obj) : error LNK2019: unresolved external symbol JpegLsReadHeader referenced in function "private: static class OFCondition __cdecl DJLSDecoderBase::decodeFrame(class DcmPixelSequence *,class DJLSCodecParameter const *,class DcmItem
Below is screenshot of my CMake settings. What am I doing wrong? Thank you.
1. Now I am able to compile DCMTK 3.6.7 as several DLLs and able to run my application fine.
BUT.
If I specify to Build as Static Libraries (by specifying CMake flag SHARED_LIBS=OFF, then I am not able fully
link it with my application.
Now there are only 3 errors in linking:
2>dcmjpls.lib(djcodece.obj) : error LNK2019: unresolved external symbol JpegLsEncode referenced in function "private: class OFCondition __cdecl DJLSEncoderBase::compressRawFrame(unsigned char const *,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,class OFString const &,class DcmPixelSequence *,class OFList<unsigned int> &,unsigned long &,class DJLSCodecParameter const *)const " (?compressRawFrame@DJLSEncoderBase@@AEBA?AVOFCondition@@PEBEGGGGGAEBVOFString@@PEAVDcmPixelSequence@@AEAV?$OFList@I@@AEAKPEBVDJLSCodecParameter@@@Z)
2>dcmjpls.lib(djcodecd.obj) : error LNK2019: unresolved external symbol JpegLsDecode referenced in function "private: static class OFCondition __cdecl DJLSDecoderBase::decodeFrame(class DcmPixelSequence *,class DJLSCodecParameter const *,class DcmItem *,unsigned int,unsigned int &,void *,unsigned int,int,unsigned short,unsigned short,unsigned short,unsigned short)" (?decodeFrame@DJLSDecoderBase@@CA?AVOFCondition@@PEAVDcmPixelSequence@@PEBVDJLSCodecParameter@@PEAVDcmItem@@IAEAIPEAXIHGGGG@Z)
2>dcmjpls.lib(djcodecd.obj) : error LNK2019: unresolved external symbol JpegLsReadHeader referenced in function "private: static class OFCondition __cdecl DJLSDecoderBase::decodeFrame(class DcmPixelSequence *,class DJLSCodecParameter const *,class DcmItem
Below is screenshot of my CMake settings. What am I doing wrong? Thank you.
Last edited by artemmikheev on Sun, 2023-02-26, 16:38, edited 1 time in total.
-
- Posts: 32
- Joined: Mon, 2018-11-12, 20:01
Re: 3.6.7 : Problem with linking Static Libs on Windows
I now read the FAQ #27 about the order of the linked libraries.
So I complied with the suggested order:
Iphlpapi.lib NetAPI32.lib WSock32.lib ofstd.lib oflog.lib dcmdata.lib dcmsign.lib dcmnet.lib dcmdsig.lib dcmsr.lib dcmqrdb.lib dcmtls.lib dcmwlm.lib dcmimgle.lib dcmpstat.lib dcmjpls.lib dcmjpeg.lib dcmimage.lib ijg16.lib ijg12.lib ijg8.lib
BTW, what happened to dcmsign.lib? The project for it is present in the source code, but when CMAKE generated the whole solution, the dcmsign project is missing from the solution.
So I complied with the suggested order:
Iphlpapi.lib NetAPI32.lib WSock32.lib ofstd.lib oflog.lib dcmdata.lib dcmsign.lib dcmnet.lib dcmdsig.lib dcmsr.lib dcmqrdb.lib dcmtls.lib dcmwlm.lib dcmimgle.lib dcmpstat.lib dcmjpls.lib dcmjpeg.lib dcmimage.lib ijg16.lib ijg12.lib ijg8.lib
BTW, what happened to dcmsign.lib? The project for it is present in the source code, but when CMAKE generated the whole solution, the dcmsign project is missing from the solution.
-
- OFFIS DICOM Team
- Posts: 1507
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Re: 3.6.7 : Problem with linking JpegLS static library on Windows
You are compiling without OpenSSL support. In that case, the dcmsign library is empty.artemmikheev wrote: ↑Sun, 2023-02-26, 16:26 BTW, what happened to dcmsign.lib? The project for it is present in the source code, but when CMAKE generated the whole solution, the dcmsign project is missing from the solution.
Who is online
Users browsing this forum: No registered users and 1 guest