4

I'm creating with visual studio 2010 about a dozen small libraries which I merged into one single huge library.

I can't get around the problem about setting the debug information for the merged library even if I'm not using pdb files.

I've tried to compile all with the '/Z7' options (debug information in the obj files) but the linker is still complaining about missing pdb files!

I compile individual C++ files with:

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I..\Logging
    /Z7 /nologo /W4 /WX /MP /Od /Oy- 
    /D WIN32 /D _DEBUG /D _LIB /D USING_RV /D _CRT_SECURE_NO_WARNINGS /D _UNICODE /D UNICODE 
    /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR 
    /Fo"D:\Work\branches\DSC_LONS00107672\C++\Libs\Runtime\bin\Win32\Debug\\" 
    /Gd /TP /analyze- /errorReport:queue Alert.cpp ..other...sources... /MP 

I create the small libraries with:

 C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\Lib.exe 
      /OUT:"D:\Work\branches\DSC_LONS00107672\C++\Bin\Win32\Debug\Runtime.lib" 
      /NOLOGO /MACHINE:X86 
      D:\Work\branches\DSC_LONS00107672\C++\Libs\Runtime\bin\Win32\Debug\Alert.obj
      ...other..objects... 

And the huge library with:

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\Lib.exe     
    /OUT:"D:\Work\branches\DSC_LONS00107672\output\C++\lib\Debug\DSC.lib" 
    bridging.lib ...other...small...libraries
    /LIBPATH:D:\Work\branches\DSC_LONS00107672\C++\ThirdParty\zlib\lib\Win32\Debug\
    /NOLOGO /MACHINE:X86
    D:\Work\branches\DSC_LONS00107672\C++\DSC\bin\Win32\Debug\DSC.obj

I then copy the resulting library in a library folder that can be accessed for linking other programs.

But when I link any program with this library I get a lot of warnings like:

DSC.lib(ActionType.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 
    'DSC.lib(ActionType.obj)' or at
    'D:\src\VS2010\DSC\TestApps\LQ2Tester\bin\x64\Debug\vc100.pdb'; 
    linking object as if no debug info

And I can't debug the application

What did I miss?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.