Using LCC-Win32 compiler on Windows for incremental link with Scilab 5.x.
Download & Install LCC-Win32 http://www.cs.virginia.edu/~lcc-win32/)
for Scilab 5.3 and more, you need to install lcc-windows toolbox from ATOMS
Launch Scilab.
Scilab detects and uses LCC-WIN32.
To check :
--> with_lcc()
a simple example :
if haveacompiler() then // CALLING EXTERNAL ROUTINE foo=['void foo(double *a,double *b,double *c)'; '{ *c = *a + *b; }' ]; // we use TMPDIR for compilation if ~c_link('foo') then path = getcwd(); chdir(TMPDIR); mputl(foo,'foo.c'); ilib_for_link(['foo'],'foo.o',[],"c"); exec loader.sce chdir(path) end //5+7 by C function call('foo',5,1,'d',7,2,'d','out',[1,1],3,'d') end
Please notice that all examples in Scilab (Windows) are prepared for Visual Studio C++ 2008 or mode (Pro and Express) (http://msdn.microsoft.com/vstudio/express/visualc/)
FAQ about Visual Studio 2008 Express (http://msdn.microsoft.com/vstudio/express/support/faq/) (Visual Studio 2008 Express is free, but not open-source)