Skip to content

Commit

Permalink
Visual Studio: Build UnRAR DLL with Debug runtime library
Browse files Browse the repository at this point in the history
For reasons unknown, after the UnRAR update there are linker errors for
the Release build for 0.103, claiming:

secpassword.obj : error LNK2001: unresolved external symbol _CrtDbgReport
dll.obj : error LNK2001: unresolved external symbol _CrtDbgReport
extinfo.obj : error LNK2001: unresolved external symbol _CrtDbgReport
extract.obj : error LNK2001: unresolved external symbol _CrtDbgReport
headers.obj : error LNK2001: unresolved external symbol _CrtDbgReport
archive.obj : error LNK2001: unresolved external symbol _CrtDbgReport
arcread.obj : error LNK2001: unresolved external symbol _CrtDbgReport
cmddata.obj : error LNK2001: unresolved external symbol _CrtDbgReport
crypt.obj : error LNK2001: unresolved external symbol _CrtDbgReport
...\win32\x64\Release\libclamunrar.dll : fatal error LNK1120: 1 unresolved externals

I haven't been able to determine from reading the diff why it wants
this debug-symbol, but changing the VS project file to link with the
Debug-version of the C runtime DLL appears to resolve the build
issue. Not ideal but I think it is okay.
  • Loading branch information
micahsnyder committed Aug 28, 2023
1 parent 894bbe4 commit 7195e0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions win32/libclamunrar.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)compat;$(SolutionDir)..;$(CLAM_DEPENDENCIES)\$(PlatformName)\include</AdditionalIncludeDirectories>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<BufferSecurityCheck>true</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -203,7 +203,7 @@
<StringPooling>false</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<BufferSecurityCheck>true</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down

0 comments on commit 7195e0f

Please sign in to comment.