Closed videoerror closed 2 years ago
Some of the mspdb140 dlls work, and others do not.
I guess that depends on the architecture they are compiled for, x86 or x64.
What does cv2pdb need from Visual Studio for it to generate a pdb file?
mspdb.dll usually starts mspdbsrv.exe that needs a couple more DLLs, e.g. mspdbcore.dll and msobj.dll.
If you are looking for a redistributable PDB generation, you might want to check the LLVM source as it can write PDB files without any dependencies to MS DLLs.
Thanks! That helped me fix my issue. I already suspected the architecture had something to do with some DLLs being found but thanks for confirming. I now have a working portable version of cv2pdb which will be useful for me working on new machines without having to install Visual Studio. For any interested parties, the only files I needed were the x86 versions of:
mspdbsrv.exe
mspdbcore.dll
mspdb140.dll
msobj140.dll
tbbmalloc.dll
For me, these files were located in: <drive_letter>:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\<MSVC_version>\bin\Hostx86\x86\
However, your path may vary slightly based upon what edition and version of Visual Studio you installed. I installed Visual Studio 2022 Community Edition. Hopefully that still gives anyone who has the same issue as I do a good idea of what and where to look for these files.
In any case, thank you rainers for taking the time. I appreciate it, this is a really helpful project.
Hi,
I'm developing a C application that needs to display a stacktrace to the user when the application crashes. I'm using MinGW and I don't want to use a MSVC toolchain to build my application. So I'm looking to integrate cv2pdb into my build process so I can generate a PDB file that will work with standard Win32 stacktracing calls. However, it seems cv2pdb needs VisualStudio to be installed for it to generate PDB files. Upon closer inspection of the source, I see it seems to only rely on "mspdbXYZ.dll" where XYZ are some version numbers. I don't want to install VisualStudio on my main development workstation so I installed it in a Windows 10 VM. I then located the mspdb dll (In my case it was mspdb140.dll) and dumped it my cv2pdb folder located on my host machine, not the VM. I then tried to generate a pdb file by running: "cv2pdb.exe test.exe" where test.exe is located in the same folder as cv2pdb, is a valid PE image compiled with MinGW-w64, and contains DWARF4 debugging information via the GCC flags: "-gdwarf -dwarf-4 -g3". Some of the mspdb140 dlls work, and others do not. There are a total of 6 of them in my Windows 10 VM Visual Studio 2022 install directory, some were duplicates, some weren't but only a couple are recognized by cv2pdb. Of the ones that are recognized by cv2pdb, It simply fails with "cannot create PDB file". How can I fix this error? What does cv2pdb need from Visual Studio for it to generate a pdb file? I want to use cv2pdb without VisualStudio by copying the required dependencies. I should note that on the Windows 10 VM, most confusingly it works some of the time, but not when i place the DLLs directly into a cv2pdb folder on the machine. On my host machine, it never works. It either fails with a pdb generation error or a dll helper dll error.