<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Pascal,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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 lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m using MVSC++ 2010 express.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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 lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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 lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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 lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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 lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">David<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><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>