[Scilab-Dev] How use a custom library in a toolbox ?
Allan CORNET
allan.cornet at scilab.org
Mon May 4 08:17:28 CEST 2009
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.
More information about the dev
mailing list