Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
error while building history
Posted by: ra
Date: January 04, 2005 11:43AM

Hi!

I'm currently building the latest 0.9 code from CVS and most things work fine (after a bit of tweaking <g>), but I ran into a problem while building the history plugin:

history.obj : error LNK2001: unresolved external symbol "int __stdcall ViewProc(struct HWND__ *,unsigned int,unsigned int,long)" (?ViewProc@@YGHPAUHWND__@@IIJ@Z)

I think I solved that one before (or a similar one in hotlist), but sadly I don't recall how right now... ;-(

Any hints or things I could try? Thanks in advance!

Options: ReplyQuote
Re: error while building history
Posted by: Andrew
Date: January 06, 2005 03:10AM

Ra,

I've posted your question to the dev list and to Ulf. Hopefully, someone will be able to point you in the right direction.

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 12, 2005 01:27PM

Thank you, Andrew. I can't seem find any reply in the dev list archive? Have I missed s.th. or did no one care to answer? ;-(

I'm pretty sure that VC++6 is missing some *.lib file in the linker tab, but I don't know which one. Currently I have user32.lib, comctl32.lib and gdi32.lib which brought me down from 30 errors to this remaining one...

Options: ReplyQuote
Re: error while building history
Posted by: Andrew
Date: January 12, 2005 03:18PM

Ra,

I'll check with Ulf again.

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 12, 2005 08:11PM

Great, thanks!!

Options: ReplyQuote
Re: error while building history
Posted by: Andrew
Date: January 12, 2005 09:28PM

Ra,

Ulf passed this along in response to another question - does any of this help?

Okay. These are the libraries Dependency Walker report for me:
advapi32, comctl32, comdlg32, gdi32, kernel32, mfc42, msvcp60,
msvcrt, shell32, user32

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 13, 2005 05:34PM

Andrew,

thanks for your reply.

But after adding the corresponding .lib-files (well, except msvcp60) I'm still getting the exact same error message. :-(

Also, default libraries are not ignored, so most of them were already in.

You haven't got a history.dsp-file floating around that was actually used for building the history plugin with VC++6 in let's say, the last two or three years, have you? :-)

BTW: Which compiler and -version does Ulf use nowadays? He said he stopped using Mingw/gcc way over year ago, but I think he's still using makefiles isn't he? So I could use whatever he does if the mess in the history plugin doesn't resolve... Well, if I knew how he builds K-M and the plugins.

Options: ReplyQuote
Re: error while building history
Posted by: MetaTroN
Date: January 14, 2005 11:56AM

yo ra smiling smiley

that ViewProc function seems to have got no code going with the prototype.
I don't believe the problem is caused by a missing .lib file; I checked the code and
found this:

line 464, history.cpp:
ghWndView = CreateDialogParam(kPlugin.hDllInstance, MAKEINTRESOURCE(IDD_VIEW_HISTORY), NULL, ViewProc, 0);
- reference to ViewProc

line 739, hist_view.cpp:
int CALLBACK ViewProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
- code

line 52, history.h:
int CALLBACK ViewProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
- prototype; this file is included by history.cpp

Makes the whining of the linker just that much stranger.
Had a quick look into the project and found: hist_view.cpp isn't in the file list! (wtf?)
Added the file, and next I got were errors related to the not allowed default arguments for NavigateTo and SetPreference.
Fixed those and next I got is:
Unresolved external symbols stristr, quicksort.
Fxxk this :/

Now I'd love very much to see this problem solved, because a few other plugins
got just about the same problem. I read about a quicksort.c and stristr.c somewhere; where do i get them? Why aren't they included if they're necessary?
What does 42 mean? When will I finally stop asking questions here?

anyway, gl hf smiling smiley

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 15, 2005 01:40PM

Had a quick look into the project and found: hist_view.cpp isn't in the file list! (wtf?)

You're right, oops!

Added the file, and next I got were errors related to the not allowed default arguments for NavigateTo and SetPreference.

Mmh, I got the famous "hist_view.cpp(1277) : fatal error C1010: unexpected end of file while looking for precompiled header directive".

Fixed those and next I got is:
Unresolved external symbols stristr, quicksort.


These can be solved (see other thread), too.

Now I'd love very much to see this problem solved, because a few other plugins
got just about the same problem. I read about a quicksort.c and stristr.c somewhere; where do i get them? Why aren't they included if they're necessary?


