Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build with Visual Studio 2008? #26

Closed
magreenblatt opened this issue Jun 2, 2009 · 27 comments
Closed

How to build with Visual Studio 2008? #26

magreenblatt opened this issue Jun 2, 2009 · 27 comments
Labels
bug Bug report

Comments

@magreenblatt
Copy link
Collaborator

Original report by Anonymous.


Original issue 26 created by leahayes on 2009-06-02T13:53:06.000Z:

Hi,

I have just found this project and am trying to compile it using Visual
Studio 2008. I keep getting a link error where "libcef_dll_wrapper.lib" was
built using an older version.

I do not have access to Visual Studio 2005 any more, and it appears that
Microsoft no longer offer an express edition download of Visual C++ 2005.

What is the solution to this problem?

Many thanks,

Lea Hayes

@magreenblatt
Copy link
Collaborator Author

Comment 1. originally posted by magreenblatt on 2009-06-02T14:10:51.000Z:

At a minimum you will need to download the CEF source code and build
libcef_dll_wrapper using VS2008 -- that should work with the Express edition. If you
also want to build libcef using VS2008 you will need to download both the Chromium
and CEF source code. People have reported successfully building CEF with VS2008 but
it is not officially supported. If you are using the Express edition to build libcef
you also will need to acquire copies of the Microsoft ATL files which are not
distributed as part of the Express package.

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 2. originally posted by leahayes on 2009-06-02T19:02:08.000Z:

Thanks for your fast reply.

I have downloaded the files from the "Source" tab on this page. When I try to open the "cef.sln" solution in Visual C++ 2008 Professional it attempts to convert the project, but this fails.

I have also attempted to open just the "libcef_dll_wrapper" project, but conversion on that also fails. I created an empty project and added the wrapper file. When building I get a huge list of link
errors, here are a few of them:

1>Linking...
1>libcef_dll_wrapper.obj : error LNK2001: unresolved external symbol __imp__cef_do_message_loop_work
1>libcef_dll_wrapper.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CefV8ValueCToCpp::ExecuteFunction(class CefRefPtr,class std::vector<class
CefRefPtr,class std::allocator<class CefRefPtr > > &,class CefRefPtr &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
std::allocator<wchar_t> > &)" (?ExecuteFunction@ CefV8ValueCToCpp@ @ UAE_NV?$CefRefPtr@ VCefV8Value@ @ @ @ AAV?$vector@ V?$CefRefPtr@ VCefV8Value@ @ @ @ V?$allocator@ V?$CefRefPtr@ VCefV8Value@ @ @ @ @ std@ @ @ std@ @ AAV2@ AAV?
$basic_string@ _WU?$char_traits@ _W@ std@ @ V?$allocator@ _W@ 2@ @ 4@ @ Z)

I have downloaded the Chromium source, and placed the "cef" folder inside the chromium directory (so that the relative paths match). However, when loading "cef.sln", Visual Studio is unable to load any of
the projects, and again, conversion fails.

Just to clarify, I want to compile (and modify) the "cefclient" application using VS2008.

I am completely lost here.

@magreenblatt
Copy link
Collaborator Author

Comment 3. originally posted by magreenblatt on 2009-06-02T19:15:31.000Z:

Did you download the revision of the Chromium sources indicated by the
CHROMIUM_BUILD_COMPATIBILITY.txt file?

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 4. originally posted by tux316 on 2009-06-03T01:24:51.000Z:

leyhayes,

I have VS2008 and have successfully built CEF with it. This page will be your best
friend: http://dev.chromium.org/developers/how-tos/build-instructions-windows

It was a hassle trying to get all the elements in place, but once you do, it will all
start to make sense. The biggest thing is the gclient that Chromium uses. Once you
have all items in place, you -must- switch to the revision that is compatible with
CEF (Chromium Revision 16080 is compatible with CEF Revision 24-27). When I say
"switch," I mean check out that specific revision with SVN, and then sync that
revision with gclient (this step is explained in the CHROMIUM_BUILD_COMPATIBILITY.txt
under the CEF directory).

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 5. originally posted by bamaboy1217 on 2009-06-03T01:30:30.000Z:

Key important things to remember (this kept me from building the source for a few
days until it all fell into place).

A) No Spaces in your chromium directory PERIOD! - it will not work
B) cef goes under the src directory as a folder, to compile cef run the cef.sln under
the cef directory after it is a subdirectory of the chromium source file
[Thats confusing so it should be like this]
C:\chromiumtrunk\src\cef
C) It takes a solid 25 minutes to build so even when you think it could possibly be
frozen its not, let it build webkit is a serious project to build.
D) FOLLOW THE INSTRUCTIONS TO THE LETTER, I cannot stress enough how confusing the
gclient can be for the first time. You will need to either use the tarball's for the
two projects or SVN checkout the chromium source, then svn check out the CEF source
as a directory under the chromium src. After that use the depot tools to call
gclient sync --revision src@ 16080 --force [Note i think thats the syntax look at the
chromium compatibility text] then this will take a solid hour if your unluckly. I'd
advise you to read how to skip the layout tests in the sync as those take forever.

Once you do this you may build cef from the cef.sln file. You may also modify the
cefclient from this solution but I would suggest you build cef first then modify the
client.

Good Luck.

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 6. originally posted by leahayes on 2009-06-03T16:18:48.000Z:

Thanks for your advice, I was not aware of different revisions.

Visual Studio is now finding the project files, the ".sln" files were missing from my
original download. However, lots of the files are still missing. I am finding that
"gclient" is coming up with errors like "Connection was closed by server". I have run
"gclient" with those arguments several times until it ended without error, but there
are still missing files.

I have been running "gclient" with the following:

gclient sync --revision src@ 17397 --force

Thanks again!

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 7. originally posted by tux316 on 2009-06-03T17:15:27.000Z:

Did you run:

gclient config http://src.chromium.org/svn/trunk/src

?

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 8. originally posted by leahayes on 2009-06-03T17:47:00.000Z:

Yes, before I downloaded using the --revision argument I removed my prior download of
Chromium, ran the "config" command, and then the "sync" command.

Each time I synchronize the trunk, new files and folders appear. For example, a
folder named "o3d" appeared after like the 4th time. There are still files missing
however, and the "gclient" tool is not downloading anything new any more.

For example, I am missing a header file "CSSPropertyNames.h". I have no way of
knowing what files I am missing, but I suspect that there are quite a few.

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 9. originally posted by leahayes on 2009-06-03T21:54:05.000Z:

I have tried everything again, I am still not getting any further.

Here are some of the compilation errors that I am receiving (there are 122 errors in total):

Error 1 Error result 2 returned from 'C:\WINDOWS\system32\cmd.exe'. Project pcre
Error 2 Error result 2 returned from 'C:\WINDOWS\system32\cmd.exe'. Project webcore
Error 3 fatal error C1083: Cannot open include file: 'CSSPropertyNames.h': No such file or directory
d:\chromiumtrunk\src\third_party\WebKit\WebCore\page\animation\AnimationController.h 32 webkit
Error 4 error C2471: cannot update program database 'd:\chromiumtrunk\src\cef\release\obj\glue\glue\vc80.pdb'
d:\chromiumtrunk\src\webkit\glue\alt_404_page_resource_fetcher.cc 1 glue
Error 5 fatal error C1083: Cannot open include file: 'CSSPropertyNames.h': No such file or directory
d:\chromiumtrunk\src\third_party\WebKit\WebCore\page\animation\AnimationController.h 32 glue
Error 6 error C2471: cannot update program database 'd:\chromiumtrunk\src\cef\release\obj\glue\glue\vc80.pdb'
d:\chromiumtrunk\src\webkit\glue\devtools\debugger_agent_manager.cc 1 glue
Error 7 fatal error C1083: Cannot open include file: 'CSSPropertyNames.h': No such file or directory
d:\chromiumtrunk\src\third_party\WebKit\WebCore\page\animation\AnimationController.h 32 glue
Error 8 error C2471: cannot update program database 'd:\chromiumtrunk\src\cef\release\obj\glue\glue\vc80.pdb'
d:\chromiumtrunk\src\webkit\glue\devtools\debugger_agent_impl.cc 1 glue
Error 9 fatal error C1083: Cannot open include file: 'V8DOMWindow.h': No such file or directory
d:\chromiumtrunk\src\webkit\glue\devtools\debugger_agent_impl.cc 19 glue
Error 10 error C2471: cannot update program database 'd:\chromiumtrunk\src\cef\release\obj\glue\glue\vc80.pdb'
d:\chromiumtrunk\src\webkit\glue\webworkerclient_impl.cc 1 glue
Error 11 fatal error C1083: Cannot open include file: 'CSSPropertyNames.h': No such file or directory
d:\chromiumtrunk\src\third_party\WebKit\WebCore\page\animation\AnimationController.h 32 glue
Error 12 error C2471: cannot update program database 'd:\chromiumtrunk\src\cef\release\obj\glue\glue\vc80.pdb'
d:\chromiumtrunk\src\webkit\glue\webview_impl.cc 1 glue
Error 13 fatal error C1083: Cannot open include file: 'CSSValueKeywords.h': No such file or directory
d:\chromiumtrunk\src\webkit\glue\webview_impl.cc 39 glue

@magreenblatt
Copy link
Collaborator Author

Comment 10. originally posted by magreenblatt on 2009-06-03T23:39:22.000Z:

CSSPropertyNames.h and related files are generated by the webcore project, so
everything after Error 2 is likely a result of webcore failing to build. Sounds like
you may still be having checkout problems...

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 11. originally posted by leahayes on 2009-06-03T23:55:41.000Z:

Here is some of the compilation log view, perhaps this may shed some light?

1>------ Build started: Project: webcore, Configuration: Debug Win32 ------
1>Running d:\chromiumtrunk\src\webkit\..\third_party\cygwin\setup_env.bat && set CYGWIN=nontsec&& set /a
NUMBER_OF_PROCESSORS_PLUS_1=%NUMBER_OF_PROCESSORS%+1&& set INTDIR=D:\chromiumtrunk\src\cef\Debug\obj\webcore&& set
OUTDIR=D:\chromiumtrunk\src\cef\Debug&& bash -c "\"make\" \"OutDir=`cygpath -m \"${OUTDIR}\"`\" \"IntDir=`cygpath -m \"${INTDIR}\"`\" \"-
j\" \"${NUMBER_OF_PROCESSORS_PLUS_1}\" \"-f\" \"webcore_Debug_rules.mk\""
2>------ Build started: Project: pcre, Configuration: Debug Win32 ------
2>dftables
1>3make: /bin/sh: Command not found
1>make: /bin/sh: Command not found
2>Can't locate strict.pm in @ INC (@ INC contains: /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-
cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/perl5/vendor_perl/5.10
/usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at
../third_party/WebKit/JavaScriptCore/pcre/dftables line 45.
2>BEGIN failed--compilation aborted at ../third_party/WebKit/JavaScriptCore/pcre/dftables line 45.
2>Project : error PRJ0002 : Error result 2 returned from 'C:\WINDOWS\system32\cmd.exe'.
2>Build log was saved at "file://D:\chromiumtrunk\src\cef\Debug\obj\pcre\BuildLog.htm"
2>pcre - 1 error(s), 0 warning(s)

@magreenblatt
Copy link
Collaborator Author

Comment 12. originally posted by magreenblatt on 2009-06-04T00:04:30.000Z:

Looks like you're experiencing the same problem as this person:

http://groups.google.com/group/chromium-dev/browse\_thread/thread/f77184379418e6f0

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 13. originally posted by leahayes on 2009-06-04T00:10:59.000Z:

How do I do the following for revision 17397 of Chromium?

Re-checkout (not gclient sync )

@magreenblatt
Copy link
Collaborator Author

Comment 14. originally posted by magreenblatt on 2009-06-04T00:57:40.000Z:

I'm not exactly sure what that means, since the only way I'm aware of to synchronize
chromium and all of its dependencies is via gclient sync. However, I do have a
suggestion. Given the number of problems that you're experiencing you may be best
served by downloading, synchronizing and building chrome.sln exactly as specified in
the chromium build instructions (not targeting a specific revision). Once you know
that everything builds for chrome.sln you'll be in a better position to diagnose
problems when building CEF. Chromium revision 17397 was only yesterday (Tuesday) so
there's a decent chance that CEF will build with the current chromium trunk revision.

