Vadim Zeitlin wrote:
> On Mon, 11 Mar 2024 02:09:21 -0700 (PDT) 'Gisle Vanem' via wx-users wrote:
>
> GV> When linking with "*link.exe -debug -verbose ..."*, I get a large
> GV> number of messages like this from MS 'link.exe':
> GV>
> GV> * wxmsw33u.lib(monolib_framecmn.obj) : warning LNK4099: PDB '' was not
> GV> found with 'wxmsw33u.lib(monolib_framecmn.obj)' or at ''; linking object
> GV> as if no debug info*
> GV> I'd like full debug-info in my .exe.
>
> How do you build the library and your application? Have you already tried
> rebuilding everything? Normally you shouldn't have to do anything and it
> should just work. Clearly it doesn't in your case, but it's very difficult
> to know why without having any idea of what you're doing.
I build wxWidgets using the Makefile.vc files. But cleaning
everything and rebuilding with the 'x64 cl.exe' first in my PATH:
cd build\msw
nmake -f Makefile.vc TARGET_CPU=x64 USE_OPENGL=1 ^
DEBUG_INFO=1 VENDOR= MONOLITHIC=1 BUILD=release ^
SHARED=0 UNICODE=1 clean all
the issue is solved. No more 'LNK4099:' warnings in
my application.
Then I switched to the 'x86 cl.exe' first in my PATH
and rebuilt wxWidgets:
cd build\msw
nmake -f Makefile.vc TARGET_CPU=x86 USE_OPENGL=1 ^
DEBUG_INFO=1 VENDOR= MONOLITHIC=1 BUILD=release ^
SHARED=0 UNICODE=1 clean all
Then rebuilding my application with the 'x64 cl.exe'
first in my PATH, the issue came back?!
So based on 2nd answer here:
https://stackoverflow.com/questions/25843883/how-to-remove-warning-lnk4099-pdb-lib-pdb-was-not-found
I did:
cd %WXWIN%\lib\vc_x64_lib
lib -list wxmsw33u.lib | grep monolib_framecmn\.obj
lib -extract:vc_x64_mswu\monolib_framecmn.obj wxmsw33u.lib
dumpbin -nologo -section:.debug$T monolib_framecmn.obj
I saw no reference to any .PDB-file:
SECTION HEADER #5F9
.debug$T name
0 physical address
0 virtual address
58 size of raw data
57323 file pointer to raw data (00057323 to 0005737A)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
42100040 flags
Initialized Data
Discardable
1 byte align
Read Only
Summary
58 .debug$T
There should be a RAW section with the .PDB-name.
Hence the LNK4099 warning.
So it seems the x86 build overwrites some .PDB-files
from the x64 build.
--
--gv