<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Tue May 21, 2013 6:32 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Tue May 21, 2013 6:32 pm</pubDate>
  <lastBuildDate>Tue May 21, 2013 6:32 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>Re: Trout Wars and TTF</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=6165#6165</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2545'&gt;mota&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun Aug 07, 2005 10:12 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Glad to meet a fellow procrastinator.  Also, I'm glad you &quot;wasted space&quot; with your observations.&lt;br /&gt;
&lt;br /&gt;
I just went throught the first toutorial and was getting segfaults.  Googling around I found some references to segfaults in TroutWars, but couldn't find anysolutions (parts of the old forums were still cached).&lt;br /&gt;
&lt;br /&gt;
This was my gdb output:&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;#40;gdb&amp;#41; s&lt;br /&gt;
33&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while&amp;#40;done==0&amp;#41;&amp;#123;&lt;br /&gt;
&amp;#40;gdb&amp;#41; s&lt;br /&gt;
35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while &amp;#40; SDL_PollEvent&amp;#40;event&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;#40;gdb&amp;#41; s&lt;br /&gt;
&lt;br /&gt;
Program received signal SIGSEGV, Segmentation fault.&lt;br /&gt;
0x00002aaaaabfe7ea in SDL_PeepEvents &amp;#40;&amp;#41; from /usr/lib/libSDL-1.2.so.0&lt;br /&gt;
&amp;#40;gdb&amp;#41; s&lt;br /&gt;
Single stepping until exit from function SDL_PeepEvents,&lt;br /&gt;
which has no line number information.&lt;br /&gt;
0x00002aaaaad3cc20 in __pthread_sighandler &amp;#40;&amp;#41; from /lib/libpthread.so.0&lt;br /&gt;
&amp;#40;gdb&amp;#41; s&lt;br /&gt;
Single stepping until exit from function __pthread_sighandler,&lt;br /&gt;
which has no line number information.&lt;br /&gt;
Fatal signal&amp;#58; Segmentation Fault &amp;#40;SDL Parachute Deployed&amp;#41;&lt;br /&gt;
&lt;br /&gt;
Program exited with code 0365.&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
I replaced:&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;void CTWGame&amp;#58;&amp;#58;Play&amp;#40;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; int done=0;&lt;br /&gt;
&amp;nbsp; while&amp;#40;done==0&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SDL_Event* event;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while &amp;#40; SDL_PollEvent&amp;#40;event&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if&amp;#40;event-&amp;gt;type==SDL_QUIT&amp;#41; done=1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DrawScene&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
With:&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;void CTWGame&amp;#58;&amp;#58;Play&amp;#40;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; int done=0;&lt;br /&gt;
&amp;nbsp; while&amp;#40;done==0&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SDL_Event event;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while &amp;#40; SDL_PollEvent&amp;#40;&amp;amp;event&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if&amp;#40;event.type==SDL_QUIT&amp;#41; done=1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DrawScene&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Now everthing runs as expected.  Unfortunatly I couldn't figure out why the origional code broke.  If anyone could explain what was wrong with the previous code...or if something was off in my SDL environment I'd be very grateful.  If it matters I'm running on gentoo on an AMD64 architecture.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=6165#6165</comments>
                                        <author>mota</author>
                                        <pubDate>Sun Aug 07, 2005 10:12 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=6165#6165</guid>
                                      </item>
                                      <item>
                                        <title>Re: Trout Wars and TTF</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=5880#5880</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2407'&gt;laymanofsdl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun Jul 31, 2005 2:03 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I've solved it myself. Wasn't so much of a mystery after all. A quick look in some SDL_ttf.h documentation and i realise that i should be using &quot;$ g++ TroutWars.cpp -o TroutWars `sdl-config --libs` -lSDL_ttf&quot; and not &quot;$ g++ TroutWars.cpp -o TroutWars `sdl-config --libs&quot;.&lt;br /&gt;
&lt;br /&gt;
I had another problem but that was just to do with setting up the path to my font correctly. Sorry for taking up forum space for a problem i could solve myself:)</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=5880#5880</comments>
                                        <author>laymanofsdl</author>
                                        <pubDate>Sun Jul 31, 2005 2:03 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=5880#5880</guid>
                                      </item>
                                      <item>
                                        <title>Trout Wars and TTF</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=5879#5879</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2407'&gt;laymanofsdl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun Jul 31, 2005 1:42 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      So I've been meaning to do the Trout Wars tutorials for a long time. Finally I get round to doing it and everything's ok for a while until, naturally, I hit a snag. Unfortunately it seems that the forums have been updated and anything anyone might have written about Trout Wars has gone:( So I don't know if anyone here has any clue what I'm on about but I'd love some help.&lt;br /&gt;
&lt;br /&gt;
So I'm trying to compile the second tutorial in LXF54. Particularly the fonts part. The first part compiled fine but the second part is coming up with errors I don't understand. Here they are.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;richard@ubuntu&amp;#58;~$ g++ TroutWars.cpp -o TroutWars `sdl-config --libs`&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x59&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;not-in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_Init'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x70&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;not-in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_OpenFont'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x7a&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;not-in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_Quit'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0xdb&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;not-in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_RenderText_Blended'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x1cb&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_Init'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x1e2&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_OpenFont'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x1ec&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_Quit'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x24d&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;CTWGame&amp;#91;in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_RenderText_Blended'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x319&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;~CTWGame &amp;#91;not-in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&amp;#58; undefined reference to `TTF_CloseFont'&lt;br /&gt;
/tmp/ccQmHnPf.o&amp;#40;.text+0x363&amp;#41;&amp;#58; In function `CTWGame&amp;#58;&amp;#58;~CTWGame &amp;#91;in-charge&amp;#93;&amp;#40;&amp;#41;'&amp;#58;&lt;br /&gt;
&amp;#58; undefined reference to `TTF_CloseFont'&lt;br /&gt;
collect2&amp;#58; ld returned 1 exit status&lt;br /&gt;
richard@ubuntu&amp;#58;~$&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
As far as I know I've got all the sdl ttf stuff installed and my code is exactly as it describes it in the mag. I seem to have misplaced the disc that came with the mag so I can't even check this. But I don't think it's the codes fault. I'm stumped. Thanks for any help</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=5879#5879</comments>
                                        <author>laymanofsdl</author>
                                        <pubDate>Sun Jul 31, 2005 1:42 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=5879#5879</guid>
                                      </item></channel></rss>