Skip to content

vcpkg doesn't want to link 32-bit library, and always use x64 binary #37516

Closed Answered by dg0yt
AFOEK asked this question in Q&A
Discussion options

You must be logged in to vote
/usr/bin/ld: i386:x86-64 architecture of input file `/home/afoek/Documents/vcpkg/installed/x64-linux/debug/lib/libcpr.a(proxyauth.cpp.o)' is incompatible with i386 output

Note installed/x64-linux: This is the location for the x64-linux artifacts, which implies x64. What you want is x86-linux. And that's what you try to set in your project, but...

Settings which are meant to affect the toolchain must be before the project() command. In particular: VCPKG_TARGET_TRIPLET.
https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/cmake-integration#settings-reference

FTR some of the variables you set in your project have no effect because they are for script mode when portfiles control port b…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Neumann-A
Comment options

@AFOEK
Comment options

@AFOEK
Comment options

Answer selected by AFOEK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants