Requesting MT/MD PDB

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Requesting MT/MD PDB

Postby almaris » Tue Jan 25, 2011 1:14 pm

Just to eliminate some linker warnings, it would be fantastic if the pdbs were included as well for the mt/md .lib builds in Newton.
Thanks!
almaris
 
Posts: 6
Joined: Tue Jan 25, 2011 1:12 pm

Re: Requesting MT/MD PDB

Postby Julio Jerez » Tue Jan 25, 2011 3:12 pm

The dll in SDK 2.29 comes with the pdb for both the release and the debug versions

But how can you make pdb for static library?
I was trying to do tah teh oeth day and I could not find how.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Requesting MT/MD PDB

Postby almaris » Tue Jan 25, 2011 4:52 pm

Hello Julio,
In the intermediate folder for the MT/MD builds there will be a vc90.pdb file.
The specific link warning i'm receiving is as follows:

sTV3D65d.lib(Newton.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '\trunk\..\..\_nocommit\sTV3D65d.lib' or at '\trunk\vc90.pdb'; linking object as if no debug info

Maybe this provide a little more context..

Thanks!
almaris
 
Posts: 6
Joined: Tue Jan 25, 2011 1:12 pm

Re: Requesting MT/MD PDB

Postby thedmd » Tue Jan 25, 2011 7:20 pm

Try C/C++ -> Output Files -> Program Database File Name. Specify something reasonable in there, for instance newton_mt_d.pdb. And voila.
thedmd
 

Re: Requesting MT/MD PDB

Postby Julio Jerez » Tue Jan 25, 2011 9:07 pm

Ok I will try that.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Requesting MT/MD PDB

Postby Julio Jerez » Wed Jan 26, 2011 11:07 am

Ok I see the option, however I am confused.

Netwon is three libaries tah are bouded together.
one i steh lowe lever Class library, that does math, containers like list, map, heap and stuff, comuputational geometry, base class,
the other is the Physic class library, and the thirs is the C wraper inteface.

Then what I do is that I append the three toghether, do you think I I add

c/c++ --> Output File --> $(IntDir)/$(ProjectName)

to each library, then thr PDB will also be boundled?
It does not look like it does that becaus eteh pdg seem to be 660 k byte not matter what I do.,
Also does it matter if the PDG has the same name as the library like Netwon.pdb instead of the default VC90.pdb ?


but anyway I will post sdk 2.30 with the the PDB for the static libraries
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Requesting MT/MD PDB

Postby Julio Jerez » Wed Jan 26, 2011 1:03 pm

Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Requesting MT/MD PDB

Postby thedmd » Wed Jan 26, 2011 4:27 pm

I doubt PDB of Newton will be merged dependent libraries. This one will contain only debug info from this very specific project. Actuallly it is a collection of debug info of every translation unit (cpp file). Something like static library of debug information. ; )

600kB isn't wrong. For example libFLAC PDB is around 110kB.

VC90.pdb is useless name. Especially if I had to use two foreign libraries when both set VC90.pdb as their debug info. I'm PDB files after name of libraries, they differ only by extension.
thedmd
 

Re: Requesting MT/MD PDB

Postby almaris » Wed Jan 26, 2011 8:47 pm

Hello again Julio,
Thanks for your response, the updated files you have provided resolved one of the linker warnings I was receiving, however I still receive warnings from the following objects:

'physics_d.pdb'
'corelib_d.pdb'

Sorry for all of the bother, I just don't like warnings :)
almaris
 
Posts: 6
Joined: Tue Jan 25, 2011 1:12 pm

Re: Requesting MT/MD PDB

Postby thedmd » Wed Jan 26, 2011 9:04 pm

I do not know a method of merging PDB files. Maybe there is such tool in Visual Studio, but I do not know it.

Most reliable solution with Visual Studio is to have one project with all sources. That wouldn't be problematic if switches for the compiler are very same in those three.

There is a slightest chance to solve the problem by setting corelib, physics and newton to use very same PDB file. If next compiled library append and do not overwrite database content, problem is solved.

If I had to choose I will stick to the first method with single project.
thedmd
 

Re: Requesting MT/MD PDB

Postby Julio Jerez » Wed Jan 26, 2011 9:26 pm

thedmd wrote:I do not know a method of merging PDB files. Maybe there is such tool in Visual Studio, but I do not know it.

I do not know how to do tha either,

I am afriad I will not even consider merging teh libaries,
Netwon si no just one project, teh Core.lib I use for many, different things.
Ironically in the Mac and Linux I do merge all teh files.
One solution will be to distribute the libraies in seprate forme, but I do n liek tha idea iether.

