Link between scilab and c program

Lucio Agostinho Rocha outrosdiasvirao at yahoo.com.br
Fri Apr 24 01:27:36 CEST 2009


Hi,

I want to create a C program that executes a function inside Scilab.

I use Scilab 5.1.1 in Kubuntu, gcc 4.3.2

I create a simple function in C to try this.  The name's program is 'dados_para_scilab.c' :

double funcao(x)
double *x;
{
  double result = (*x)+1;
}//end function

Then, I compile:

gcc -o dados_para_scilab.o -c dados_para_scilab.c

And I put the 'dados_para_scilab.o' file inside the work directory that I defined for Scilab (with 'chdir' command).

Then, inside Scilab:

--> link('dados_para_scilab.o','funcao','c')

But the following message is showed:

Link failed for dynamic library 'dados_para_scilab.o'
...only: ET_DYN e ET_EXEC can be loaded.
link: The shared
 archive was not loaded: (null)

What am I doing wrong? Someone could help me? It would be a great value to put some C code and the steps to make this working.

Thanks in advance,

Lucio
...........


      Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20090423/0f3148fe/attachment.htm>


More information about the users mailing list