Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] lzham/cci.20220103: linking statically doesn't work for msvc #23647

Open
soroosh-sdi opened this issue Apr 18, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@soroosh-sdi
Copy link
Contributor

soroosh-sdi commented Apr 18, 2024

Description

In my project I successfully build again lzham's statically, but when I wanted to run the executable it fails and says it needs lzham's dll.

Package and Environment Details

  • Package Name/Version: lzham/cci.2022010
  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio 2022
  • Conan version: conan 2
  • Python version: Python 3..9

Conan profile

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.version=193
compiler.runtime=static
os=Windows

Steps to reproduce

git clone https://github.com/conan-io/conan-center-index.git

cd conan-center-index/recipes/lzham/all

conan create . --build=missing -tf=test_package --profile:b=./conan.profile --profile:h=./conan.profile --version=cci.2022010

Logs

Click to expand log
======== Exporting recipe to the cache ========
lzham/cci.20220103: Exporting package recipe: D:\conan-center-index\recipes\lzham\all\conanfile.py
lzham/cci.20220103: exports: File 'conandata.yml' found. Exporting it...
lzham/cci.20220103: Calling export_sources()
lzham/cci.20220103: Copied 1 '.yml' file: conandata.yml
lzham/cci.20220103: Copied 1 '.py' file: conanfile.py
lzham/cci.20220103: Copied 6 '.patch' files
lzham/cci.20220103: Exported to cache folder: C:\Users\soroosh\.conan2\p\lzham3152bc4f48d77\e
lzham/cci.20220103: Exported: lzham/cci.20220103#104dc0cfb5e94d5422e4d616e6ba56d6 (2024-04-18 15:52:12 UTC)

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=static
compiler.runtime_type=Release
compiler.version=193
os=Windows

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=static
compiler.runtime_type=Release
compiler.version=193
os=Windows


======== Computing dependency graph ========
Graph root
    cli
Requirements
    lzham/cci.20220103#104dc0cfb5e94d5422e4d616e6ba56d6 - Cache

======== Computing necessary packages ========
lzham/cci.20220103: Checking 3 compatible configurations
lzham/cci.20220103: Compatible configurations not found in cache, checking servers
lzham/cci.20220103: 'ae34db2281b5eb1676c632ad786dc6cc7d69d482': compiler.cppstd=17
lzham/cci.20220103: 'a2e7df6f7bd606b2763e544f3a2c87dd6c478874': compiler.cppstd=20
lzham/cci.20220103: '0b203d3279ed8e72bf8ccd1d82740da82f63b74a': compiler.cppstd=23
Requirements
    lzham/cci.20220103#104dc0cfb5e94d5422e4d616e6ba56d6:84e24741a4ff6741a11125f6a1d550248348ed2a - Build

======== Installing packages ========
lzham/cci.20220103: Calling source() in C:\Users\soroosh\.conan2\p\lzham3152bc4f48d77\s
lzham/cci.20220103: Unzipping 839.4KB, this can take a while
Unzipping 100 %

