Results 1 to 6 of 6

Thread: Missing includes in ClanLib 0.8.0

  1. #1

    Default Missing includes in ClanLib 0.8.0

    Hello ClanLib developers!

    Our internal checks, here at SUSE, found out that ClanLib source code is
    missing <cstring> in #includes. I'm attaching a patch (includes.patch)
    I also noticed that ClanLib uses CLvoid instead of void. In GCC 4.3+
    types typedefed to void cannot be used in places where void is expected.
    (For example, you cannot pass CLvoid* to function expecting void*).
    Please keep that in mind, when GCC 4.3 is out and being used ...
    Attached Files Attached Files

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    Thank you for your patch - I've applied it to the svn version of ClanLib 0.8, so next official release will include it.

    Regarding CLvoid, we only use this define as part of our OpenGL wrapper, where it attempts to stay as loyal as possible to the same defines and function declarations as the system OpenGL headers.

    Why the GCC developers spend most of their time making pointless changes to their compiler that only breaks older working code is beyond my understanding, but either way I've applied a patch replacing all CLvoid places with just void. Hopefully it will keep it compiling for a week or two before FSF once again breaks something different but equally pointless.

  3. #3

    Default

    Quote Originally Posted by Magnus Norddahl View Post
    Regarding CLvoid, we only use this define as part of our OpenGL wrapper, where it attempts to stay as loyal as possible to the same defines and function declarations as the system OpenGL headers.

    Why the GCC developers spend most of their time making pointless changes to their compiler that only breaks older working code is beyond my understanding, but either way I've applied a patch replacing all CLvoid places with just void. Hopefully it will keep it compiling for a week or two before FSF once again breaks something different but equally pointless.
    Ahhh, maybe I got it wrong and you CAN pass CLvoid* instead of void*. I got this error

    Code:
     g++ -DPACKAGE_NAME=\"ClanLib\" -DPACKAGE_TARNAME=\"clanlib\" -DPACKAGE_VERSION=\"0.8.0\" "-DPACKAGE_STRING=\"ClanLib 0.8.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"clanlib\" -DVERSION=\"0.8.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_KD_H=1 -DHAVE_SYS_VT_H=1 -DHAVE_FSTAB_H=1 -DSIZEOF_INT=4 -DHAVE_LIBZ=1 -DHAVE_LIBSDL_GFX=1 -DHAVE_GLX_GETPROCADDRESSARB=1 -DUSE_GETADDR=1 -I. -I. -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-aliasing -I../../Sources -MT setupdisplay.lo -MD -MP -MF .deps/setupdisplay.Tpo -c setupdisplay.cpp  -fPIC -DPIC -o .libs/setupdisplay.o
    In file included from ../../Sources/API/Display/Collision/collision_outline.h:60,
                     from resourcedata_collisionoutline.h:39,
                     from setupdisplay.cpp:43:
    ../../Sources/API/Display/Collision/../../GL/opengl_wrap.h:2533: error: '<anonymous>' has incomplete type
    ../../Sources/API/Display/Collision/../../GL/opengl_wrap.h:2533: error: invalid use of 'CLvoid'
    make[2]: *** [setupdisplay.lo] Error 1
    make[2]: Leaving directory `/usr/src/packages/BUILD/ClanLib-0.8.0/Sources/Display'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/packages/BUILD/ClanLib-0.8.0/Sources'
    make: *** [all-recursive] Error 1
    but now I'm trying to create a simple testcase and mixing void and CLvoid works. Maybe the problem is somewhere else ...

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Use 0.8 from the SVN. The problem you can see there, is an old fixed problem.

  5. #5

    Default

    0.9 from svn doesn't compile on opensuse 11.0. patch attached.
    Attached Files Attached Files

  6. #6
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Applied patch, many thanks.

Similar Threads

  1. Am i missing something?
    By MrSi1as in forum Dink Smallwood HD
    Replies: 5
    Last Post: 12-03-2006, 01:23 AM
  2. servers missing
    By arzon the II in forum RTsoft Tavern
    Replies: 0
    Last Post: 11-02-2006, 09:59 AM
  3. servers missing?
    By in forum Funeral Quest
    Replies: 3
    Last Post: 01-22-2006, 02:46 AM
  4. missing coins and fireball
    By bowers23 in forum RTsoft Tavern
    Replies: 1
    Last Post: 06-22-2005, 12:28 AM
  5. Dungeon scroll.. and am I missing something?
    By in forum Dungeon Scroll for PC and iPhone
    Replies: 1
    Last Post: 01-29-2004, 01:32 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •