microsoft / microsoft/vcpkg

[oatpp] build failure with MSVC and manifest mode

Open
#45,754 3 comments 0 reactions 1 assignee View on GitHub

@Cheney-W is already working on this.

Since May 30, 2025.

category:port-bug Stale
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

### Operating system

Windows

### Compiler

MSVC

### Steps to reproduce the behavior

```Shell
1. Create console c++ application in Visual Studio and enable manifest mode.
2. Add oatpp to vcpkg.json deps
3. Include any header from oatpp (I think this is part of the issue as the include shows up as oatpp-1.3.0/oatpp/oatpp/...)

4. Compile
```

### Failure logs

```
0>WindowsServiceManagerApi.obj: Error LNK2019 : unresolved external symbol "public: static class std::shared_ptr __cdecl oatpp::web::server::HttpRouter::createShared(void)" (?createShared@HttpRouter@server@web@oatpp@@SA?AV?$shared_ptr@VHttpRouter@server@web@oatpp@@@std@@XZ) referenced in function main
0>WindowsServiceManagerApi.exe: Error LNK1120 fatal: 1 unresolved externals
0>------- Finished building project: WindowsServiceManagerApi. Succeeded: False. Errors: 2. Warnings: 0
```

### Additional context

```
#include
#include

int main()
{
auto router = oatpp::web::server::HttpRouter::createShared();
std::cout << "Hello World!\n";
}
```

My assumption is this was tested only with CMake builds?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.