-------- Installing package lzham/cci.20220103 (1 of 1) --------
lzham/cci.20220103: Building from source
lzham/cci.20220103: Package lzham/cci.20220103:84e24741a4ff6741a11125f6a1d550248348ed2a
lzham/cci.20220103: Copying sources to build folder
lzham/cci.20220103: Building your package in C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b
lzham/cci.20220103: Calling generate()
lzham/cci.20220103: Generators folder: C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\conan
lzham/cci.20220103: MSBuildToolchain created conantoolchain_release_x64.props
lzham/cci.20220103: MSBuildToolchain writing conantoolchain.props
lzham/cci.20220103: Generating aggregated env files
lzham/cci.20220103: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
lzham/cci.20220103: Calling build()
lzham/cci.20220103: Apply patch (portability): Uses "yield" rather than "pause" mneumonic to fix aarch64 build
lzham/cci.20220103: Apply patch (portability): Puts cmake_minimum_required before project in all CMakeLists
lzham/cci.20220103: Apply patch (portability): Fixes building on OSX
lzham/cci.20220103: Apply patch (portability): Uses typedefs prefixed with LZHAM to fix linux build errors
lzham/cci.20220103: Apply patch (conan): Skips building of lzhamtest for CMake
lzham/cci.20220103: Apply patch (conan): Skips building of lzhamtest and examples for MSVC, and injects conan toolchain for MSVC       
lzham/cci.20220103: RUN: msbuild "lzham.sln" /p:Configuration="Release" /p:Platform=x64
conanvcvars.bat: Activating environment Visual Studio 17 - amd64 - winsdk_version=None - vcvars_ver=14.3
[vcvarsall.bat] Environment initialized for: 'x64'
MSBuild version 17.6.3+07e294721 for .NET Framework
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 4/18/2024 5:52:18 PM.

Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzham.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzham.sln" (1) is building "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f8
1e\b\lzhamdll\lzham.vcxproj" (2) on node 1 (default targets).
Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdll\lzham.vcxproj" (2) is building "C:\Users\soroosh\.conan2\p\b\lzh
ame6be37061f81e\b\lzhamcomp\lzhamcomp.vcxproj" (3) on node 1 (default targets).
PrepareForBuild:
  Creating directory "x64\Release\".
  Creating directory "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\".
  Creating directory "x64\Release\lzhamcomp.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\lzhamcomp.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\CL.exe /c /I..\include /I..\lzh
  amdecomp /Zi /nologo /W4 /WX- /diagnostics:column /MP20 /Ox /Ob2 /Oi /Ot /Oy /GL /D WIN32 /D NDEBUG /D _LIB /D _UNICODE /D UNICODE /
  Gm- /MT /GS- /Gy /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++14 /Fo"x64\Release\\" /Fd"C:\Users\soroosh\.conan2\p\b\lzhame
  6be37061f81e\b\lib\x64\lzhamcomp_x64.pdb" /external:W4 /Gd /TP /FC /errorReport:queue  lzham_lzbase.cpp lzham_lzcomp.cpp lzham_lzcom
  p_internal.cpp lzham_lzcomp_state.cpp lzham_match_accel.cpp lzham_win32_threading.cpp
  lzham_lzbase.cpp
  lzham_lzcomp.cpp
  lzham_lzcomp_internal.cpp
  lzham_lzcomp_state.cpp   
  lzham_match_accel.cpp    
  lzham_win32_threading.cpp
Lib:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\Lib.exe /OUT:"C:\Users\soroosh
  \.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamcomp_x64.lib" /NOLOGO /MACHINE:X64 /LTCG x64\Release\lzham_lzbase.obj
  x64\Release\lzham_lzcomp.obj
  x64\Release\lzham_lzcomp_internal.obj
  x64\Release\lzham_lzcomp_state.obj
  x64\Release\lzham_match_accel.obj
  x64\Release\lzham_win32_threading.obj
  lzhamcomp.vcxproj -> C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamcomp_x64.lib
FinalizeBuildStatus:
  Deleting file "x64\Release\lzhamcomp.tlog\unsuccessfulbuild".
  Touching "x64\Release\lzhamcomp.tlog\lzhamcomp.lastbuildstate".
Done Building Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamcomp\lzhamcomp.vcxproj" (default targets).

Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdll\lzham.vcxproj" (2) is building "C:\Users\soroosh\.conan2\p\b\lzh
ame6be37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj" (4) on node 1 (default targets).
PrepareForBuild:
  Creating directory "x64\Release\".
  Creating directory "x64\Release\lzhamdecomp.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\lzhamdecomp.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\CL.exe /c /I..\include /Zi /nol
  ogo /W4 /WX- /diagnostics:column /MP20 /Ox /Ob2 /Oi /Ot /Oy /GL /D WIN32 /D NDEBUG /D _LIB /D _UNICODE /D UNICODE /Gm- /MT /GS- /Gy  
  /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++14 /Fo"x64\Release\\" /Fd"C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\li 
  b\x64\lzhamdecomp_x64.pdb" /external:W4 /Gd /TP /FC /errorReport:queue  lzham_assert.cpp lzham_checksum.cpp lzham_huffman_codes.cpp  
  lzham_lzdecomp.cpp lzham_lzdecompbase.cpp lzham_mem.cpp lzham_platform.cpp lzham_prefix_coding.cpp lzham_symbol_codec.cpp lzham_time 
  r.cpp lzham_vector.cpp
  lzham_assert.cpp
  lzham_checksum.cpp
  lzham_huffman_codes.cpp
  lzham_lzdecomp.cpp
  lzham_lzdecompbase.cpp
  lzham_mem.cpp
  lzham_platform.cpp
  lzham_prefix_coding.cpp
  lzham_symbol_codec.cpp
  lzham_timer.cpp
  lzham_vector.cpp