Ulf moved the files into the common dir (but the project file is still from 2001 or 2002...) and finally uploaded them to CVS (again? don't remember where I got them from).

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 15, 2005 01:43PM

Woohoo, it finally worked!!

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 15, 2005 01:49PM

If I (or s.o. else) have to ever find that out again -- how-to building the history plugin w msvc6:

- linker libs (for my setup anyway): user32.lib comctl32.lib gdi32.lib
- add the hist_view.cpp file (thanks mt!)
- add qsort.c[pp] & stristr.c[pp] files
- compile

Duh, it was so easy.

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 15, 2005 01:52PM

Oh, I forgot: And you have to check "(o) not using precompiled headers" in project settings.

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 15, 2005 02:41PM

Okay, just played with it, again. You actually have to add even more, otherwise you won't get dialogs. Simply all useful files in the history-directory are used. ;-)

Options: ReplyQuote
Re: error while building history
Posted by: Andrew
Date: January 15, 2005 03:09PM

Ra,

Can you add something to the Wiki?

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: January 15, 2005 04:04PM

Can you add something to the Wiki?

Mmh, I even thought about writing my own "How to Build K-Meleon" page some time ago but I think I'll never find the time, so that will have to be done by someone else.

All useful information (and everything that's needed, too!) can actually be found in the forums, so why make an exception for the history plugin? winking smiley The build page is a bit outdated as you probably know. I think that wouldn't matter if the "*.ds?"-files in the CVS were up-to-date, but because they aren't the description would have to become unnecessary long.

Options: ReplyQuote
Re: error while building history
Posted by: mtt
Date: January 15, 2005 10:15PM

About the *.ds? files and the buildwiki docs:
SO true ..

Ulf/Andrew : could you guys please dedicate some time in the near future to fix those compilation issues?
For example,
- #if #include #endif -> unexpected #endif
- qsort.c stristr.c
- include paths to mozilla
- default argument not allowed on NavigateTo,SetPreference and another function
- don't worry, there's more ^^ ...

Btw, let me guess, you don't use msvc++ to build k-meleon, do you?

Options: ReplyQuote
Re: error while building history
Posted by: Andrew
Date: January 17, 2005 04:03AM

mtt,

You'll want to follow-up with Ulf via the dev list. I've built K-Meleon using MS VS C++ but am not currently doing builds. Ulf's the one to talk to about that. I know he would appreciate more hands coding.

Options: ReplyQuote
Re: error while building history
Posted by: mtt
Date: January 17, 2005 11:24AM

Andrew,

and I know I would appreciate it if my hands could be among them smiling smiley
I don't feel too comfortable to hassle the main developer with that kind of
problems though, I'd imagine that he is already busy enough. But expect to see
my questions on the devlist soon ^^

Options: ReplyQuote
Re: error while building history
Posted by: Andrew
Date: January 17, 2005 02:56PM

mtt,

If you're willing to contribute code, Ulf will be more than happy to be "hassled" with such questions.

Options: ReplyQuote
Re: error while building history
Posted by: jsnj
Date: January 19, 2005 10:29AM

bump

Options: ReplyQuote
Re: error while building history
Posted by: Hao Jiang
Date: March 04, 2005 07:00PM

ra:
Can you build K-Meleon using VC6 now?


Hao

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: March 04, 2005 08:00PM

For several months now, yeah. smiling smiley

But building 0.9 against Mozilla 1.8.x apparently requires some modifications in the code, that's why I posted http://kmeleonbrowser.org/forum/read.php?f=2&i=3982&t=3982

I'm currently lacking the time to look into it (and, like I said before, I'm no C++ coder).

Options: ReplyQuote
Re: error while building history
Posted by: Hao Jiang
Date: March 04, 2005 08:47PM

I met this problem when compiling. Hope you can help me. ra.

When linking, UnknownContentTypeHandler give me two unresolved external symbol . They are CProgressDialog::GetSize and CProgressDialog::GetAmountTransferred

Do you know how to solve this problem?

Hao

Options: ReplyQuote
Re: error while building history
Posted by: guenter
Date: March 05, 2005 04:40AM

@ra - with 1.8.x history.txt was renamed history.dat - can that have to do with it?

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: March 05, 2005 01:35PM

with 1.8.x history.txt was renamed history.dat - can that have to do with it?

No, that's no problem, although Ulf is patching his builds for several versions now to get the embed_lite history.txt without the overhead of the global history.dat.

Options: ReplyQuote
Re: error while building history
Posted by: guenter
Date: March 05, 2005 07:19PM

Sorry - thought it was worth mentioning.

overhead
history.jar when extracted has hardly 10 kb?
that is not much xul overhead?

Options: ReplyQuote
Re: error while building history
Posted by: ra
Date: March 06, 2005 02:06AM

Sorry - thought it was worth mentioning.

No problem. :-)

overhead
history.jar when extracted has hardly 10 kb?
that is not much xul overhead?


I'm not sure what you mean? We're talking about two ways of storing the visited links, with history.txt being the lighter implementation of the history function.

With W-B you/Dorian got history.dat (IIRC) because you/Dorian didn't include the embed_lite patch and therefore K-M's history plugin couldn't access the file and you used Mozilla's XUL history window in K-M (I prefer that one over K-M's history plugin's by the way).

Options: ReplyQuote
Re: error while building history
Posted by: guenter
Date: March 06, 2005 06:57AM

right: and the xul doing exactly that has less than 10 kb.
my history.dat which is set to 6 days has 200 mb at the moment
and reacts like Mozilla one which i like.

Options: ReplyQuote
Re: error while building history
Posted by: guenter
Date: March 06, 2005 07:15AM

sorry was 200 kb oh oh.
gruss

Options: ReplyQuote


K-Meleon forum is powered by Phorum.