<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>> > > On Sat, 1 Feb 2014, Fred van Stappen wrote:<br><div>> > ><br>> > > > Hello everybody.<br>> > > ><br>> > > > Ok, i jump...<br>> > ><br>> > > [snip]<br>> > ><br>> > > ><br>> > > > Stop compil showing error at dot of function TMyClass.<br>> > > ><br>> > > > => libtest.pas(14,18) Fatal: Syntax error, ":" expected but "." found<br>> > > ><br>> > > > PS : I promise, if i can do the conversion, to create a nice wiki, for dummies like me : "How to create a universal<br>> > > > (complicated) library with fpc"...<br>> > ><br>> > > You cannot export classes from a library. Only regular functions and procedures.<br>> > ><br>> > > Michael.<br>> > <br>> > Aaaaarg, ok and many thanks to answer.<br>> > <br>> > >> Only regular functions and procedures.<br>> > <br>> > Ok but those regular functions and procedures may use other custom classes ?<br>> <br>> Not as arguments or result of the function.<br>> <br>> How the function is implemented internally is another matter, but you cannot export classes.<br>> <br>> You can export pointers, but you should make it so that the caller cannot cast them back to class instances.<br>> That may work for simple cases, but in it's generality it will not work.<br>> <br>> If you want to make a generally usable library, restrict your exported interface to pointers and records.<br>> <br>> Michael.<br><br><br>Yep, thanks Michael.<br><br>Hum, may i export dynamic array ?<br></div> </div></body>
</html>