<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transational//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
</HEAD>
<BODY>Hi David,<br><br>I have added in the environment variable<br>user variable<br>SCI c:\Program Files\scilab-5.4.1\bin<br>system variable<br>add to the path c:\Program Files\scilab-5.4.1\bin<br><br>linker input:<br>api_scilab.lib<br>call_scilan.lib<br>core.lib<br><br>linker general<br>additional library directory<br>c:\Program Files\scilab-5.4.1\bin<br><br>the compile and link are ok, but the execution gives<br>"The native library scicommons does not exist or cannot be found<br>no scicommons in java.library.path<br>current java.library.path is:<br><br><br>is there something to do in visual studio, concerning a java.library.path?<br><br>thanks in advance<br>pascal<br> <br><br><br>
---- Message d'origine ----<br>
De : "CHEZE David 227480" <david.cheze@cea.fr><br>
À : "quantparis@numericable.fr" <quantparis@numericable.fr>;<br>
"users@lists.scilab.org" <users@lists.scilab.org><br>
Objet : RE: [Scilab-users] call_scilab from another dll<br>
Date : 25/09/2013 14:19:39 CEST<br>
<br>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">Hi Pascal,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">I’ve nearly the same configuration as you but my OS is WIN7 32bits, not 64bits which introduces sometimes extra pbs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">I’m using MVSC++ 2010 express.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">I needed to run MVSC++ with a local admin account in order to open and convert automatically the example project provided in C:\Program Files\scilab-5.4.1\modules\call_scilab\examples\call_scilab\c\visual_studio
. Then I got an error message at build time complaining about incompatible COFF format that I “solved” by removing the default configuration option to embed the manifest (Manifest tool/input and output/embed=NO ). Then it rebuilds and the exe generated in
SCI\bin runs well, in console mode.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">Nb: While working on my dlls troubles, I’ve added a new user’s environment variable SCI= C:\Program Files\scilab-5.4.1\bin and added it to the
user’s Path environment variable Path=….; C:\Program Files\scilab-5.4.1\bin.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">This allow to run Scilab from every local directory without stating the full path and let the system know that there is there a lot of dlls that
might be called. Not sure that it should be necessary but that’s the case on my machine.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">By the way I’m still puzzling with this strange behavior that as soon as my component (dll) references dependency with call_scilab.dll, my simulation
environment fails to see that the expected component is actually inside and the simulation stop even before trying to call Scilab... Arrgh!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US">David<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"calibri","sans-serif";color:#1f497d;" lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"tahoma","sans-serif";">De :</span></b><span style="font-size:10.0pt;font-family:"tahoma","sans-serif";"> quantparis@numericable.fr [mailto:quantparis@numericable.fr]
<br>
<b>Envoyé :</b> mercredi 25 septembre 2013 11:41<br>
<b>À :</b> CHEZE David 227480<br>
<b>Objet :</b> Re: [Scilab-users] call_scilab from another dll<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello David,<br>
<br>
I read your post concerning call_scilab, I have been trying to use it on linux with no success up to now<br>
<br>
as on one of my disk I have windows 7, yesterday evening I installed studio 2010 and scilab 5.4.1 bin<br>
<br>
but unfortunalty I wasn't able to go up to your problem (call_scilab from another dll) because I failed the
<br>
simple use of call_scilab<br>
<br>
if you have any suggestions it would be helpfull<br>
<br>
<br>
FIRST ATTEMPT<br>
----------------------------------------------------------------------------------------------------------<br>
I try to run<br>
<a href="http://help.scilab.org/docs/5.3.3/en_US/call_scilab.html">http://help.scilab.org/docs/5.3.3/en_US/call_scilab.html</a><br>
<br>
in visual studio 2010 pro<br>
Project Properties C/C++<br>
Additional include librarie<br>
c:\Program Files\scilab5.4.1\modules\call_scilab\includes<br>
c:\Program Files\scilab5.4.1\modules\core\includes<br>
<br>
Project Properties Linker<br>
general : Additional library Directories<br>
c:\Program Files\scilab5.4.1\bin<br>
<br>
input :<br>
api_scilab.lib<br>
call_scilab.lib<br>
core.lib<br>
<br>
RESULT: unresolved external TerminateScilab<br>
etc...<br>
<br>
note that I get the same linking error when I execute the make file supplied for linux<br>
implementation<br>
<br>
<br>
SECOND ATTEMPT<br>
------------------------------------------------------------------------------------------------------------------------<br>
try to run the callSciVC project supplied in the scilab installation<br>
scilab5.4.1\modules\call_scilab\examples\c\visual-studio\callsciVC solution<br>
<br>
similar results unresolved external<br>
<br>
<br>
<br>
thanks in advance if you have any suggestions<br>
<br>
pascal<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
---- Message d'origine ----<br>
>De : "David Chèze" <<a href="mailto:david.cheze@cea.fr">david.cheze@cea.fr</a>><br>
>À : <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
>Objet : [Scilab-users] call_scilab from another dll<br>
>Date : 24/09/2013 17:58:10 CEST<br>
><br>
>Hi,<br>
> <br>
> i'm trying to call Scilab using call_scilab features from a .dll component<br>
> : in the system simulation environment (TRNSYS), components are available<br>
> for the simulation core as dll files (under windows). I'm writing this<br>
> component with microsoft visual c++ 2010 express and it runs well in the<br>
> simulation environment as soon as I don't include in my code real calls to<br>
> call_scilab functions (StartScilab()). Building process is ok since it<br>
> finds the headers and librairies for call_scilab and api_scilab. When I<br>
> include call to StartScilab for example, then the build process is still ok<br>
> but when I try to run my simulation simple test case (1 component), the<br>
> simulation core issues a message that it found the dll file but it didn't<br>
> find any component referenced in the test case diagram, then it failed to<br>
> run the simulation. I guess that when I really call scilab functions from <br>
> my<br>
> components, it changes something in the shape of the file that make it<br>
> uncompatible with the existing kernel dlls. <br>
> <br>
> Did you already succeeded in running similar simulation task under windows<br>
> OS (WIN7 32 Bits) involving dll files that call Scilab ?<br>
> Any ideas to investigate further?<br>
> <br>
> Thanks for your feedback,<br>
> <br>
> David <br>
> <br>
> <br>
> <br>
> --<br>
> View this message in context: <a href="http://mailinglists.scilab.org/call-scilab-from">
http://mailinglists.scilab.org/call-scilab-from</a><br>
> -another-dll-tp4027456.html<br>
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at <br>
> Nabble.com.<br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
> <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a><br>
> <o:p></o:p></p>
</div>
</BODY></HTML>