C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzham_vector.cpp(41,41): warning C4477: 'sprintf_s' : format string '%u
' requires an argument of type 'unsigned int', but variadic argument 1 has type 'const size_t' [C:\Users\soroosh\.conan2\p\b\lzhame6b
e37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj]
C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzham_vector.cpp(41,41): message : consider using '%zu' in the format s 
tring [C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj]
C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzham_vector.cpp(55,41): warning C4477: 'sprintf_s' : format string '%u 
' requires an argument of type 'unsigned int', but variadic argument 1 has type 'const size_t' [C:\Users\soroosh\.conan2\p\b\lzhame6b 
e37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj]
C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzham_vector.cpp(55,41): message : consider using '%zu' in the format s 
tring [C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj]
Lib:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\Lib.exe /OUT:"C:\Users\soroosh
  \.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamdecomp_x64.lib" /NOLOGO /MACHINE:X64 /LTCG x64\Release\lzham_assert.obj
  x64\Release\lzham_checksum.obj
  x64\Release\lzham_huffman_codes.obj
  x64\Release\lzham_lzdecomp.obj
  x64\Release\lzham_lzdecompbase.obj
  x64\Release\lzham_mem.obj
  x64\Release\lzham_platform.obj
  x64\Release\lzham_prefix_coding.obj
  x64\Release\lzham_symbol_codec.obj
  x64\Release\lzham_timer.obj
  x64\Release\lzham_vector.obj
  lzhamdecomp.vcxproj -> C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamdecomp_x64.lib
FinalizeBuildStatus:
  Deleting file "x64\Release\lzhamdecomp.tlog\unsuccessfulbuild".
  Touching "x64\Release\lzhamdecomp.tlog\lzhamdecomp.lastbuildstate".
Done Building Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj" (default targets).

PrepareForBuild:
  Creating directory "x64\Release\".
  Creating directory "..\bin\".
  Creating directory "x64\Release\lzhamdll.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\lzhamdll.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\CL.exe /c /I..\include /I..\lzh 
  amdecomp /I..\lzhamcomp /Zi /nologo /W4 /WX- /diagnostics:column /MP20 /O2 /Oi /GL /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D LZHA 
  M_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /MT /GS- /Gy /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++14 /Fo"x64\Releas 
  e\\" /Fd"x64\Release\vc143.pdb" /external:W4 /Gd /TP /FC /errorReport:queue  lzham_api.cpp lzham_dll_main.cpp
  lzham_api.cpp
  lzham_dll_main.cpp
Link:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OU
  T:"..\bin\lzham_x64.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.li 
  b ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embe 
  d /DEBUG /PDB:"..\bin\lzham_x64.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG:incremental /LTCGOUT:"x64\Release\lzham_x64.iobj" /T 
  LBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzham_x64.lib" /MACHINE:X64  /DLL  
  x64\Release\lzham_api.obj
  x64\Release\lzham_dll_main.obj
  C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamcomp_x64.lib
  C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamdecomp_x64.lib
     Creating library C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzham_x64.lib and object C:\Users\soroosh\.conan2\p\
  b\lzhame6be37061f81e\b\lib\x64\lzham_x64.exp
  Generating code
  Previous IPDB not found, fall back to full compilation.
  All 486 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
  Finished generating code
  lzham.vcxproj -> C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\bin\lzham_x64.dll
FinalizeBuildStatus:
  Deleting file "x64\Release\lzhamdll.tlog\unsuccessfulbuild".
  Touching "x64\Release\lzhamdll.tlog\lzhamdll.lastbuildstate".
