error c1041:cannot open program database pdb...on vs2015

6,101 views
Skip to first unread message

張君豪

unread,
May 30, 2016, 5:15:14 AM5/30/16
to Chromium-dev
I'm using vs2015 build chromium project, when I open chrome.sln, and build from chrome.vcxproj.

It has some error, like "error C1041: cannot open program database sync_core.cc.pdb; if multiple CL.EXE write to the same .PDB file, please use /FS"



I search this message on internet, it has some solution(set "/FS" in project->properties->C/C++ -> Commandline -> Additional Options), but I tried...,it's not work.

only sync_core.vcxproj has "C/C++ -> Commandline -> Additional Options", chrome.vcxproj did not.

I set "/FS" in sync_core.vcxproj is correct? how can i fix it...




Bruce

unread,
May 31, 2016, 1:03:22 PM5/31/16
to Chromium-dev
You have probably ended up starting two simultaneous builds, and these two builds are simultaneously writing to sync_core.cc.pdb. Exactly how are you triggering a build?

Note that Chromium is not built with Microsoft's msbuild system. Instead it is built using ninja. A typical command-line to build Chromium would be:

ninja -C out\Debug

(replace out\Debug with the output directory you wish to use). When you build from VS it is invoking ninja, and if you aren't careful it may invoke it once per project.

Changing the VS project settings won't have any affect because the build settings are all in the .ninja files, which are generated by gyp or gn. But, no changes to the build settings are needed in this case anyway - you just need to invoke ninja correctly.

葛光乐

unread,
Jun 1, 2016, 6:31:41 AM6/1/16
to jhangj...@gmail.com, Chromium-dev
Ever interrupt compilation?  If that were the case, clean and compile again.
ninja -C out\Debug -tclean chrome

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.



--
-- guangle

Bruce Dawson

unread,
Jun 1, 2016, 2:18:33 PM6/1/16
to ggua...@gmail.com, jhangj...@gmail.com, Chromium-dev
Interrupting compilation should not require a subsequent full rebuild. The only bug I am aware of regarding interrupting compilation is that Ctrl+C sometimes causes the compiler to crash and bring up a Windows Error Reporting dialog.

Also, the preferred method for doing a clean rebuild (when using gn, which developers should generally be using now on Windows) is:

gn clean out\<builddir>

You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/QjLn2CZoNE0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev...@chromium.org.

張君豪

unread,
Jun 3, 2016, 12:24:57 PM6/3/16
to Chromium-dev, ggua...@gmail.com, jhangj...@gmail.com
I have tried to use clear and build project in visual studio, but it has same error. And then I delete file(sync_core.cc.pdb) and clear&build project, it's work...

I'm not sure this is not the right approach, or I'm lucky...



Bruce Dawson於 2016年6月2日星期四 UTC+8上午2時18分33秒寫道:
Reply all
Reply to author
Forward
0 new messages