[Scilab-Dev] How use a custom library in a toolbox ?

Vincent Lejeune vincent.lejeune at institutoptique.fr
Mon May 4 11:08:26 CEST 2009


Hi
here it is, and the log for the compilation.
The linker doesnt find where to find my functions actually...

My custom library is in a static .lib, I don't use .dll at the moment.
(By the way, the link you gave me is broken).

Thank for help, I am no compile process expert...


--------------------------------------------------
From: "Allan CORNET" <allan.cornet at scilab.org>
Sent: Monday, May 04, 2009 8:17 AM
To: <dev at lists.scilab.org>
Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ?

> Hi,
>
> Please attach your makelib.mak
>
> You can do :
>
> exec builder.sce
> after that your script return a error , put in Scilab :
> unix start
> it will open a dos shell
> nmake /f makelib.mak
>
> What is the error message ?
>
> What is your .lib is a library import for a dll or a static library  ?
>
> You can use external fortran dynamic library.
> We link blas ,lapack and others fortran libraries to Scilab.
>
>
> http://wiki.scilab.org/How_to_debug_an_external_source_code_linked_to_scilab
> _with_Visual_Studio
>
> Allan CORNET
>
>
>
>
>
> -----Message d'origine-----
> De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr]
> Envoyé : dimanche 3 mai 2009 22:42
> À : dev at lists.scilab.org
> Objet : [Scilab-Dev] How use a custom library in a toolbox ?
>
> Hello,
>
> I'd like to make a toolbox for Scilab with source that need to be compiled
> with nvcc , which is not considered as a common compiler (it makes asm 
> code
> from cuda source).
> I made a .lib file containing precompiled functions I liked to use within
> the gateway part from the squeleton toolbox. That means, I add a #pragma
> comment(lib,"...") pointing to the .lib file, and the header containing 
> the
> prototype of my functions. However, the automated script doesnt work, here
> is the output (in french sorry, only the end does matter anyway) :
>
>> Initialisation:
>>   Chargement de l'environnement de travail
>>    Génère un fichier loader
>>    Génère un Makefile
>>    Exécute le Makefile
>>    Compilation de csum.c
>>    Compilation de csub.c
>>    Construction de la bibliothèque partagée (soyez patient)
>>    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
>> Studio 9.0\VC\bin\link.EXE"'á: code retour '0x450'
>>    Stop.
>>  !--error 10000
>> unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll"
>> execution
>> at line      34 of function unix_s called by :
>> line    50 of function ilib_compile called by :
>> line    34 of function ilib_for_link called by :
>> line    18 of function tbx_build_src called by :
>> _absolute_file_path('builder_c.sce'))
>> line     9 of exec file called by :
>> ktop/TOOLBO~1/src/c/BUILDE~1.SCE'));
>
> I'm under windows. It's seems that the linking is failling. How can I 
> embed
> function inside a .lib in a gateway function ? I think it's possible, as
> other part of Scilab's source code contains code writed in fortran...But
> without the builder script.
>
>
>
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: log.txt
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090504/04bac2b9/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makelib.mak
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090504/04bac2b9/attachment.ksh>


More information about the dev mailing list