Done Building Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdll\lzham.vcxproj" (default targets).

Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzham.sln" (1) is building "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f8
1e\b\lzhamlib\lzhamlib.vcxproj" (5) on node 1 (default targets).
PrepareForBuild:
  Creating directory "x64\Release\".
  Creating directory "x64\Release\lzhamlib.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\lzhamlib.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\CL.exe /c /I..\include /I..\lzh 
  amdecomp /I..\lzhamcomp /Zi /nologo /W4 /WX- /diagnostics:column /MP20 /Ox /Ob2 /Oi /Ot /Oy /GL /D WIN32 /D NDEBUG /D _LIB /D _UNICO 
  DE /D UNICODE /Gm- /MT /GS- /Gy /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++14 /Fo"x64\Release\\" /Fd"C:\Users\soroosh\.co 
  nan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamlib_x64.pdb" /external:W4 /Gd /TP /FC /errorReport:queue  lzham_lib.cpp
  lzham_lib.cpp
Lib:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\Lib.exe /OUT:"C:\Users\soroosh
  \.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamlib_x64.lib" /NOLOGO /MACHINE:X64 /LTCG x64\Release\lzham_lib.obj
  lzhamlib.vcxproj -> C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lib\x64\lzhamlib_x64.lib
FinalizeBuildStatus:
  Deleting file "x64\Release\lzhamlib.tlog\unsuccessfulbuild".
  Touching "x64\Release\lzhamlib.tlog\lzhamlib.lastbuildstate".
Done Building Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamlib\lzhamlib.vcxproj" (default targets).

Done Building Project "C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzham.sln" (default targets).


Build succeeded.

"C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzham.sln" (default target) (1) ->
"C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdll\lzham.vcxproj" (default target) (2) ->
"C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj" (default target) (4) ->
(ClCompile target) ->
  C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzham_vector.cpp(41,41): warning C4477: 'sprintf_s' : format string ' 
%u' requires an argument of type 'unsigned int', but variadic argument 1 has type 'const size_t' [C:\Users\soroosh\.conan2\p\b\lzhame 
6be37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj]
  C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b\lzhamdecomp\lzham_vector.cpp(55,41): warning C4477: 'sprintf_s' : format string ' 
%u' requires an argument of type 'unsigned int', but variadic argument 1 has type 'const size_t' [C:\Users\soroosh\.conan2\p\b\lzhame 
6be37061f81e\b\lzhamdecomp\lzhamdecomp.vcxproj]

    2 Warning(s)
    0 Error(s)

Time Elapsed 00:00:06.69

lzham/cci.20220103: Package '84e24741a4ff6741a11125f6a1d550248348ed2a' built
lzham/cci.20220103: Build folder C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\b
lzham/cci.20220103: Generating the package
lzham/cci.20220103: Packaging in folder C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\p
lzham/cci.20220103: Calling package()
lzham/cci.20220103: package(): Packaged 1 '.dll' file: lzham_x64.dll
lzham/cci.20220103: package(): Packaged 4 '.h' files: lzham.h, lzham_dynamic_lib.h, lzham_static_lib.h, zlib.h
lzham/cci.20220103: package(): Packaged 1 '.lib' file: lzham_x64.lib
lzham/cci.20220103: package(): Packaged 1 file: LICENSE
lzham/cci.20220103: Created package revision 2f95d42b109a931db0fef62301f328e8
lzham/cci.20220103: Package '84e24741a4ff6741a11125f6a1d550248348ed2a' created
lzham/cci.20220103: Full package reference: lzham/cci.20220103#104dc0cfb5e94d5422e4d616e6ba56d6:84e24741a4ff6741a11125f6a1d550248348ed2a#2f95d42b109a931db0fef62301f328e8
lzham/cci.20220103: Package folder C:\Users\soroosh\.conan2\p\b\lzhame6be37061f81e\p

======== Launching test_package ========

======== Computing dependency graph ========
Graph root
    lzham/cci.20220103 (test package): D:\conan-center-index\recipes\lzham\all\test_package\conanfile.py
Requirements
    lzham/cci.20220103#104dc0cfb5e94d5422e4d616e6ba56d6 - Cache

