<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'>> Please provide a simple, self contained example that shows this
    problem.<br><div>
    >Regards,<br>
    >Sven<br>
  

<br>Hello.<br><br>Hum, i have done a simple library, with a thread and a simple program calling this library.<br><br>Not usefully to show it because, both using cmem are working perfectly... ;-)<br><br>So the problem is somewhere else.<br><br>I resume: if i use cmem in uses section of uos library (without debug on) it compile but i get that error when a program call the library (at thread.terminate):<br><br>Program received signal SIGSEGV, Segmentation fault.<br>[Switching to Thread 0x7fffe859c700 (LWP 3289)]<br>0x00007fffefe08944 in ?? ()<br>   from /home/fred/uoslib/examples/lib/Linux/64bit/libuos-64.so <br><br>I have then try to compile uos library with that parameters with debug :<br>-MObjFPC -Scghi -O1 -gw2 -godwarfsets -gl -gv -Xg -gt -pg -vewnhi <br><br>and with cmem in uses section.<br><br>And now, fpc refuse to compile, focusing at cmem in uses section ! <br><br>>> simpleplayer.lpr(7,8) Error: Duplicate identifier "cmem"<br><br>I do not understand, i never declare cmem <span id="result_box" class="short_text" lang="en"><span class="hps">somewhere else</span></span>, why does the debugger say me that ?<br>(and sure, that is the problem=>solution).<br><br>Here the uses section :<br>uses<br> {$IFDEF UNIX}<br> cthreads,<br> cwstring, {$ENDIF}<br>  cmem,  // => debugger focus here, saying "Error: Duplicate identifier "cmem" ??<br>  ctypes, uos;  <br><br>Many thanks.<br><br>Fred.<br></div>                                         </div></body>
</html>