microsoft / microsoft/vcpkg

[FFTW3] Some symbols not exported properly on Windows?

Open
#39,719 1 comment 0 reactions 1 assignee Claimed by @Cheney-W View on GitHub
category:port-bug no-stale
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

**Describe the bug**
A clear and concise description of what the bug is.

**Environment**
- OS: Windows 11
- Compiler: Visual Studio 2022

**To Reproduce**
Steps to reproduce the behavior:
1. Clone this MRE on a Windows machine https://github.com/kwsp/repro_fftw_version
2. Try to build with the CMake Preset "Win64".

**Expected behavior**
Builds fine. The same repo builds and runs on a M1 mac (see https://github.com/microsoft/vcpkg/issues/39717)

**Failure logs**
-(please attached failure logs)
```
[main] Building folder: repro_fftw_version main
[build] Starting build
[proc] Executing command: chcp
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build C:/src/repro_fftw_version/build/win64 --config Release --target main
[build] MSBuild version 17.9.8+b34f75857 for .NET Framework
[build]
[build] main.obj : error LNK2019: unresolved external symbol fftw_version referenced in function main [C:\src\repro_fftw_version\build\win64\src\main.vcxproj]
[build] C:\src\repro_fftw_version\build\win64\src\Release\main.exe : fatal error LNK1120: 1 unresolved externals [C:\src\repro_fftw_version\build\win64\src\main.vcxproj]
[proc] The command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build C:/src/repro_fftw_version/build/win64 --config Release --target main exited with code: 1
[driver] Build completed: 00:00:00.464
[build] Build finished with exit code 1
```

**Additional context**

This is weird because from what I can see, the symbol `fftw_version` is exported in the lib and dll. So I'm puzzled about why this specific symbol is giving issues. All other fftw functions work as far as I can tell.

```
(base) PS C:\src\repro_fftw_version> dumpbin /exports .\build\win64\vcpkg_installed\x64-windows\lib\fftw3.lib | findstr fftw_version
fftw_version
(base) PS C:\src\repro_fftw_version> dumpbin /exports .\build\win64\vcpkg_installed\x64-windows\bin\fftw3.dll | findstr fftw_version
123 7A 000CF260 fftw_version = fftw_version
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.