OpenImageIO icon indicating copy to clipboard operation
OpenImageIO copied to clipboard

[BUG] Linker error - dicom on Windows

Open zavinator opened this issue 4 years ago • 0 comments

Describe the bug Linker error when try to link OpenImageIO.dll with dcmtk and link dependencies turned on:

2>dcmdatad.lib(dcuid.cc.obj) : error LNK2019: unresolved external symbol __imp_GetAdaptersInfo referenced in function "struct _IP_ADAPTER_INFO * __cdecl getMACAddresses(class OFVector<unsigned char> &)" (?getMACAddresses@@YAPEAU_IP_ADAPTER_INFO@@AEAV?$OFVector@E@@@Z)
2>ofstdd.lib(ofstd.cc.obj) : error LNK2019: unresolved external symbol NetWkstaUserGetInfo referenced in function "public: static class OFString __cdecl OFStandard::getUserName(void)" (?getUserName@OFStandard@@SA?AVOFString@@XZ)
2>C:\VC19\src\oiio-RB-2.1\_build\bin\Debug\OpenImageIO.dll : fatal error LNK1120: 2 unresolved externals
2>Done building project "OpenImageIO.vcxproj" -- FAILED.

The dcmtk library is from vcpkg repositary.

Adding this libraries as additional dependencies solved the issue: Iphlpapi.lib;NetApi32.lib

Platform information:

  • OIIO branch/version: 2.1.17
  • OS: Windows 10 x64
  • C++ compiler: VS2019 x64
  • Any non-default build flags when you build OIIO:

zavinator avatar Jul 03 '20 09:07 zavinator