Results 1 to 6 of 6

Thread: Patch: Broken 3D example(s)

  1. #1

    Default Patch: Broken 3D example(s)

    The Object3D example will not compile in Linux, as some of the Collada files try to #include "precomp.h", which is not in their directory; I have not tested the other Collada-using examples but expect them to also be affected.

    Copying precomp.h from Object3D/Sources to Clan3D/Collada fixes the problem.

    $ make
    g++ -I./ -ICollada `pkg-config --cflags clanApp-2.2 clanDisplay-2.2 clanCore-2.2 clanGL1-2.2` -pthread -c Sources/example.cpp -o Sources/example.o
    g++ -I./ -ICollada `pkg-config --cflags clanApp-2.2 clanDisplay-2.2 clanCore-2.2 clanGL1-2.2` -pthread -c Sources/program.cpp -o Sources/program.o
    g++ -I./ -ICollada `pkg-config --cflags clanApp-2.2 clanDisplay-2.2 clanCore-2.2 clanGL1-2.2` -pthread -c Sources/precomp.cpp -o Sources/precomp.o
    g++ -I./ -ICollada `pkg-config --cflags clanApp-2.2 clanDisplay-2.2 clanCore-2.2 clanGL1-2.2` -pthread -c ../Clan3D/Collada/collada_effect_float_param.cpp -o ../Clan3D/Collada/collada_effect_float_param.o
    ../Clan3D/Collada/collada_effect_float_param.cpp:29:21: error: precomp.h: No such file or directory
    In file included from ../Clan3D/Collada/collada_effect_float_param.cpp:30:
    ../Clan3D/Collada/collada_effect_float_param.h:38: error: expected ‘)’ before ‘&’ token
    ../Clan3D/Collada/collada_effect_float_param.h:47: error: ISO C++ forbids declaration of ‘CL_SharedPtr’ with no type
    ../Clan3D/Collada/collada_effect_float_param.h:47: error: expected ‘;’ before ‘<’ token
    ../Clan3D/Collada/collada_effect_float_param.cpp:44: error: expected ‘)’ before ‘&’ token
    ../Clan3D/Collada/collada_effect_float_param.cpp: In member function ‘float CL_Collada_Effect_FloatParam::get_float()’:
    ../Clan3D/Collada/collada_effect_float_param.cpp:61: error: ‘impl’ was not declared in this scope
    ../Clan3D/Collada/collada_effect_float_param.cpp: In member function ‘bool CL_Collada_Effect_FloatParam::is_null()’:
    ../Clan3D/Collada/collada_effect_float_param.cpp:66: error: ‘impl’ was not declared in this scope
    make: *** [../Clan3D/Collada/collada_effect_float_param.o] Error 1

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

    Default

    I do not know how that one slipped the net!

    Object3D should be the only example that has the error.

    The problem is the Object3D makefile:

    incorrect: CXXFLAGS += -I./ -ICollada
    correct: CXXFLAGS += -I./ -I../../Object3D/Collada

    (Your fix is better, but I don't know if it will work with the Visual Studio precompiler on Windows)

  3. #3

    Default

    Quote Originally Posted by rombust View Post
    correct: CXXFLAGS += -I./ -I../../Object3D/Collada
    That doesn't work; what does (at least in Linux) is
    CXXFLAGS += -ISources

    (The -ICollada isn't needed, and appears to point to a directory that doesn't exist: Collada is now under Clan3D, not Object3D.)

    The other Collada-using examples already have this, and BumpMapping (I haven't tested the others) compiles successfully.

  4. #4

    Default

    Not to resurrect a dead thread but there are several problems that appear when trying to compile several examples (most notably DiceWars) on both the 2.2.3 and I think 2.2.1. The complier is upset about undefined functions (atof, atoi) which I recognize as belonging to stdlib.h when I add the include by hand to the files where this is a problem it then compiles cleanly. All these files that needed the header were found within collada.

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

    Default

    That doesn't surprise me.

    GCC complains about the stdlib header not being included, whilst visual studio does not care.

    GCC used to include it by default (or some other include, included it) some years ago, but not any more

    It is very annoying.

    ClanLib welcomes patches

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

    Default

    Fixed Dicewar example in SVN. The other examples appear to compile with gcc 4.5.1

Similar Threads

  1. CL_Window patch
    By huntercool in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 09-08-2009, 02:06 PM
  2. CL 0.8 Canvas patch, get-rid-of-warnings patch
    By Trigve in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 09-30-2007, 11:08 PM
  3. opengl_window_provider_wgl patch
    By Trigve in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 06-26-2007, 10:33 AM
  4. Broken images in tutorial page..
    By whisperstorm in forum Novashell Game Creation System
    Replies: 1
    Last Post: 02-26-2007, 11:28 AM
  5. Question about the patch.
    By CyberDoc in forum Dink Smallwood HD
    Replies: 1
    Last Post: 12-14-2003, 02:43 PM

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
  •