Build and Link external dependency without vcpkg in VS 2022 for exe project

196 views Asked by At

We are trying to remove vcpkg from our project as we had lot of issues recently when development is done throughout multiple machines with multiple configurations. Our project has several external dependencies such as boost, IXWebSocket, Eigen etc. We successfully removed all external dependencies and included them in project structure itself except IXWebSocket. Even though IXWebSocket is locally present in folder structure (I don't get any errors due to file not being found as well), the linker fails when we disable vcpkg, specifically the AutoLink feature.

As far as I understand, IXWebSocket library needs to be built first, then my project's linker will link the necessary libraries of the built ws library with my project. It is my understanding that (probably wrong), AutoLink when requested builds ixwebsocket and links correctly with my project.

The errors I'm getting are:

LNK2019: unresolved external symbol...
LNK2001: unresolved external symbol...
  • Is my understanding here correct?
  • How can I get the IXWebSocket built first?
  • I've read that I can either use vcpkg or CMake, how do I integrate CMake to get IXWebSocket built? I do not want to integrate cmake to entire project, just get the ws package built.

This is on Windows 10, Visual Studio 2022 Community, C++20

EDIT: I understand the unresolved external symbol error might be the same but its far from the duplicate question. This is a very specific question on build/link process of a project that has external dependency, not basic unresolved external symbol error question.

0

There are 0 answers