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

alain al.bertho at free.fr
Thu Jul 15 09:37:07 CEST 2010


Hi,

Thanks very much for your answer, it gives me ideas!
In fact, there was a .lib given with the dll I was trying to link to...
My real problem was that I tried to link a msvc .lib to scilab with lcc...
I had a look to your script modules/dynamic_link/macros/VCtoLCCLib.sce, 
and it gave me the solution, pedump and buildlib...

My module does work!

Well, when possible, I think it's better to use scilab_api, it's quite 
simple and works fine.

Best regards.

Alain

Allan CORNET a écrit :
> 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