======== Computing necessary packages ========
Requirements
    lzham/cci.20220103#104dc0cfb5e94d5422e4d616e6ba56d6:84e24741a4ff6741a11125f6a1d550248348ed2a#2f95d42b109a931db0fef62301f328e8 - Cache

======== Installing packages ========
lzham/cci.20220103: Already installed! (1 of 1)

======== Testing the package ========
Removing previously existing 'test_package' build folder: D:\conan-center-index\recipes\lzham\all\test_package\build\msvc-193-x86_64-14-release
lzham/cci.20220103 (test package): Test package build: build\msvc-193-x86_64-14-release
lzham/cci.20220103 (test package): Test package build folder: D:\conan-center-index\recipes\lzham\all\test_package\build\msvc-193-x86_64-14-release
lzham/cci.20220103 (test package): Writing generators to D:\conan-center-index\recipes\lzham\all\test_package\build\msvc-193-x86_64-14-release\generators
lzham/cci.20220103 (test package): Generator 'CMakeDeps' calling 'generate()'
lzham/cci.20220103 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
    find_package(lzham)
    target_link_libraries(... lzham::lzham)
lzham/cci.20220103 (test package): Generator 'CMakeToolchain' calling 'generate()'
lzham/cci.20220103 (test package): CMakeToolchain generated: conan_toolchain.cmake
lzham/cci.20220103 (test package): CMakeToolchain generated: CMakePresets.json
lzham/cci.20220103 (test package): CMakeToolchain generated: ..\..\..\CMakeUserPresets.json
lzham/cci.20220103 (test package): Generator 'VirtualRunEnv' calling 'generate()'
lzham/cci.20220103 (test package): Generating aggregated env files
lzham/cci.20220103 (test package): Generated aggregated env files: ['conanrun.bat', 'conanbuild.bat']

======== Testing the package: Building ========
lzham/cci.20220103 (test package): Calling build()
lzham/cci.20220103 (test package): Running CMake.configure()
lzham/cci.20220103 (test package): RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="D:/conan-center-index/recipes/lzham/all/test_package/build/msvc-193-x86_64-14-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="D:/conan-center-index/recipes/lzham/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "D:\conan-center-index\recipes\lzham\all\test_package"
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Using Conan toolchain: D:/conan-center-index/recipes/lzham/all/test_package/build/msvc-193-x86_64-14-release/generators/conan_toolchain.cmake
-- Conan toolchain: CMAKE_GENERATOR_TOOLSET=v143
-- Conan toolchain: C++ Standard 14 with extensions OFF
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
-- The CXX compiler identification is MSVC 19.36.32538.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'lzham::lzham'
-- Configuring done (3.8s)
-- Generating done (0.0s)
-- Build files have been written to: D:/conan-center-index/recipes/lzham/all/test_package/build/msvc-193-x86_64-14-release

lzham/cci.20220103 (test package): Running CMake.build()
lzham/cci.20220103 (test package): RUN: cmake --build "D:\conan-center-index\recipes\lzham\all\test_package\build\msvc-193-x86_64-14-release" --config Release
MSBuild version 17.6.3+07e294721 for .NET Framework

  1>Checking Build System
  Building Custom Rule D:/conan-center-index/recipes/lzham/all/test_package/CMakeLists.txt
  test_package.cpp
  test_package.vcxproj -> D:\conan-center-index\recipes\lzham\all\test_package\build\msvc-193-x86_64-14-release\Release\test_package.e
  xe
  Building Custom Rule D:/conan-center-index/recipes/lzham/all/test_package/CMakeLists.txt


======== Testing the package: Executing test ========
lzham/cci.20220103 (test package): Running test()
lzham/cci.20220103 (test package): RUN: Release\test_package

ERROR: lzham/cci.20220103 (test package): Error in test() method, line 27
        self.run(bin_path, env="conanrun")
        ConanException: Error 3221225781 while executing
@soroosh-sdi soroosh-sdi added the bug Something isn't working label Apr 18, 2024
@soroosh-sdi soroosh-sdi changed the title [package] <lzham>/<cci.20220103>: linking statically doesn't work for msvc [package] lzham/cci.20220103: linking statically doesn't work for msvc Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant