Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Help Compiling Sample DLL
Date: June 21, 2007 04:42AM

I want to be able to make my own DLLs for K-Meleon. I've done a good bit of C and C++ in school, so I'm comfortable with the language. However, I've done very little Win32/MFC stuff, though I'm learning whenever I can. I also have little experience with Visual Studio, I usually use GCC. I don't want to learn the ins and outs of DLLs or handles or MFC, just enough to start making plugins for K-Meleon. My school provides me Visual C++ 2005, so I got that on my system. The "do nothing" plugin from the wiki doesn't work, since the wiki adds questions marks everywhere and there are missing equal signs and what not. I tried to edit the file, comparing it to other simple plugins from the current CVS. I also copied the most current "kmeleon_plugin.h" from the CVS. Sadly, I can't get it to work. I was wondering if someone can post the correct code and perhaps show me step by step (w/ text would suffice) on how to compile the DLL on VS 2005. Once someone shows me how to do that, I can play around with the specs. Anybody familiar with this? Thanks all.

Options: ReplyQuote
Re: Help Compiling Sample DLL
Posted by: Dorian
Date: June 21, 2007 05:08PM

I've began to do something about this matter but still never completed it. At least it can be build with VC2003. Not sure about VC2005.

EDIT: MFC is not needed to make a plugin.



Edited 1 time(s). Last edit at 06/21/2007 05:08PM by Dorian.

Attachments: KmPDK.zip (15.3 KB)  
Options: ReplyQuote
Re: Help Compiling Sample DLL
Date: June 21, 2007 05:51PM

It converted it, but it does not compile. After running "Build Solution," this is the error log:

------ Build started: Project: KmPlugin, Configuration: Release Win32 ------
Compiling...
myplugin.cpp
c:\documents and settings\\desktop\kmpdk\pdk\include\utf.h(192) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
c:\documents and settings\\desktop\kmpdk\pdk\include\utf.h(197) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
c:\documents and settings\\desktop\kmpdk\pdk\include\utf.h(212) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
c:\documents and settings\\desktop\kmpdk\pdk\include\utf.h(226) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
c:\documents and settings\\desktop\kmpdk\pdk\include\utf.h(262) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
c:\documents and settings\\desktop\kmpdk\pdk\include\strconv.h(133) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(57) : warning C4996: 'wcsncpy': This function or variable may be unsafe. Consider using wcsncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(272) : see declaration of 'wcsncpy'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(97) : warning C4996: 'vsprintf': This function or variable may be unsafe. Consider using vsprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(345) : see declaration of 'vsprintf'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(125) : warning C4996: 'vswprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter. To use traditional Microsoft swprintf, set _CRT_NON_CONFORMING_SWPRINTFS.
C:\Program Files\Microsoft Visual Studio 8\VC\include\swprintf.inl(97) : see declaration of 'vswprintf'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(158) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(74) : see declaration of 'strcpy'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(159) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(160) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(161) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(182) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(74) : see declaration of 'strcpy'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(183) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
c:\documents and settings\\desktop\kmpdk\pdk\src\..\include\LocalesUtils.h(184) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
.\src\myplugin.cpp(24) : fatal error C1083: Cannot open include file: 'resource.h': No such file or directory
Build log was saved at "file://c:\Documents and Settings\\Desktop\KmPDK\PDK\Release\BuildLog.htm"
KmPlugin - 1 error(s), 16 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Options: ReplyQuote
Re: Help Compiling Sample DLL
Posted by: Dorian
Date: June 21, 2007 06:55PM

There is a way to remove the warnings but I don't have it in mind.

The error is trivial, just remove the faulty line. This is something I've not done, but not necessary.

Options: ReplyQuote
Re: Help Compiling Sample DLL
Date: June 22, 2007 05:16AM

I lowered the warning level, but I still get a fatal error:

.\src\myplugin.cpp(24) : fatal error C1083: Cannot open include file: 'resource.h': No such file or directory

Options: ReplyQuote
Re: Help Compiling Sample DLL
Posted by: Dorian
Date: June 23, 2007 10:13AM

Er.. Did you completely read my previous post? smiling smiley

Options: ReplyQuote
Re: Help Compiling Sample DLL
Posted by: guenter
Date: June 25, 2007 12:44PM

I am not sure whether this helps. VCToolkitSetup.exe can still be googled.

That VCToolkitSetup.exe is the installer file for Microsoft Visual Toolkit 2003.

AFAIK that VCToolkit is the free toolkit and command line compiler that corresponds with the development tools used by Dorian. It should be at least the same compiler.

In case You want to use the links.

I found one link at Rapid Share.

another at an ftp site.


Please make sure that You scan the downloads for viruses and malware.

I installed and tried the first download - it seems to work but cannot find and object file for linking.



Edited 1 time(s). Last edit at 06/25/2007 02:03PM by guenter.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.