error LNK2019: unresolved external symbol
Moderator: Moderator Team
-
- Posts: 4
- Joined: Fri, 2016-11-25, 10:31
Re: error LNK2019: unresolved external symbol
Thanks Michael for your reply. I used the guidelines on http://support.dcmtk.org/redmine/projec ... uration360 to configure CMake. Sorry but I'm not sure where is the option to choose shared or static libraries.
Regards,
Ruchir
Regards,
Ruchir
-
- DCMTK Developer
- Posts: 2054
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: error LNK2019: unresolved external symbol
Hi,
sorry, not sure where the problem comes from. Maybe you can restart the whole build process from scratch. Otherwise:
Are you compiling DCMTK 3.6.0?
If so, can you also try a current snapshot?
Can you use try a more current version of Visual Studio, too?
Best,
Michael
sorry, not sure where the problem comes from. Maybe you can restart the whole build process from scratch. Otherwise:
Are you compiling DCMTK 3.6.0?
If so, can you also try a current snapshot?
Can you use try a more current version of Visual Studio, too?
Best,
Michael
-
- Posts: 4
- Joined: Fri, 2016-11-25, 10:31
Re: error LNK2019: unresolved external symbol
Hi Michael,
Thanks for the suggestions. OK, I tried the snapshot without building shared libraries when configuring using CMake. I am using VS2013.
Upon compilation I was getting a few other errors which I resolved. But still the following errors remain:
ofstd.lib(ofstd.obj) : error LNK2019: unresolved external symbol _NetWkstaUserGetInfo@12 referenced in function "public: static class OFString __cdecl OFStandard::getUserName(void)" (?getUserName@OFStandard@@SA?AVOFString@@XZ)
1>dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _Netbios@4 referenced in function "unsigned char * __cdecl getMACAddress(unsigned char * const)" (?getMACAddress@@YAPAEQAE@Z)
Regards,
Ruchir
Thanks for the suggestions. OK, I tried the snapshot without building shared libraries when configuring using CMake. I am using VS2013.
Upon compilation I was getting a few other errors which I resolved. But still the following errors remain:
ofstd.lib(ofstd.obj) : error LNK2019: unresolved external symbol _NetWkstaUserGetInfo@12 referenced in function "public: static class OFString __cdecl OFStandard::getUserName(void)" (?getUserName@OFStandard@@SA?AVOFString@@XZ)
1>dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _Netbios@4 referenced in function "unsigned char * __cdecl getMACAddress(unsigned char * const)" (?getMACAddress@@YAPAEQAE@Z)
Regards,
Ruchir
-
- DCMTK Developer
- Posts: 2054
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: error LNK2019: unresolved external symbol
Weird.
What kind of other errors? It should build out of the box with no errors, so there is definitely something fishy.
Did you try a static (i.e. non-shared) build as I proposed before?
Michael
What kind of other errors? It should build out of the box with no errors, so there is definitely something fishy.
Did you try a static (i.e. non-shared) build as I proposed before?
Michael
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: error LNK2019: unresolved external symbol
As far as I understood the OP, the error is not with the compilation of the DCMTK but with the integration of it into another porgram.What kind of other errors? It should build out of the box with no errors, so there is definitely something fishy.
-
- Posts: 4
- Joined: Fri, 2016-11-25, 10:31
Re: error LNK2019: unresolved external symbol
Yeah, @J. Riesmeier is right. The errors are when I integrate DCMTK with VS and compile a trial VS project. DCMTK compilation was fine.
During CMake configuration, I did not check the box against BUILD_SHARED_LIBS which should mean static build, right?Did you try a static (i.e. non-shared) build as I proposed before?
-
- DCMTK Developer
- Posts: 2054
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: error LNK2019: unresolved external symbol
Yes, I lost track over the length of the thead.
The setting about shared or static build should be the same as you used when building DCMTK.
If you link your own programs against DCMTK, try linking against all libraries that also comparable DCMTK libraries have been linked to; e.g. if you compile an application for DCMTK networking, you could try copying the libraries that were used when building DCMTK's storescu.
Michael
The setting about shared or static build should be the same as you used when building DCMTK.
If you link your own programs against DCMTK, try linking against all libraries that also comparable DCMTK libraries have been linked to; e.g. if you compile an application for DCMTK networking, you could try copying the libraries that were used when building DCMTK's storescu.
Michael
Who is online
Users browsing this forum: No registered users and 1 guest