question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[glfw] glfw/3.3.*: pdb files built by MSVC in Debug are not exported to the package.

See original GitHub issue

Description

When building glfw (tested v3.3.6 and v3.3.8) on Windows with MSVC compiler in Debug, the Debug Information Format is \Zi, thus producing a separate .pdb file.

When building the recipe locally, you can see that the .pdb is indeed present next to glfw3.lib in the build folder, but it is not exporter alongside in the package folder.

This causes linker waring when using glfw3 as upstream:

warning LNK4099: PDB 'glfw3.pdb' was not found with 'glfw3.lib(init.obj)' or at 'D:\projects\build-conan-Visual Studio16\src\apps\Debug\glfw3.pdb'; linking object as if no debug info

Package and Environment Details

  • Package Name/Version: glfw/3.3.8
  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio 16
  • Conan version: conan 1.53.0

Conan profile

[settings] arch=x86_64 build_type=Debug compiler=Visual Studio compiler.runtime=MDd compiler.version=16 os=Windows

[requires] opengl/system

[options] shared=False vulkan_static=False

[full_settings] arch=x86_64 build_type=Debug compiler=Visual Studio compiler.runtime=MDd compiler.version=16 os=Windows

[full_requires] opengl/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9

[full_options] shared=False vulkan_static=False

[recipe_hash] 205c31edba0c4d470236d5216c7329ca

[env]

Steps to reproduce

conan install glfw/3.3.8@ --build=glfw -s build_type=Debug

Then take a look into the produced build and package folders in conan cache.

Logs

Click to expand log
warning LNK4099: PDB 'glfw3.pdb' was not found with 'glfw3.lib(init.obj)' or at 'D:\projects\build-conan-Visual Studio16\src\apps\Debug\glfw3.pdb'; linking object as if no debug info

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
uilianriescommented, Oct 25, 2022

@Adnn You can configure /Z7 directly from your profile, as Prince commented.

The global.conf has all supported configurations. Based on that, you can use tools.build:cflags and tools.build:cxxflags.

1reaction
prince-chrismccommented, Oct 21, 2022

The goal is to allow you to debug your application… it’s pretty rare you need to step into the code of ur dependencies. (in a perfect code you would never need to).

The warning is annoying but the overhead and cost of the PDBs are pretty considerable given they are a nice to have so we prioritized our resources, hopefully that makes sense. It’s pretty easy to suppress the warning from a profile or cli.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Including the GLFW header file
This is not a tutorial on compilation or linking. ... You should include the GLFW header in the source files where you use...
Read more >
[GLFW] 3.2.1 cannot find pdbs · Issue #126 - GitHub
pdb file, you should find it in the bin directory of the debug package. I am not sure why it is causing you...
Read more >
How to remove warning LNK4099: PDB 'lib.pdb' was not found
Understand that the underlying problem is a missing debug symbols file (.pdb) for the library mentioned in the warning. Library files ...
Read more >
create_stdout.txt - JFrog
Exporting it... glfw/3.3.2 exports: Copied 1 '.yml' file: conandata.yml [HOOK ... for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio ...
Read more >
CPP / C++ - CMake Building System
txt for the IDEs and text editors: Microsoft Visual Studio, CodeBlocks, Kate projects, Sublime and Eclipse CDT. Manage a project in IDEs which ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found