General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Why don't kmeleon sources build?
Posted by: Wayne
Date: September 21, 2006 04:26AM

Why don't the sources build correctly when I click on "Build Solution" using Microsoft Visual Studio.NET 2003? Why are there so many unsatisfied externals? Is there a list of the things I must do in sequence to get it to build a correct executable? Is it possible or better to use other software to compile and build the sources? Thanks for your help?

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 21, 2006 09:15AM

If with "externals" you mean C++ header files (.h), you have to go to your project settings, and find the section for C++ preprocessor (in VC6, that's on the C/C++ tab, then select Preprocessor in the combobox). You have to give it the directories of the header files.

The directories are in MOZ_OBJDIR/dist/include. For example, for me it's d:\dev\mozilla\kbuild\dist\include\

Make references to the following subdirectories:
docshell
xpcom
nspr
dom
embed_base
exthandler
necko
find
nkcache
pref
profile
shistory
string
uriloader
wallet
webbrwsr
widget
webbrowserpersist
webshell
gfx
imglib2
pipnss
appcomps
history
typeaheadfind
commandhandler
content
chardet
windowwatcher
cookie
locale
xpcom_obsolete
mimetype
js
layout
pipboot
plugin
xpconnect
chrome
caps

There may be more, but that's how far I got before I got actual compilation errors.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Dorian
Date: September 21, 2006 11:32AM

The simple way is to keep the same directory structure than me.
For exemple if you have kmeleon source in
/projects/k-meleon/

The mozilla SDK must be in:
/projects/mozilla/mozilla/dist

Compilation errors in VC6:
My bad. I've put the wrong dsp file in the package, download 1.02 source again.

D:\dev\kmeleon\NSSDialogs.cpp(355) : error C2065: '__time64_t' : undeclared identifier
D:\dev\kmeleon\PreferencesDlg.cpp(521) : error C2065: 'DWORD_PTR' : undeclared identifier


VC6 is bundled with an old SDK, and those are not declared. For now you can replace DWORD_PTR by DWORD, and __time64_t by time_t

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 21, 2006 06:58PM

Downloaded the source again. Doesn't look like modifying the identifiers is going to help...

Deleting intermediate files and output files for project 'kmeleon - Win32 Debug'.
--------------------Configuration: kmeleon - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
AccelParser.cpp
BrowserFrameGlue.cpp
BrowserFrm.cpp
BrowserImpl.cpp
BrowserImplCtxMenuLstnr.cpp
BrowserImplWebPrgrsLstnr.cpp
BrowserView.cpp
D:\dev\kmeleon\BrowserView.cpp(878) : warning C4003: not enough actual parameters for macro 'NS_ENSURE_SUCCESS'
D:\dev\kmeleon\BrowserView.cpp(878) : warning C4003: not enough actual parameters for macro 'NS_ENSURE_TRUE'
D:\dev\kmeleon\BrowserView.cpp(883) : warning C4003: not enough actual parameters for macro 'NS_ENSURE_TRUE'
BrowserViewFind.cpp
BrowserViewPanning.cpp
BrowserViewUtils.cpp
D:\dev\kmeleon\BrowserViewUtils.cpp(1326) : warning C4018: '>' : signed/unsigned mismatch
D:\dev\kmeleon\BrowserViewUtils.cpp(1349) : warning C4018: '>' : signed/unsigned mismatch
CmdLine.cpp
Components.cpp
CookiePromptService.cpp
CookiesViewerDlg.cpp
Dialogs.cpp
FavIconList.cpp
D:\dev\kmeleon\FavIconList.cpp(49) : fatal error C1083: Cannot open include file: '../pngdib-3.0.1/pngdib.h': No such file or directory
FontPackageHandler.cpp
GenKeyPairDialogs.cpp
HiddenWnd.cpp
LangParser.cpp
Generating Code...
Compiling...
MenuParser.cpp
MfcEmbed.cpp
D:\dev\kmeleon\MfcEmbed.cpp(267) : error C2660: 'LoadStringA' : function does not take 2 parameters
D:\dev\kmeleon\MfcEmbed.cpp(299) : error C2065: '_AtlBaseModule' : undeclared identifier
D:\dev\kmeleon\MfcEmbed.cpp(299) : error C2228: left of '.SetResourceInstance' must have class/struct/union type
MostRecentUrls.cpp
MozUtils.cpp
nsGenericFactory.cpp
NSSDialogs.cpp
D:\dev\kmeleon\NSSDialogs.cpp(355) : error C2065: '__time64_t' : undeclared identifier
D:\dev\kmeleon\NSSDialogs.cpp(355) : error C2146: syntax error : missing ';' before identifier 't'
D:\dev\kmeleon\NSSDialogs.cpp(355) : error C2065: 't' : undeclared identifier
D:\dev\kmeleon\NSSDialogs.cpp(379) : warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data
D:\dev\kmeleon\NSSDialogs.cpp(380) : error C2065: '_localtime64' : undeclared identifier
D:\dev\kmeleon\NSSDialogs.cpp(384) : warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data
D:\dev\kmeleon\NSSDialogs.cpp(389) : error C2065: '_time64' : undeclared identifier
Parser.cpp
PasswordViewerDlg.cpp
Permissions.cpp
Plugins.cpp
Preferences.cpp
PreferencesDlg.cpp
D:\dev\kmeleon\PreferencesDlg.cpp(521) : error C2065: 'DWORD_PTR' : undeclared identifier
D:\dev\kmeleon\PreferencesDlg.cpp(521) : error C2146: syntax error : missing ')' before identifier 'kPlugin'
D:\dev\kmeleon\PreferencesDlg.cpp(521) : error C2059: syntax error : ')'
PrintProgressDialog.cpp
PrintSetupDialog.cpp
ProfileMgr.cpp
ProfilesDlg.cpp
PromptService.cpp
ReBarEx.cpp
SideBar.cpp
ToolBarEx.cpp
Generating Code...
Compiling...
Tooltips.cpp
TooltipsProvider.cpp
UnknownContentTypeHandler.cpp
urlbar.cpp
Generating Code...
Error executing cl.exe.

k-meleon.exe - 12 error(s), 7 warning(s)

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Wayne
Date: September 21, 2006 07:34PM

Well, I'm glad to see it is not just me. How should I precede? Also Microsoft Visual C++ 6.0 with service pack 5 is specified as being necessary for the build, but Visual C++ 6.0 has been discontinued. It can no longer be purchased. It happens that I have Micosoft Visual Studio.Net 2003 which I believe is a newer superset of Visual C++ 6.0, but I also see that Microsoft now offers Free Visual C++ 2005 Express Edition. I like the prospect of being able to use it since it is free. Let me know if it will work. As it is I see so many errors and warnings I do not know what is expected behavior. Please let me know.. I dearly want to develop my own k-meleon. Is there a quick way to get started until these issues or problems with the source are resolved? Would someone consider zipping up their development directory and sending it to me so I can get started? Thanks.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Dorian
Date: September 21, 2006 07:36PM

D:\dev\kmeleon\MfcEmbed.cpp(267) : error C2660: 'LoadStringA' : function does not take 2 parameters
D:\dev\kmeleon\MfcEmbed.cpp(299) : error C2065: '_AtlBaseModule' : undeclared identifier


Seems like I'll have to make an alternative for VC6. You can comment out those lines for now. Nothing vital.

D:\dev\kmeleon\FavIconList.cpp(49) : fatal error C1083: Cannot open include file: '../pngdib-3.0.1/pngdib.h': No such file or directory

Oh right, you need the pngdib lib to build it or else, remove #define PNG_SUPPORT in faviconlist.cpp (but you're going to use beta code).

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: rmn
Date: September 22, 2006 07:58AM

Hi Wayne,

> Also Microsoft Visual C++ 6.0 with service pack 5
> is specified as being necessary for the build, but Visual C++
> 6.0 has been discontinued.

I believe VC6 is just the minimum requirement.

> Microsoft now offers Free Visual C++ 2005 Express
> Edition.

You can try it, but I don't know if they still provide the platform SDK for free.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Dorian
Date: September 22, 2006 09:10AM

K-Meleon need MFC, and MFC is not free. You can only build the plugins with the free version.

Wayne, with all the information in this thread you should be able to build it, just unpack the mozilla sdk at the correct place.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 22, 2006 09:43AM

@Wayne

Dorian released the source package in the K-Meleon 1.02RC thread.
http://kmeleon.sourceforge.net/files/K-Meleon1.02src.zip


@Dorian

We're getting there...

Deleting intermediate files and output files for project 'kmeleon - Win32 Debug'.
--------------------Configuration: kmeleon - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
AccelParser.cpp
BrowserFrameGlue.cpp
BrowserFrm.cpp
BrowserImpl.cpp
BrowserImplCtxMenuLstnr.cpp
BrowserImplWebPrgrsLstnr.cpp
BrowserView.cpp
D:\dev\kmeleon\BrowserView.cpp(878) : warning C4003: not enough actual parameters for macro 'NS_ENSURE_SUCCESS'
D:\dev\kmeleon\BrowserView.cpp(878) : warning C4003: not enough actual parameters for macro 'NS_ENSURE_TRUE'
D:\dev\kmeleon\BrowserView.cpp(883) : warning C4003: not enough actual parameters for macro 'NS_ENSURE_TRUE'
BrowserViewFind.cpp
BrowserViewPanning.cpp
BrowserViewUtils.cpp
D:\dev\kmeleon\BrowserViewUtils.cpp(1326) : warning C4018: '>' : signed/unsigned mismatch
D:\dev\kmeleon\BrowserViewUtils.cpp(1349) : warning C4018: '>' : signed/unsigned mismatch
CmdLine.cpp
Components.cpp
CookiePromptService.cpp
CookiesViewerDlg.cpp
Dialogs.cpp
FavIconList.cpp
FontPackageHandler.cpp
GenKeyPairDialogs.cpp
HiddenWnd.cpp
LangParser.cpp
Generating Code...
Compiling...
MenuParser.cpp
MfcEmbed.cpp
MostRecentUrls.cpp
MozUtils.cpp
nsGenericFactory.cpp
NSSDialogs.cpp
D:\dev\kmeleon\NSSDialogs.cpp(379) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data
D:\dev\kmeleon\NSSDialogs.cpp(380) : error C2065: '_localtime64' : undeclared identifier
D:\dev\kmeleon\NSSDialogs.cpp(384) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data
D:\dev\kmeleon\NSSDialogs.cpp(389) : error C2065: '_time64' : undeclared identifier
Parser.cpp
PasswordViewerDlg.cpp
Permissions.cpp
Plugins.cpp
Preferences.cpp
PreferencesDlg.cpp
PrintProgressDialog.cpp
PrintSetupDialog.cpp
ProfileMgr.cpp
ProfilesDlg.cpp
PromptService.cpp
ReBarEx.cpp
SideBar.cpp
ToolBarEx.cpp
Generating Code...
Compiling...
Tooltips.cpp
TooltipsProvider.cpp
UnknownContentTypeHandler.cpp
urlbar.cpp
Generating Code...
Error executing cl.exe.

k-meleon.exe - 2 error(s), 7 warning(s)

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Dorian
Date: September 22, 2006 09:51AM

like for the other one:
_time64 -> time
_localtime64 -> localtime

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 22, 2006 01:31PM

For linking, it needed xpcomglue.lib
I added the directory, which is MOZ_OBJDIR/dist/, to Project > Settings > Link > Input > Additional library path

Now I get this:

Linking...
LINK : warning LNK4049: locally defined symbol "_NS_InitXPCOM3" imported
LINK : warning LNK4049: locally defined symbol "_NS_ShutdownXPCOM" imported
MfcEmbed.obj : error LNK2001: unresolved external symbol __imp__PathFindExtensionA@4
..\mozilla\mozilla\dist\WIN32_o.OBJ\Embed\k-meleon.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

k-meleon.exe - 2 error(s), 9 warning(s)

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Dorian
Date: September 22, 2006 01:47PM

shlwapi.lib is needed too.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 22, 2006 08:23PM

That library is already present in VC6's own lib directory, but I made a reference to it in the Link settings anyway. Still got the same errors...

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Wayne
Date: September 22, 2006 11:00PM

I have to admit it. I am a newbie fresh off the farm. Isn't there are GREAT, BIG, KIND, CONSIDERATE, WELL-EXPERIENCED, CONGENIAL, EXPERT that would consider win-zipping up his k-meleon pieces and emailing them to JimInECriCut@Yahoo.Com once you get it to work without errors. The friend you save may be your own!!! smiling smiley

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: rmn
Date: September 23, 2006 06:22AM

Hi Wayne,

That's the point of the build documentation: if you can't compile after reading it, there's probably a bug in the doc. Which step did you get to? Do you have the Mozilla header files?

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Wayne
Date: September 23, 2006 07:54AM

I think that the documentattion stinks. Some of it is outdated, other of it is omplex, and what does exist generates errors -- if you are lucky enough to own a copy of VC6 which is required, but whch no one can acquire legally. I have atttempted to simplify the instructiions. I made a getMeleon.bat file to be executed from c:\ The following is lt:

1. Put cvs.exe into c:\

2. Put the following lines in getmeleon.bat. Put getmeleon.bat in c:\ .

3. Then Execute getmeleon to put the sources in c:\

set CVSROOT=c:\src\master
cvs init
cvs -d:pserver:anonymous@kmeleon.cvs.sourceforge.net:/cvsroot/kmeleon login
cvs -z3 -d:pserver:anonymous@kmeleon.cvs.sourceforge.net:/cvsroot/kmeleon co -P k-meleon
cvs checkout -d s:\src

I don't know or understand the rest. Why cannot it be simple bat files like I show here??? Or why can't they be complex bat files???? At least the process would greatly stream line for rthe rest uf us.. We might now know what the batch file or make file does, but we can rest assured that it does it right. The build should be nothing more or less that batch or make files execiting and a few questions being askie along the way.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: rmn
Date: September 23, 2006 11:54AM

If you actually look at the BuildKMeleon page, the process *is* simple. You just need K-Meleon's source code, Mozilla's header files (there's a link there), and Visual Studio 2003. Then you just have to open the project/solution file, set the correct directories, and build.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: rmn
Date: September 23, 2006 12:05PM

A little correction: it won't build because it also requires pngdib (yes, the documentation is outdated there), but you can remove that dependency temporarily by following Dorian's earlier instruction.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: Dorian
Date: September 23, 2006 06:24PM

@BenoitRen
Weird. For now, I can only suggest you to completely comment out the content of LoadLanguage().

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 25, 2006 02:03PM

Where is this LoadLanguage() method?

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 28, 2006 05:11PM

Bumpity bump.

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: ra
Date: September 28, 2006 06:59PM

MfcEmbed.cpp

Options: ReplyQuote
Re: Why don't kmeleon sources build?
Posted by: BenoitRen
Date: September 28, 2006 09:49PM

Thanks, I was able to compile K-Meleon after that last tweak! grinning smiley

Options: ReplyQuote


K-Meleon forum is powered by Phorum.