You say leaves then with the default name, but how will that work?

I think they must be a way to do that, because the Libraries utilily merge librariess I do not knwo why it wuill no merge teh PDB.
Maybe this is a question to ask in the Visual Studio forum over Microsoft.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Requesting MT/MD PDB

Postby thedmd » Thu Jan 27, 2011 7:31 am

No, not with default name. Can you try to set PDB name in all three project to newton_d.pdb? In all cases, project settings should point to the very same PDB file.

Please check http://msdn.microsoft.com/en-us/library/yd4f8bd1.aspx:
Each time it creates an OBJ file, the C/C++ compiler merges debug information into VCx0.PDB. The inserted information includes type information but does not include symbol information such as function definitions. So, even if every source file includes common header files such as <windows.h>, the typedefs from those headers are stored only once, rather than being in every OBJ file.


There is a chance this will work.


In case of Xcode and project merging. You can avoid this by using external references. They were added recently to the Xcode. I'm using them with success right now.
thedmd
 

Re: Requesting MT/MD PDB

Postby Julio Jerez » Thu Jan 27, 2011 12:05 pm

Ok I added this to all target
$(PlatformName)/$(SolutionName)/$(ConfigurationName)/$(SolutionName)

At first it seemed that it will work, because I see it making a larger PDB file, however when I am going to link I get these warning errors, in any link configuration,
3>Linking...
3>LINK : Win32/newton/debug_2009_dll\newton_d.dll not found or not built by the last incremental link; performing full link
3> Creating library Win32/newton/debug_2009_dll/newton_d.lib and object Win32/newton/debug_2009_dll/newton_d.exp
3>physics.lib(dgBallConstraint.obj) : warning LNK4204: 'c:\newton_200\3dlib\tools\newton\project_vs2008\win32\newton\debug_2009_dll\newton_d.pdb' is missing debugging information for referencing module; linking object as if no debug info
3>physics.lib(dgBilateralConstraint.obj) : warning LNK4204: 'c:\newton_200\3dlib\tools\newton\project_vs2008\win32\newton\debug_2009_dll\newton_d.pdb' is missing debugging information for referencing module; linking object as if no debug info
3>physics.lib(dgConstraint.obj) : warning LNK4204: 'c:\newton_200\3dlib\tools\newton\project_vs2008\win32\newton\debug_2009_dll\newton_d.pdb' is missing debugging information for referencing module; linking object as if no debug info
3>physics.lib(dgContact.obj) : warning LNK4204: 'c:\newton_200\3dlib\tools\newton\project_vs2008\win32\newton\debug_2009_dll\newton_d.pdb' is missing debugging information for referencing module; linking object as if no debug info
3>physics.lib(dgCorkscrewConstraint.obj) : warning LNK4204: 'c:\newton_200\3dlib\tools\newton\project_vs2008\win32\newton\debug_2009_dll\newton_d.pdb' is missing debugging information for referencing module; linking object as if no debug info
...
...


I appears that DPB files can not be concatenedated
Linker Tools Warning LNK4204
Visual Studio 2010 Other Versions Visual Studio 2008 Visual Studio 2005 Visual Studio .NET 2003
'filename' is missing debugging information for referencing module; linking object as if no debug info

The .pdb file has an erroneous signature. The linker will continue to link the object without debug information. You may want to recompile the object file using the /Zi option.

LNK4204 can occur if some of the objects in the library refer to a file that no longer exists. This could happen when rebuilding the solution, for example; an object file might be deleted and not rebuilt because of a compilation error. In this case, either compile with /Z7, or /Fd, to update the objects to refer to a single file per-library (that is not the default .pdb file name). For more information, see /Fd (Program Database File Name). Ensure that the .pdb is saved with the library every time it is updated in the source control system.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Requesting MT/MD PDB

Postby thedmd » Thu Jan 27, 2011 4:28 pm

Trick with shared PDB file should work for static version only, for shared ones it is not needed.

Shared targets specify PDB file name during linking stage, so those specified in C++ property page should be set to default value.
thedmd
 

Re: Requesting MT/MD PDB

Postby Julio Jerez » Thu Jan 27, 2011 4:34 pm

I build the project using C7 compatible /Z7

and all project seem to comple fine, if ther is a difference betwenn C7 and PDB, I cannot tell what it is.

For waht I can see C7 is better because it appen teh debig info to teh Objc file, so the debug is in the Libraries.
The is cool because the linker can produce the PDBs, from the C7 debug info.

Am I missing something?

if this is alright I will posot sdk 2.30 tonight again.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests