xxfxxf / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 0 forks source link

How to build with Visual Studio 2008? #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by leaha...@gmail.com on 2 Jun 2009 at 1:53

GoogleCodeExporter commented 9 years ago
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.

Original comment by magreenb...@gmail.com on 2 Jun 2009 at 2:10

GoogleCodeExporter commented 9 years ago
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 
CefV8Value>,class std::vector<class 
CefRefPtr<class CefV8Value>,class std::allocator<class CefRefPtr<class 
CefV8Value> > > &,class CefRefPtr<class CefV8Value> &,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.

Original comment by leaha...@gmail.com on 2 Jun 2009 at 7:02

GoogleCodeExporter commented 9 years ago
Did you download the revision of the Chromium sources indicated by the
CHROMIUM_BUILD_COMPATIBILITY.txt file?

Original comment by magreenb...@gmail.com on 2 Jun 2009 at 7:15

GoogleCodeExporter commented 9 years ago
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).

Original comment by tux...@gmail.com on 3 Jun 2009 at 1:24

GoogleCodeExporter commented 9 years ago
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.

Original comment by bamaboy1...@gmail.com on 3 Jun 2009 at 1:30

GoogleCodeExporter commented 9 years ago
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!

Original comment by leaha...@gmail.com on 3 Jun 2009 at 4:18

GoogleCodeExporter commented 9 years ago
Did you run: 

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

?

Original comment by tux...@gmail.com on 3 Jun 2009 at 5:15

GoogleCodeExporter commented 9 years ago
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.

Original comment by leaha...@gmail.com on 3 Jun 2009 at 5:47

GoogleCodeExporter commented 9 years ago
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\AnimationControll
er.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\AnimationControll
er.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\AnimationControll
er.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\AnimationControll
er.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

Original comment by leaha...@gmail.com on 3 Jun 2009 at 9:54

GoogleCodeExporter commented 9 years ago
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...

Original comment by magreenb...@gmail.com on 3 Jun 2009 at 11:39

GoogleCodeExporter commented 9 years ago
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)

Original comment by leaha...@gmail.com on 3 Jun 2009 at 11:55

GoogleCodeExporter commented 9 years ago
Looks like you're experiencing the same problem as this person:

http://groups.google.com/group/chromium-dev/browse_thread/thread/f77184379418e6f
0

Original comment by magreenb...@gmail.com on 4 Jun 2009 at 12:04

GoogleCodeExporter commented 9 years ago
How do I do the following for revision 17397 of Chromium?

> Re-checkout (not gclient sync )

Original comment by leaha...@gmail.com on 4 Jun 2009 at 12:10

GoogleCodeExporter commented 9 years ago
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.

Original comment by magreenb...@gmail.com on 4 Jun 2009 at 12:57

GoogleCodeExporter commented 9 years ago
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...

Original comment by tux...@gmail.com on 4 Jun 2009 at 4:20

GoogleCodeExporter commented 9 years ago
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\FontCustomPlatformDat
a.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

Original comment by leaha...@gmail.com on 4 Jun 2009 at 5:34

GoogleCodeExporter commented 9 years ago
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

Original comment by leaha...@gmail.com on 4 Jun 2009 at 10:57

GoogleCodeExporter commented 9 years ago
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.

Original comment by magreenb...@gmail.com on 2 Oct 2009 at 6:28

GoogleCodeExporter commented 9 years ago
> Run the cef_create_projects.bat script in the CEF root directory

i see no such file in last rev (r66)

Original comment by dmitry.s...@gmail.com on 8 Feb 2010 at 3:33

GoogleCodeExporter commented 9 years ago
You need to download and build from source.  Follow the instructions on the 
project
home page.

Original comment by magreenb...@gmail.com on 8 Feb 2010 at 2:19

GoogleCodeExporter commented 9 years ago
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\V8HTMLEleme
ntWra
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\V8SVGElemen
tWrap
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  4
2
    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  4
2
    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

Original comment by Sehraya....@gmail.com on 26 Feb 2010 at 9:37

GoogleCodeExporter commented 9 years ago
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.

Original comment by magreenb...@gmail.com on 26 Feb 2010 at 3:20

GoogleCodeExporter commented 9 years ago
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

Original comment by Sehraya....@gmail.com on 1 Mar 2010 at 7:55

GoogleCodeExporter commented 9 years ago
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

Original comment by Sehraya....@gmail.com on 2 Mar 2010 at 9:48

GoogleCodeExporter commented 9 years ago
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'.

Original comment by sujie...@gmail.com on 27 Mar 2010 at 1:09

GoogleCodeExporter commented 9 years ago
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.

Original comment by magreenb...@gmail.com on 18 Apr 2011 at 2:42