Thread: RE: [Dev-C++] HTMLHELP help urgently needed!
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ramana K. <xr...@ho...> - 2001-04-08 02:23:02
|
Thanks for your reply, I am using basically the same setup as you, when I use the Help Menu in my program (which calls the HtmlHelp() function) nothing happens. I have found that the function returns 0 (by using an if statement and a message box). I get the following errors in the linker section: C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\htmlhelp.lib(release/init.obj): warning: ignoring duplicate section `.text' C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\htmlhelp.lib(release/init.obj): warning: ignoring duplicate section `.text' Is this the problem? What is the newest version of the linker? Where can I get it? Can I have a copy of some sources where HTMLHELP works so I can test them on my computer? Thanks, Ramana PS I've been having trouble sending to the list... I get error: cannot route back to sender. I sent this in a different email account. Any idea what's wrong? _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |
|
From: Ramana K. <xr...@ho...> - 2001-04-12 08:17:54
|
I have the new ld now and your test program works fine. In my program, however, htmlhelp still returns 0, even when I copy the code from your program, so I can choose the help file. Does HtmlHelp provide a way to receive a detailed error message (so I know what's going wrong) and what could be going wrong? We have the same types of WNDCLASSEXs and the basically the same settings in the two programs, except my program has multiple source files, and a lot more resources. _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |
|
From: Elias P. <eli...@ao...> - 2001-04-12 10:37:52
|
> I have the new ld now and your test program works fine. In my
> program, however, htmlhelp still returns 0, even when I copy the
> code from your program, so I can choose the help file. Does
> HtmlHelp provide a way to receive a detailed error message (so I
> know what's going wrong) and what could be going wrong? We have
> the same types of WNDCLASSEXs and the basically the same settings
> in the two programs, except my program has multiple source files,
> and a lot more resources.
>
I don't know, but on the mingw list someone also said the .lib
wouldn't work. They created a htmlhelp.a library instead. Another way
is to directly load the library. This is the method i'm using to
access the DX8 dll. I just tried it, and it works here as well. ( so
the following code probably works with every .dll where you have no .a
file)
Instead of linking with the htmlhelp.lib, add code similiar to the
following to your project. (the atexit and MessageBox stuff is just
how I do it, you only need LoadLibrary and GetProcAddress) In my
example it works just like the .lib version, but maybe it's more
stable.
#include <stdlib.h> // declares atexit function
// the htmlhelp library
HMODULE htmlhelp=NULL;
// pointer to function we want to use
HWND WINAPI (*htmlhelp_HtmlHelpA)(HWND,LPCSTR,UINT,DWORD_PTR)=NULL;
// unload the htmlhelp library
void unload_htmlhelp_library(void) {
FreeLibrary(htmlhelp);
}
// load the htmlhelp library
void load_htmlhelp_library(void) {
htmlhelp=LoadLibrary("hhctrl.ocx");
if(htmlhelp==NULL) {
MessageBox(NULL,"Can't load hhctrl.ocx","Error",MB_OK);
exit(-1);
}
// ensure the library gets unloaded again
atexit(unload_htmlhelp_library);
htmlhelp_HtmlHelpA =
(void *) GetProcAddress(htmlhelp, "HtmlHelpA");
if(htmlhelp_HtmlHelpA==NULL) {
MessageBox(NULL,"Can't locate methods inside
hhctrl.ocx","Error",MB_OK);
exit(-1);
}
}
hope it works
Elias Pschernig
|
|
From: Elias P. <eli...@ao...> - 2001-04-12 10:44:29
|
I forgot to add, in my example code, the function now is called htmlhelp_HtmlHelpA() instead of HtmlHelp(). |
|
From: Elias P. <eli...@ao...> - 2001-04-08 13:17:26
|
> Thanks for your reply, > > I am using basically the same setup as you, when I use the Help > Menu in my program (which calls the HtmlHelp() function) nothing > happens. I have found that the function returns 0 (by using an if > statement and a message box). > > I get the following errors in the linker section: > C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\htmlhelp.lib > (release/init.obj): > warning: ignoring duplicate section `.text' > C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\htmlhelp.lib > (release/init.obj): > warning: ignoring duplicate section `.text' > > Is this the problem? What is the newest version of the linker? > Where can I get it? Can I have a copy of some sources where I get no warnings, so probably it's the problem, it sounds like the htmlhelp is ignored or something like that. ld -v says 2.10.91 (Jan 26 2001) for me, i think it's a beta version - but at least it can link the htmlhelp.lib file. I got it from the mingw site, direct link is: http://prdownloads.sourceforge.net/mingw/ld-2.10.91-20010126.zip > HTMLHELP works so I can test them on my computer? I uploaded a simple test program which works for me: http://www.elias.f2s.com/dev/test.c > Thanks, > Ramana > PS I've been having trouble sending to the list... I get error: > cannot route back to sender. I sent this in a different email > account. Any idea what's wrong? Don't know, I only have problems with Outlook Express sending my emails under different names :) Elias Pschernig |
|
From: Bolek V. <vr...@pa...> - 2001-04-08 19:33:47
|
I have read in some previous article on this topic that someone used
Microsoft's htmlhelp.lib, perhaps origanally for Visual C++. Could you
explain how to do it and what's your experience with Microsoft's
libraries (.lib files) in Dev-CPP. Thank you. I need to use some libs
originally for Visual C++ too.
--
============================================================
Ing. Boleslav Vrany
Stanice techniku DDM hl. m. Prahy
Pod Juliskou 2a
Praha 6 - Dejvice
16000
Czech Republic
tel. (420 2) 243 10 240
|
|
From: Elias P. <eli...@ao...> - 2001-04-08 21:43:11
|
> I have read in some previous article on this topic that someone > used Microsoft's htmlhelp.lib, perhaps origanally for Visual C++. > Could you explain how to do it and what's your experience with > Microsoft's libraries (.lib files) in Dev-CPP. Thank you. I need > to use some libs originally for Visual C++ too. > I only know, .lib files are no problem if they are just import libraries and the actual code is in a .dll. If not, the mingw linker only understands .lib files if they are simple and written in C i think. (Just add the .lib to further object files in dev-c++ then) If you need more information about the difference between .a and .lib files, and when they work with mingw, you can probably get more information at www.mingw.org and in the mingw mailing list. I'm subscribed there, and it seems to be a frequent topic. I just checked the recent topics (as i normally ignore most messages), and last week someone even posted about a htmlhelp.a. Elias Pschernig |