If you have problems building chrome.sln as specified in the build instructions then
you should contact the chromium team for assistance via either the chromium-dev
mailing list or the #chromium IRC channel.

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 15. originally posted by tux316 on 2009-06-04T04:20:03.000Z:

We on our side had this issue as well. From my understanding this basically means
that Cygwin is not mounting properly. I resolved this issue by implementing a
pre-build event.

In Solution Explorer go to the properties of the project called pcre, it should be
the very last one in the WebKit folder.

Go to Properties -> Build Events -> Pre-Build Event

On Command Line put:
$(SolutionDir)..\third_party\cygwin\setup_mount.bat

This will execute "YourPath:\chromiumtrunk\src\third_party\cygwin\setup_mount.bat"

Note that this is must be done from the Cef.sln solution, not the Chromium one.
Although this might have worked for me and my colleagues, it does not guarantee that
it will work for you.

If it worked successfully you should see something like:

1>------ Build started: Project: pcre, Configuration: Debug Win32 ------
1>Performing Pre-Build Event...
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>The operation completed successfully.
1>dftables
1>Compiling...

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 16. originally posted by leahayes on 2009-06-04T17:34:29.000Z:

Thanks again for your help, it is very much appreciated.

That has certainly improved things, I am now getting that output for "pcre". I am
still getting a couple of errors, however. A missing header file followed by a lot of
program database related errors:

1>------ Build started: Project: webcore, Configuration: Release Win32 ------
1>Compiling...
1>FontCustomPlatformData.cpp
1>..\third_party\WebKit\WebCore\platform\graphics\chromium\FontCustomPlatformData.cpp
(47) : fatal error C1083: Cannot open include file: 't2embapi.h': No such file or
directory
1>Build log was saved at
"file://D:\chromiumtrunk\src\cef\Release\obj\webcore\BuildLog.htm"
1>webcore - 1 error(s), 0 warning(s)
2>------ Build started: Project: glue, Configuration: Release Win32 ------
2>Compiling...
2>alt_404_page_resource_fetcher.cc
2>.\glue\alt_404_page_resource_fetcher.cc : error C2471: cannot update program
database 'd:\chromiumtrunk\src\cef\release\obj\glue\glue\vc80.pdb'
2>.\glue\alt_404_page_resource_fetcher.cc(48) : fatal error C1903: unable to recover
from previous error(s); stopping compilation
2>debugger_agent_manager.cc
2>.\glue\devtools\debugger_agent_manager.cc : error C2471: cannot update program
database 'd:\chromiumtrunk\src\cef\release\obj\glue\glue\vc80.pdb'
2>.\glue\devtools\debugger_agent_manager.cc(278) : fatal error C1903: unable to
recover from previous error(s); stopping compilation

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 17. originally posted by leahayes on 2009-06-04T22:57:58.000Z:

I have finally got it to work!!

It was a mixture of needing to add the pre-build event, and I needed to install the
Microsoft Windows SDK (Version 6.1). There are several files that are missing from
older versions of the SDK.

Thanks for all of the help!

Lea Hayes

@magreenblatt
Copy link
Collaborator Author

Comment 18. originally posted by magreenblatt on 2009-10-02T18:28:14.000Z:

Revision 50 adds GYP support making it easy to build CEF with both VS2005 and VS2008.
Run the cef_create_projects.bat script in the CEF root directory to generate Visual
Studio project files from the GYP configuration. If both VS2005 and VS2008 are
installed on your system you can set the GYP_MSVS_VERSION environment variable to
"2005" or "2008" before running cef_create_projects.bat to create project files for
that version.

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 19. originally posted by dmitry.sychov on 2010-02-08T03:33:23.000Z:

Run the cef_create_projects.bat script in the CEF root directory

i see no such file in last rev (r66)

@magreenblatt
Copy link
Collaborator Author

Comment 20. originally posted by magreenblatt on 2010-02-08T14:19:03.000Z:

You need to download and build from source. Follow the instructions on the project
home page.

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 21. originally posted by Sehraya.Sonika on 2010-02-26T09:37:08.000Z:

hi,

