Dependencies of Far plugins

A place where plug-in developers can share their knowledge and experience.
Locked
IgorT75
Posts: 4
Joined: Mon Jan 28, 2008 1:08 pm

Dependencies of Far plugins

Post by IgorT75 » Mon Jan 28, 2008 1:21 pm

Hello all

I've developed simple plugin for Far and it works OK but there is a problem:

Plugin's dll has following dependencies: MSVCP80.DLL and MSVCR80.DLL (and of cours KERNEL32.DLL)
I used MSVS 2005 for development.

This dependencies means that if some PC has no redistributable package this plugin will not work.

I looked for dependencies of other plugins - they have no MSVC???.DLL dependencies.
The question is: how to avoid this dependencies?
Of course I can compile statically but dll size will increase largely.

Thanks in advance

User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex » Tue Jan 29, 2008 12:35 am

IgorT75
Don't use libc. See source code of Far std plugins.

IgorT75
Posts: 4
Joined: Mon Jan 28, 2008 1:08 pm

Post by IgorT75 » Tue Jan 29, 2008 8:12 am

t-rex wrote:IgorT75
Don't use libc. See source code of Far std plugins.
Thats just what I did:
I created win32 dll (empty project) in MSVS 2005.
Downloaded SimpleFP far plugin as an example. Here it is in attachment.
After building I looked for a dependencies...

dumpbin /dependencies reported: (in Release configuration)
Image has the following dependencies:

USER32.dll
MSVCR80.dll
KERNEL32.dll

As you can see MSVC???.DLL dependency still exists.
Probably I'm doing smth wrong or don't understand smth
Can you help me please...
Thanks
You do not have the required permissions to view the files attached to this post.

User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex » Tue Jan 29, 2008 5:36 pm

IgorT75
You use
strlen
sprintf
strcpy
memset
which are libc. You need to define them yourself, sprintf is provided by Far (in FSF) so you can use it from there. Then you will need to to add some additional switches for the compiler (http://api.farmanager.com/ru/articles/r ... oftvc.html a bit old but gives the right idea). And finally you can checkout how standard Far plugins are built.

Locked