Linking with /MDd

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Linking with /MDd

Postby chillitom » Tue Nov 23, 2010 8:59 am

Hi Marshall,

I'm trying to create a CLR wrapper for the Chromium Embedded Framework.

I managed to follow the instructions for building a /MDd version of the libcef_wrapper_dll.lib file however when I try to link my library against this lib I get the following error:

Code: Select all
Error   1   fatal error LNK1318: Unexpected PDB error; OK (0) ''   c:\Projects\Cef\CefSharp\libcef_dll_wrapper.lib   1   CefSharp


The output window shows the following:

Code: Select all
...
1>Starting pass 2
1>     app.res
1>     Stdafx.obj
1>     CefSharp.obj
1>     AssemblyInfo.obj
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef.lib(libcef.dll)
1>     libcef_dll_wrapper.lib(transfer_util.obj)
1>libcef_dll_wrapper.lib(transfer_util.obj) : fatal error LNK1318: Unexpected PDB error; OK (0) ''


I'm new to Windows C++ development and not really sure of the linking conventions. Does libcef_wrapper_dll.lib contain transfer_util.obj? If I'm going to be dynamically linking against lib cef shouldn't I have a libcef_wrapper_dll.dll?

I get the same error if I try to compile cefclient but change its flags to /MDd too. Have you ever seen anything similar?

Many thanks, Tom.
chillitom
Techie
 
Posts: 18
Joined: Sat Nov 20, 2010 11:50 am

Re: Linking with /MDd

Postby chillitom » Tue Nov 23, 2010 11:07 am

.. also is it usual for the cef.sln to cause VS2008 to grind to a complete halt? I've applied all of the listed hot fixes where they apply and it still doesn't appear to cope. Just compiling libcef_wrapper_dll.lib takes me about 10 mins.
chillitom
Techie
 
Posts: 18
Joined: Sat Nov 20, 2010 11:50 am

Re: Linking with /MDd

Postby magreenblatt » Tue Nov 23, 2010 11:40 am

Does libcef_wrapper_dll.lib contain transfer_util.obj?

Yes.

If I'm going to be dynamically linking against lib cef shouldn't I have a libcef_wrapper_dll.dll?

libcef_dll_wrapper.lib is a static library, meaning there is no corresponding DLL. http://en.wikipedia.org/wiki/Static_library

fatal error LNK1318: Unexpected PDB error

This looks like a problem creating the debug database (PDB) file. Try deleting all .PDB, .IDB, .ILK files from the solution directory (and all sub-directories) and rebuilding.

is it usual for the cef.sln to cause VS2008 to grind to a complete halt?

It depends on how fast your computer is.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Linking with /MDd

Postby chillitom » Thu Nov 25, 2010 6:07 am

Thanks Marshall. I found that I was having some problems with mspdbsvr.exe, apparently a process that serves up debug symbols for VS. Deleting absolutely everything and rebuilding the lib a few dozen times eventually fixed it, fingers crossed it won't recur.

So I've got a pretty meaty workstation here (twin dual-core i7s with HT and an SSD), the cef.sln solution is the biggest C++ solution I've tried opening (except all.sln, which immediately crashed my VS). I'm thinking there must be something up with my install of visual studio. I don't imagine you or any of the other Chromium devs would put up with a stuttering unresponsive IDE interface.

Better news, I've successfully managed a proof of concept to embed chromium in a winforms and a WPF application using CEF thanks to all the great work you (and the chromium team) have done. If others are interested in a .Net Chromium component then I'd be happy to share.

Tom.
chillitom
Techie
 
Posts: 18
Joined: Sat Nov 20, 2010 11:50 am

Re: Linking with /MDd

Postby magreenblatt » Fri Nov 26, 2010 12:32 pm

So I've got a pretty meaty workstation here (twin dual-core i7s with HT and an SSD)

You'll likely see better performance if you load the project from a separate hard drive.

Better news, I've successfully managed a proof of concept to embed chromium in a winforms and a WPF application using CEF thanks to all the great work you (and the chromium team) have done. If others are interested in a .Net Chromium component then I'd be happy to share.

Glad to head that you've been successful. If you have the time and inclination you might consider developing and releasing it as an open source project.

Regards,
Marshall
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 111 guests