Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 14, 2006 09:22PM

I'm trying to build K-Meleon with VC6 as compiler. I have the environment to build SeaMonkey to start from. I figured that since I had already compiled SeaMonkey, that I could start from there and compile K-Meleon.

I've followed the build documentation, but it looks like they're not kidding when they say it's outdated. During compilation, it wouldn't find certain include files, because it uses older include directory paths. I changed and added paths until it didn't complain about missing files anymore, but then I got real compile errors. Here's the log:

Deleting intermediate files and output files for project 'kmeleon - Win32 Debug'.
--------------------Configuration: kmeleon - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
About.cpp
d:\dev\kmeleon\langparser.h(37) : error C2039: 'CPair' : is not a member of 'CMap<class CString,char const *,class CString,char const *>'
d:\dev\kmeleon\langparser.h(37) : error C2065: 'CPair' : undeclared identifier
d:\dev\kmeleon\langparser.h(37) : error C2065: 'p' : undeclared identifier
d:\dev\kmeleon\langparser.h(37) : error C2039: 'PLookup' : is not a member of 'CMap<class CString,char const *,class CString,char const *>'
d:\dev\kmeleon\langparser.h(38) : error C2227: left of '->value' must point to class/struct/union
d:\dev\kmeleon\langparser.h(38) : error C2228: left of '.GetBuffer' must have class/struct/union type
d:\dev\kmeleon\faviconlist.h(28) : error C2065: 'CStringA' : undeclared identifier
d:\dev\kmeleon\faviconlist.h(28) : error C2955: 'CMap' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1175) : see declaration of 'CMap'
d:\dev\kmeleon\faviconlist.h(28) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Utils.cpp
winEmbedFileLocProvider.cpp
d:\dev\kmeleon\langparser.h(37) : error C2039: 'CPair' : is not a member of 'CMap<class CString,char const *,class CString,char const *>'
d:\dev\kmeleon\langparser.h(37) : error C2065: 'CPair' : undeclared identifier
d:\dev\kmeleon\langparser.h(37) : error C2065: 'p' : undeclared identifier
d:\dev\kmeleon\langparser.h(37) : error C2039: 'PLookup' : is not a member of 'CMap<class CString,char const *,class CString,char const *>'
d:\dev\kmeleon\langparser.h(38) : error C2227: left of '->value' must point to class/struct/union
d:\dev\kmeleon\langparser.h(38) : error C2228: left of '.GetBuffer' must have class/struct/union type
d:\dev\kmeleon\faviconlist.h(28) : error C2065: 'CStringA' : undeclared identifier
d:\dev\kmeleon\faviconlist.h(28) : error C2955: 'CMap' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1175) : see declaration of 'CMap'
d:\dev\kmeleon\faviconlist.h(28) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Error executing cl.exe.
k-meleon.exe - 18 error(s), 0 warning(s)

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: rmn
Date: August 15, 2006 05:54AM

Looks like the compiler doesn't believe that CMap::CPair, CMap:tongue sticking out smileyLookup, and CStringA exist.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 15, 2006 08:00PM

I compiled the Mozilla source code (SeaMonkey 1.0.4 flavor) with the following .mozconfig:
http://boisso.free.fr/kmeleon/mozconfig

I still get the same errors as pasted above. Can someone help me out, please?

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: ra
Date: August 15, 2006 08:57PM

Don't know about the errors, but have you already merged the *.rc files and the resource.h files?

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 15, 2006 09:25PM

Huh? No, I haven't. The build page doesn't mention anything about that.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: ra
Date: August 15, 2006 09:55PM

It looks like VC6 (and CodeBlocks with the free VC7 toolkit) cannot handle more than one *.rc (=> MfcEmbed.rc) and one resource.h file. The *way outdated* build page probably doesn't mention this because the files weren't split back then. <eg> Uniting the files (manually of course...) helped me a lot and I was finally able to compile K-M again.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 15, 2006 11:44PM

Can you please explain in more detail how I should go about this?

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: Dorian
Date: August 16, 2006 10:10AM

The resource files are not the only problem anymore. Some part of the code can't be build with VC6. I have an incomplete patch for it (it currently removes site icons support) but for some reasons I can't currently run the virtual machine where the patched source is.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 17, 2006 08:09PM

In the meantime, I have updated the build page with what I could get to work, which is building the Mozilla source code. What's missing at the moment is extra instructions for more recent Visual C++ compilers (I can add them later), and instructions for compiling it with SVG (I don't build mine with it at the moment).

Work in progress, for sure. smiling smiley

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: ra
Date: August 17, 2006 08:32PM

FYI: Dorian checked s.th. in 24 hours ago, have a look at the CVS (but I have no idea if it works or if the checkin is complete).

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: rmn
Date: August 18, 2006 05:37AM