I am trying to build chrome latest browser code on windows (VS2008)

I am getting many errors like:
Error 2 Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'.
Project webcore_bindings_sources
Error 3 fatal error C1083: Cannot open include file: 'bindings/V8Attr.cpp':
No such file or directory e:\Chrome\chromium.r37686\chromium.r37686
\home\chrome-svn\tarball\chromium\src\third_party\WebKit\WebCore\bindings\v8
\DerivedSourcesAllInOne.cpp 38 webcore_bindings
Error 4 fatal error C1083: Cannot open include
file: 'V8HTMLAnchorElement.h': No such file or directory
e:\Chrome\chromium.r37686\chromium.r37686\home\chrome-
svn\tarball\chromium\src\chrome\Debug\obj\global_intermediate\webkit\V8HTMLElementWra
pperFactory.cpp 33 webcore_bindings
Error 5 fatal error C1083: Cannot open include file: 'V8SVGAElement.h': No
such file or directory e:\Chrome\chromium.r37686\chromium.r37686\home\chrome-
svn\tarball\chromium\src\chrome\Debug\obj\global_intermediate\webkit\V8SVGElementWrap
perFactory.cpp 35 webcore_bindings
Error 7 fatal error C1083: Cannot open include file: 'XLinkNames.h': No such
file or directory e:\chrome\chromium.r37686\chromium.r37686\home\chrome-
svn\tarball\chromium\src\third_party\webkit\webcore\svg\SVGURIReference.h 26
webcore_bindings
Error 9 fatal error C1083: Cannot open include file: 'V8Event.h': No such
file or directory e:\chrome\chromium.r37686\chromium.r37686\home\chrome-
svn\tarball\chromium\src\third_party\webkit\webcore\bindings\v8\V8DOMWrapper.h 42
webcore
Error 10 fatal error C1083: Cannot open include file: 'V8Event.h': No such
file or directory e:\chrome\chromium.r37686\chromium.r37686\home\chrome-
svn\tarball\chromium\src\third_party\webkit\webcore\bindings\v8\V8DOMWrapper.h 42
webcore

and many more like these.

Any idea why these errrors are coming and how to fix them.

Any help will be highly appreciated.

Regards
Sonika Dave

@magreenblatt
Copy link
Collaborator Author

Comment 22. originally posted by magreenblatt on 2010-02-26T15:20:51.000Z:

First, you should be using the chromium revision specified in
CHROMIUM_BUILD_COMPATIBILITY.txt. If you're already using the correct Chromium
revision then try a clean build.

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 23. originally posted by Sehraya.Sonika on 2010-03-01T07:55:26.000Z:

I want latest code so i found 4.0.249.89(38071) this is latest stable build on
windows.

So i synced 38071 using this command :

gclient sync --revision src@ 38071

and i removed Debug folder before building and give rebuild.

Still same errors are coming. 7 builds are failing .

any idea why v8*.h errors are coming?

Please help...

Thanks and Regards
Sonika

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 24. originally posted by Sehraya.Sonika on 2010-03-02T09:48:06.000Z:

I am succesfully able to build the code.

Now the issue is while running chrome browser , weblink is not opening.
Ex: as i am typing : http://www.google.com/

I am getting this message" The following page have become unresponsive.You can wait
for them to become responsive or kill them"

Did anyone face this issue?
Please let me know if someone know how to resolve it ?

Sonika

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 25. originally posted by sujiewen on 2010-03-27T13:09:31.000Z:

9>AssertionError
9>make: ***
[/cygdrive/i/chromium/src/chrome/Debug/obj/global_intermediate/webcore/bindings/V8Clien
tRectList.cpp] Error 1
9>make: *** Waiting for unfinished jobs....
9>Project : error PRJ0002 : Error result 2 returned from 'C:\WINDOWS\system32\cmd.exe'.

@magreenblatt
Copy link
Collaborator Author

Comment 26. originally posted by magreenblatt on 2011-04-18T14:42:26.000Z:

VS2008 is the currently the main development platform for Chromium and CEF and is known to build successfully. Please use the CEF Forum for help with any future build problems.

@magreenblatt
Copy link
Collaborator Author

  • set state to "resolved"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant