[scilab-Users] ilib_build: is it possible to include a dll in libs?

Allan CORNET allan.cornet at scilab.org
Thu Jul 15 08:10:32 CEST 2010


Hi,

-- If you want to create a external module see :

http://gitweb.scilab.org/?p=scilab.git;a=tree;f=scilab/contrib/toolbox_skele
ton;h=2690159b636c3b37fcad3cc922eea4b533744d80;hb=5ebffade33419e4fd61f95f8ab
6537c3b5285d87


-- If you want to use 'call' and that your function has not supported
prototype:

You can do a 'wrap' of your function:

void myWrapForScilab(int *a, int *b, int *c)
{
  *c = sum(*a, *b);
}

int sum(int a, int b)
{
  return a + b;
}

And call 'myWrapForScilab' with Scilab 'call'

-- If you want to add a dependency on a external library (dll) with
ilib_build

See 'libs' parameter in help ilib_build

On windows, you can also use pragma in your C code to create this
dependency:
#pragma comment(lib, "../../bin/libxml2.lib") create a dependency on
libxml2.dll
http://msdn.microsoft.com/en-us/library/7f0aews7(v=VS.71).aspx



Best regards

Allan CORNET



-----Message d'origine-----
De : alain [mailto:al.bertho at free.fr] 
Envoyé : mercredi 14 juillet 2010 12:02
À : users at lists.scilab.org
Objet : [scilab-Users] ilib_build: is it possible to include a dll in libs?

Hello

I'd like to build an interface between scilab and C functions provided 
in a dll. These functions prototypes can't be handled using 'call' 
scilab function, they don't use pointers.
In the builder.sce script, I put the dll basename in libs, but the 
makefile generated looks for basename.lib

How can I link to that dll?

Thanks

Alain





More information about the users mailing list