> In the meantime, I have updated the build page with what I
> could get to work, which is building the Mozilla source code.
> What's missing at the moment is extra instructions for more
> recent Visual C++ compilers (I can add them later), and
> instructions for compiling it with SVG (I don't build mine
> with it at the moment).

WAIT! I've also just done that, but using a different page--[wiki]BuildKMeleon[/wiki]--because I wanted to ask for comments first (and because the page name seems more suitable). Could you look at that first? I suggest we use the BuildKMeleon page because of the name (and then delete [wiki]CompileKMeleon[/wiki] and [wiki]BuildTools[/wiki]).

I've basically blasted everything related to building mozilla and replace it with "RTFM", but your new instructions seem good enough (the old one was way too long).

Oh, by the way, I've only used VS 2003 (VC7.1), so--combined with yours--it should be quite complete. :-)

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 18, 2006 10:18AM

Yeah, your page looks good. So... How are we going to merge them?

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: Dorian
Date: August 18, 2006 01:00PM

The stuffs about the dll and chrome is completely outdated. We should ask guenter to make a guide on how to make a chrome for kmeleon.

Btw, you can build kmeleon without mozilla with the necessaries libs and includes

As for the last check-in, it's still incomplete.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: rmn
Date: August 19, 2006 08:26AM

BenoitRen wrote:
>
> Yeah, your page looks good. So... How are we going to merge
> them?

Done! :-)

Because Dorian is right that we can use just the header+lib files to build K-Meleon (why didn't I think of that?), I've split the documentation in two.

[wiki]BuildKMeleon[/wiki] explains the process of building k-meleon.exe and the plugins. It provides a link to the Moz SDK Dorian made (thanks, Dorian!).

[wiki]BuildKMeleonDistribution[/wiki] explains everything. That is, everything you need to get an installable package. This includes building Gecko, the chrome, and the installer.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: guenter
Date: August 19, 2006 11:51AM

Chrome:
http://kmeleonbrowser.org/forum/read.php?f=1&i=41370&t=41370
near bottom. The "guide" is one of the the reasons why I start an update soon.
kko suggested that it should be documented better so that everyone can do it.
Maybe also try to automate.

For Dorians 1.0.x best use Chrome created for it and updated by me lately.

1.0 chrome uses files that are in the embed.jar of the old 0.8.x and earlier chromes. They were similar to the ones at:

http://www.iol.ie/~locka/mozilla/control.htm

But our new chrome leaves the files in their original jars - this gave more control, made changes and maintenance easier.

The number of files has been greatly reduced by Dorian´s programming efforts. That is IMHO the biggest difference to
old embed.jar from build description.


Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 19, 2006 12:50PM

Excellent, rmn! smiling smiley
I see you also improved it by turning text into links. I didn't know how to do that.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: Dorian
Date: August 21, 2006 09:54AM

It should be possible to build the cvs version with VC6 now.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: George
Date: August 23, 2006 02:21PM

Since Seamonkey is not built on VC6 or VC7 making K-meleon on those languages does not a hell of lot of sense. The Developers change seamonkey DLLs to VC7 which should nor be done becuase those DLLs were not made using those VC6 or VC7 in mozilla and seamonkey.

The developers make k-meleon.exe using VC7. I believe that should be done because if they did not they could make k-meleon.exe work with K-meleon 0.9, 1.0, and 1.01.

If k-melon.exe could be made to work out imports and exports to xpcom.dll and xpcom_core.dll the file would work with 0.9, 1.0, and 1.01. Also mozilla.exe amd seamonkey.exe do not use xpcom.dll and xpcom_core.dll and they work perfectly fine.

And the mozilla.exe and seamonkey.exe were created using VC6 or VC7. They work perfectly fine without using VC6 or VC7. Before compiling K-meleon with VC6 developers should check what version Gecko GRE Engine the core of seamonkey or
mozilla is based on. So it makes more sense not to build k-meleon on VC6 because the core of those browser is not based on VC6. Some people think basing K-meleon on VC6 or VC7 would improve the browser. I do not agree with that becuase it could cause some imcompatibilities with certain parts of the browser core. Because the browser core is not based on VC6 or VC7 in mozilla and seamonkey.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: BenoitRen
Date: August 24, 2006 07:44PM

I don't understand what you're getting at, partly because your sentences aren't well constructed (no offense). Gecko builds just fine on VC6, and is still being built using it.

Options: ReplyQuote
Re: Building K-Meleon on VC6
Posted by: guenter
Date: August 25, 2006 05:47PM

I assume George got exited & then mixed up VC versions. Happens to me also.

AFAIK Mozilla: now = VC6, ( VC7 & VC7.1 was never official ) and next will be VC8?
Correct me if i am wrong.

Some old time users seem to have a problem with the fact that Dorian has and wants to use VC 7 to create all features that he wants to include in the k-m (e. g. favicon).
I assume that they will like Your VC6 build k-m better than the official ;-)

Options: ReplyQuote


K-Meleon forum is powered by Phorum.