[scilab-Users] cpp function in sci_gateway

allan.cornet at scilab.org allan.cornet at scilab.org
Wed Mar 30 09:27:56 CEST 2011


 Hi,

 http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B  (Linking C 
 and C++ code)

 see extern "C" { }


 Allan


 On Tue, 29 Mar 2011 05:05:32 -0700 (PDT), Svetoslav 
 <svetlio.hacky at gmail.com> wrote:
> hello, I was writing function char* net_gethostbyname(char* name) 
> which
> returns string of IP of the searching host name. For example
> net_gethostbyname("example.com") ->returns 1.2.3.4
> But when I start to write the sci_net_gethostbyname.cxx file I have 
> some
> problems. I am not sure how to call the function to do its work. I 
> was
> reading the documentation and I was thinking that I must include in 
> the
> begging of the document: extern char* net_gethostbyname.... and after 
> that I
> will could use the function.
> I done this and when I do exec builder.sce of the module it finished 
> OK, but
> error came up in the loader.sce "undefined symbol: 
> net_gethostbyname".
> So could use someone give me a hint where I am wrong or what to read 
> to
> understand how to write it correctly.
> Thanks!
>
> --
> View this message in context:
> 
> http://mailinglists.scilab.org/cpp-function-in-sci-gateway-tp2748025p2748025.html
> Sent from the Scilab users - Mailing Lists Archives mailing list
> archive at Nabble.com.




More information about the users mailing list