If I understood correctly from the help, FS plugins are loaded when needed. But when are they unloaded?
Also, if the plugin is used in more 2 panels or more in the same time. It is still loaded only one time? in this case, who is responsible for synchronization, locking, etc ?
--sadyc
FS plugins: some questions
Moderators: Hacker, petermad, Stefan2, white
Plugins still loaded until TC exits or command cm_UnloadPlugins executed by user.If I understood correctly from the help, FS plugins are loaded when needed. But when are they unloaded?
AFAIK yes, plugin loaded once only.It is still loaded only one time?
It is too general question and depend on what you call "synchronization".who is responsible for synchronization, locking, etc ?
If you mean i.e. call sequence for entries enumeration from different panels, it is TC responsibility.
If plugin have to lock/unlock resources in order to achieve it's function - it is plugin author responsibility, as well as thread-safty.
If you mind some specific case ask more specific question.
Thanks for your answers.
I also have some more questions.
How can I compile a FS plugin with mingw ?
I'm using the mingw from Dev-C++ 4.9.9.1.
(gcc (GCC) 3.3.1 (mingw special 20030804-1))
The commands I've tried to compile with:
then i rename test2.dll to test2.wfx.
However TC 6.03 says it's an invalid plugin.
I have defined the 3 required functions for a FS plugin.
I also have some more questions.
How can I compile a FS plugin with mingw ?
I'm using the mingw from Dev-C++ 4.9.9.1.
(gcc (GCC) 3.3.1 (mingw special 20030804-1))
The commands I've tried to compile with:
Code: Select all
gcc.exe -D__DEBUG__ -c list_parts.c -o list_parts.o -I"C:/Dev-Cpp/include" -Wall -g3
dllwrap.exe --output-def libtest2.def --implib libtest2.a list_parts.o -L"C:/Dev-Cpp/lib" -g3 -o test2.dll
However TC 6.03 says it's an invalid plugin.
I have defined the 3 required functions for a FS plugin.
Seems that I found something about this in another thread:sadyc wrote: How can I compile a FS plugin with mingw ?
http://ghisler.ch/board/viewtopic.php?t=1815&highlight=mingw
Sorry for not searching before asking :P
The solution is to declare the functions with __declspec(dllexport)
And change a little the linker options (add --add-stdcall-alias):
Code: Select all
gcc.exe -D__DEBUG__ -c list_parts.c -o list_parts.o -I"C:/Dev-Cpp/include" -Wall -g3
dllwrap.exe --output-def libtest2.def --implib libtest2.a list_parts.o -L"C:/Dev-Cpp/lib" --add-stdcall-alias -g3 -o test2.wfx