Note that there are some explanatory texts on larger screens.

plurals
  1. POCompiling the cal3d demo "cally" (3d model library with boned animations)
    primarykey
    data
    text
    <p>I think this is a question about automake.</p> <p><a href="http://home.gna.org/cal3d/" rel="nofollow noreferrer">http://home.gna.org/cal3d/</a></p> <p>I'm struggling with the cally demo of Cal3D. The first problem I ran into was that the Cal3D code base is missing <a href="https://gna.org/bugs/?11472" rel="nofollow noreferrer"><code>#include &lt;cstring&gt;</code> and <code>#include &lt;memory&gt;</code> in a lot of places</a>.</p> <p>Doing this every time I got an error in any source file in Cal3d was enough to let me compile it.</p> <p>The cally demo also needed some <code>#include &lt;cstring&gt;</code></p> <p>Now my problem is that HAVE_SDL_H is not defined when tick.cpp is compiled. The configure and makefile seems to accept that SDL is installed on my system, but the macros in src/tick.cpp doesn't.</p> <p>I guess there is some kind of bug in the configure.in or something, but I don't seem to find out just what it is.</p> <pre><code>if g++ -DHAVE_CONFIG_H -I. -I. -I.. -O3 -ffast-math -funroll-all-loops -g -O2 -I/usr/include -I/usr/local/include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT tick.o -MD -MP -MF ".deps/tick.Tpo" -c -o tick.o tick.cpp; \ then mv -f ".deps/tick.Tpo" ".deps/tick.Po"; else rm -f ".deps/tick.Tpo"; exit 1; fi tick.cpp:144:5: error: #error "no timer implemented for your plateform" </code></pre> <p><strong>Edit:</strong></p> <p>I've finally compiled the demo.</p> <p>When I compiled cal3d I added <code>#include &lt;cstring&gt;</code> to the following files:</p> <ul> <li>src/cal3d/hardwaremodel.cpp</li> <li>src/cal3d/platform.cpp</li> <li>src/cal3d/renderer.cpp</li> <li>src/cal3d/submesh.cpp</li> <li>src/cal3d_converter.cpp</li> </ul> <p>When I compiled cally I added <code>#include &lt;cstring&gt;</code> to the following files:</p> <ul> <li>src/demo.cpp</li> <li>src/model.cpp</li> </ul> <p>In <em>model.cpp</em> I changed line 640 from</p> <pre><code>glBindTexture(GL_TEXTURE_2D, (GLuint)pCalRenderer-&gt;getMapUserData(0)); </code></pre> <p>to</p> <pre><code>glBindTexture(GL_TEXTURE_2D, *(GLuint*)pCalRenderer-&gt;getMapUserData(0)); </code></pre> <p>I also did some uglier changes to get <em>src/tick.cpp</em> to compile.</p> <p>In src/tick.cpp I removed everything that had anything to do with SDL. I also removed a macro if clause checking for __i386__ or __ia64__, so that Tick::getTime() could also be compiled.</p> <p>I know that this is not a proper fix, so improvements are very much welcome.</p> <ul> <li>64-bit OpenSuSE with a 2.6.27 kernel.</li> <li>GCC: 4.3.2</li> <li>GNU Automake: 1.10.1</li> <li>GNU Autoconf 2.63</li> <li>64-bit versions of the SDL library is installed with zypper (through the GUI).</li> </ul> <p><strong>Solution</strong></p> <p>In <em>configure.in</em> change</p> <pre><code>AC_CHECK_HEADERS([SDL.h]) </code></pre> <p>to</p> <pre><code>AC_CHECK_HEADERS([SDL/SDL.h]) </code></pre> <p>(then run autoreconf and ./configure)</p> <p>in <em>tick.cpp</em> change all checks for <code>HAVE_SDL_H</code> to <code>HAVE_SDL_SDL_H</code></p> <p>This is all due to a restructuring in the sdl library.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload