I want to transfer my project from QT Creator to Visual Studio.

My project is a C ++ dll library that is called from an exe file. I created a dynamic library project, transferred the code from .h and .cpp files and added to the solution an exe file that this library should use:

enter image description here

Launched - started. But at the breakpoints of the library cpp-file it says that there are no loaded symbols.

Looked at the settings:

  • Character set - Use Unicode character set (tried to set multibyte - the same)
  • Linker / Debug / Build debug information - chose DEBUG: FULL - so that for sure
  • Below the item to create a program database file - $(OutDir)$(TargetName).pdb - tried to specify the path in which the exe-file is located did not help

The pdb file is created and regularly lies in the directory with the dll, tried to copy it to the program folder. I tried to copy the program to a folder with dll and pdb. Also

On this I somehow stopped myself

Actually the question is: is it possible somehow in Visual C ++ to debug a library through the launch of a program that uses this library like qt creator or is it an unbeatable problem?

  • What does "added an exe-file" mean? How did you launch it? How should this library load? Where does he write? - VTT
  • Or maybe it would be more correct to write "breakpoints", or does it not matter? - 0-Level UNIX Monk
  • @VTT, added a screenshot of the project tree. From the exe file, the extern library function is called, which has a CI interface. Actually, it uses the rest of the functionality of this dll. The application is designated as an autorun project. I launch through F5 - digital-mag
  • Did you watch it? Link - Andrei Khotko
  • one
    See where dll is loaded. If there is no pdb loaded on the way from where the dll is loaded or the pdb does not match the dll, then in this sense there are of course no loaded symbols. Ultimately, the dll that you collected from VS should be loaded. See if there is the same dll somewhere in the installed paths or in the Windows directory for example. - Andrey Sv

1 answer 1

Normal native exe-files run and allow you to debug dll without problems when connecting to their process, and when added to the project. The question remains to the .NET applications

I could not find a way to debug a .NET application from a C ++ dll project, like the dll itself. But I went from the reverse, following this instruction :

  1. Created a project for a classic .NET application.
  2. Enabled debugging of machine code in project properties
  3. Made a function call from dll in C-interface (the project itself can not even be added to the solution)

Debugging dll earned without problems