Newbie: Plugin examples for Dev-C++?
Moderators: white, Hacker, petermad, Stefan2
Newbie: Plugin examples for Dev-C++?
Hi,
I would like to try to make a TC plugin (lister). I'm using Dev-C++ with mingw. It would be much easier to start from an existing Dev-C++ project and therefore I would like to know if someone know if/where I can find such a project?
Thanks
I would like to try to make a TC plugin (lister). I'm using Dev-C++ with mingw. It would be much easier to start from an existing Dev-C++ project and therefore I would like to know if someone know if/where I can find such a project?
Thanks
2markman
take a look at this:
https://plugins.ghisler.com/lsplugins/listplugsample.zip
it's a Microsoft Visual Studio Project.
take a look at this:
https://plugins.ghisler.com/lsplugins/listplugsample.zip
it's a Microsoft Visual Studio Project.
Thank you for the help.
I imported the VS Project to Dev-C++ and compiled it as an dll. (I hope I'm on the right track here. It generated a def file which looks ok). When I renamed the dll and tried to load it in TC it says it is not a valid plugin. I'm starting to think that I'm missing something important. Are wlx files dlls? Is it something else I have to do. I'm I completely lost?
I appreciate the help
I imported the VS Project to Dev-C++ and compiled it as an dll. (I hope I'm on the right track here. It generated a def file which looks ok). When I renamed the dll and tried to load it in TC it says it is not a valid plugin. I'm starting to think that I'm missing something important. Are wlx files dlls? Is it something else I have to do. I'm I completely lost?
I appreciate the help
all TC-plugins (wfx, wlx, wcx) are .dll's
http://www.ghisler.com/plugins.htm#lister
there is a details help file how to write a plugin
http://www.ghisler.com/plugins.htm#lister
there is a details help file how to write a plugin
- ghisler(Author)
- Site Admin
- Posts: 48113
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
1. Make sure that the exported functions are not name-mangled. You can see them with the fileinfo lister plugin from our addons page.
2. Make sure your plugin doesn't use any runtime dlls, or if it does, that the dlls are in the windows or windows\system32 directory.
2. Make sure your plugin doesn't use any runtime dlls, or if it does, that the dlls are in the windows or windows\system32 directory.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
fsplugin with dev-c++
Hi markman,
don't know if you are still interested in using dev-c++ for plugin development but here are the results of my investigations:
I've imported the fsplugin ms visual c++ project in dev-c++ 4.9.7.3
I've changed the project options to generate a Win32 DLL
I tried to compile but got errors in fsplugin.rc
I've commented (removed) the following lines in fsplugin.rc
After that the project compiled successfully but
the plugin did not work because there were no exports.
I tried to provide the original def file so I've changed the linker options (Project options - compiler - linker)
After that I got undefined referenc errors.
So I've added
to stdafx.h and changed all function prototypes
in fsplugin.h and all functions in fsplugin.c
which are exported (according to fsplugin.def)
i. e.
After that all exported functions were mangled
with tailing characters like FsDeleteFile@12.
So I've added the linker option
(Project-options-compiler-linker)
and it worked.
I was able to install the renamed fsplugin.
I'm pretty sure that there are better ways to
do it - I'm not a real c/dev_c++ guru - but
I was able to install and use the sample
plugin.
Especially that
is a quite obscure for me (comments
are welcome).
I hope that helps.
regards
rm
don't know if you are still interested in using dev-c++ for plugin development but here are the results of my investigations:
I've imported the fsplugin ms visual c++ project in dev-c++ 4.9.7.3
I've changed the project options to generate a Win32 DLL
I tried to compile but got errors in fsplugin.rc
I've commented (removed) the following lines in fsplugin.rc
Code: Select all
#include "afxres.h"
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_SWISS
the plugin did not work because there were no exports.
I tried to provide the original def file so I've changed the linker options (Project options - compiler - linker)
Code: Select all
--def fsplugin.def
So I've added
Code: Select all
#define EXPORT extern "C" __declspec(dllexport)
in fsplugin.h and all functions in fsplugin.c
which are exported (according to fsplugin.def)
i. e.
Code: Select all
EXPORT int __stdcall FsInit(int....)
...
with tailing characters like FsDeleteFile@12.
So I've added the linker option
(Project-options-compiler-linker)
Code: Select all
--add-stdcall-alias
I was able to install the renamed fsplugin.
I'm pretty sure that there are better ways to
do it - I'm not a real c/dev_c++ guru - but
I was able to install and use the sample
plugin.
Especially that
Code: Select all
EXPORT int __stdcall ...
are welcome).
I hope that helps.
regards
rm
Sorry for digging up this old topic, but I just had the problem with the missing afxres.h file and this was the only topic I found.
I tried compiling the sample fsplugin with MSVC 6 (not mingw). It always complained about the afxres.h file missing. When I commented out the two lines you mentioned - the one including afxres.h and the LANGUAGE-thing - it compiled fine. I found a page though which says you should change axfres.h into winres.h. I tried and it worked too.
The resulting files are nearly identical, I think only two bytes are different. Not too sure about what the difference is :-?
Now I will try to understand how such a plugin works :)
Regards,
Sym
I tried compiling the sample fsplugin with MSVC 6 (not mingw). It always complained about the afxres.h file missing. When I commented out the two lines you mentioned - the one including afxres.h and the LANGUAGE-thing - it compiled fine. I found a page though which says you should change axfres.h into winres.h. I tried and it worked too.
The resulting files are nearly identical, I think only two bytes are different. Not too sure about what the difference is :-?
Now I will try to understand how such a plugin works :)
Regards,
Sym