반응형

문제점

vcpkg에서 DCMTK 라이브러리 설치 후 아래와 같이 코드에서 사용하려 할때 Link에러가 발생함 

#include <dcmtk/dcmnet/dstorscu.h>

vid Test()
{
	//OFCondition status;

	DcmStorageSCU scu;
	scu.clear();

	scu.setDecompressionMode(DcmStorageSCU::DM_never);
	scu.setVerbosePCMode(true);
	scu.setDIMSEBlockingMode(DIMSE_BLOCKING);
	scu.setReadFromDICOMDIRMode(false);
	scu.setHaltOnInvalidFileMode(true);
	scu.setAllowIllegalProposalMode(true);

	OFList<OFString> ts;
	ts.push_back(UID_LittleEndianExplicitTransferSyntax);
	ts.push_back(UID_BigEndianExplicitTransferSyntax);
	ts.push_back(UID_LittleEndianImplicitTransferSyntax);
	ts.push_back(UID_DeflatedExplicitVRLittleEndianTransferSyntax);
	scu.addPresentationContext(UID_VerificationSOPClass, ts);
}

Error LNK2019 unresolved external symbol __imp__GetAdaptersInfo@8 referenced in function "struct _IP_ADAPTER_INFO * __cdecl getMACAddresses(class OFVector<unsigned char> &)" (?getMACAddresses@@YAPAU_IP_ADAPTER_INFO@@AAV?$OFVector@E@@@Z)

 

unresolved external symbol _NetWkstaUserGetInfo@12 referenced in function "public: static class OFString __cdecl OFStandard::getUserName(void)" (?getUserName@OFStandard@@SA?AVOFString@@XZ)

 

 

해결방법

프로젝트 설정에서 Additional Dependencies에 라이브러리 추가후 다시 빌드하면 정상적으로 빌드가 됨

iphlpapi.lib
netapi32.lib
wsock32.lib

Ws2_32.lib

 

반응형

'[====== Development ======] > C++' 카테고리의 다른 글

C++ Save Raw file  (0) 2022.12.02
System::String에서 Char로 변환  (0) 2022.09.04
[MFC] 멀티 터치 샘플 코드  (0) 2022.04.12
[C++] CString <-> const char* 변환  (0) 2021.11.24
C++에서 Python 임베딩하기  (0) 2021.09.17

+ Recent posts