Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 65

Thread: tutorial building for "Learning Modern 3D Graphics

  1. #21
    Junior Member Newbie
    Join Date
    Dec 2011
    Posts
    8

    Re: tutorial building for "Learning Modern 3D Graphics

    Hi, sorry if i hijack this thread but my problem is identical: i fail to compile, build and run examples from the tutorial. Here is what i have:

    Code :
    uname -a
    Linux faeton 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:34:47 UTC 2011 i686 i686 i386 GNU/Linux

    i download and extract both Tutorial 0.3.7 and premake-4.3 then carry out this sequence of actions:
    go to glsdk subfolder in Tutorial and run
    Code :
    ../../premake-4.3/bin/release/premake4 codeblocks
    then go to the tinyxml folder and run the same
    Code :
    ../../premake-4.3/bin/release/premake4 codeblocks
    then go to Test and, guess what , run
    Code :
    ../../premake-4.3/bin/release/premake4 codeblocks
    and run

    Code :
    codeblocks Test.workspace

    then try to compile the Test project and get

    Code :
    ||=== Test, Debug ===|
    ld||cannot find -lglloadD|
    ld||cannot find -lglimgD|
    ld||cannot find -lglutilD|
    ld||cannot find -lglmeshD|
    ld||cannot find -lfreeglutD|
    ld||cannot find -ltinyxml_pmD|
    ||=== Build finished: 6 errors, 0 warnings ===|

    compiling the framework project succeeds but running it results in
    Code :
    You must select a host application to "run" a library...

    i also tried
    Code :
    sudo ldconfig
    which didn't help (and i'm not sure if it was supposed to - i do sometimes fire sudo commands i don't really understand)

    this is my k-th attempt to get the whole thing working and i did have some luck a couple of days ago by trying to compile the contents of Tut 01 Hello Triangle: i got "undefined __gle" something compilation errors but i can't replay them now - i don't remember what i did to get them.

  2. #22
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: tutorial building for "Learning Modern 3D Graphics

    Tyro1: Please take note on how to explain your problem. All3fox has clearly explained all of the steps he has done, and the errors in what he did are plainly evident. This allows me to effectively help him, rather than having to constantly ask him "what are you doing, what errors are you getting, etc."

    then go to Test and, guess what , run
    Test is not for you I will be deleting that directory from future releases. Yes, I know there's a Premake script in there and everything, but it's for testing purposes, not user purposes.

    Note that the instructions don't mention the `Test` directory. Please try to follow the instructions more closely in the future.

    and run

    Code :
    codeblocks Test.workspace
    You skipped some steps. Remember: Premake4 doesn't actually make anything. All it does is generate build files. You still have to use the build files it generates to build that project.

    After each execution of `Premake4`, you are supposed to use your build tools (Code::Blocks in this case) to build the project generated by it. So when you did:

    Code :
    cd //glsdk directory
    ../../premake-4.3/bin/release/premake4 codeblocks

    It should have been followed by:

    Code :
    codeblocks glsdk.workspace

    You build that project, in both debug and release. Only after this step is complete do you go on to build TinyXML. And again, you must load the TinyXML workspace after using Premake, and again you must build it in debug and release.

    Once that's done, you're ready to build the tutorials.

  3. #23
    Junior Member Newbie
    Join Date
    Dec 2011
    Posts
    8

    Re: tutorial building for "Learning Modern 3D Graphics

    Thanks! It nearly worked: i did as you said but when compiling freeglut project in glsdk workspace i got (sorry for partially russian)
    Code :
    ||=== freeglut, Debug ===|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1430|ошибка: «O_RDONLY» undeclared (first use in this function)|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1430|замечание: each undeclared identifier is reported only once for each function it appears in|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1448|ошибка: «F_SETFL» undeclared (first use in this function)|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1448|ошибка: «O_NONBLOCK» undeclared (first use in this function)|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1597|ошибка: «F_OK» undeclared (first use in this function)|
    ||=== Build finished: 5 errors, 0 warnings ===|

    however now when compiling Tut 01 Main in Tutorial1.workspace i get just one single (and expected due to above failure) mistake
    Code :
    ||=== Tut 01 Main, Debug ===|
    ld||cannot find -lfreeglutD|
    ||=== Build finished: 1 errors, 0 warnings ===|

    perhaps you know how to deal with this either? thanks in advance. (the reduced amount of mistakes indicates i've carried out your instructions correctly, right?)

  4. #24
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: tutorial building for "Learning Modern 3D Graphics

    It looks like this is something specific to Linux/Ubuntu with Code::Blocks and FreeGLUT.

    How exactly did you get Code::Blocks installed on Ubuntu? I haven't managed to find a way to do that, so I've only been able to test the Code::Blocks build on Windows with MingW.

    Until I can troubleshoot it, you may want to try using a regular makefile for the SDK rather than Code::Blocks. So use `Premake4 gmake` to create the makefile for the SDK, and then use `make config=...` to build Debug or Release.

    the reduced amount of mistakes indicates i've carried out your instructions correctly, right?
    You're doing everything correctly at this point.

  5. #25
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    645

    Re: tutorial building for "Learning Modern 3D Graphics

    Code::Blocks is a popular and large enough project that I'd expect Ubuntu to have packages for it - perhaps in a add-on package repository?

    F_SETFL should be provided by fcntl.h (for me it is in /usr/include/bits/fcntl.h which is included by /usr/include/fcntl.h). On my system the package glibc-headers provides these files (on Fedora 16), Ubuntu probably has a similarly named package that provides system headers.

    all3fox: Did you post the complete compiler output, specifically: is there no message about a file not being found?

  6. #26
    Junior Member Newbie
    Join Date
    Dec 2011
    Posts
    8

    Re: tutorial building for "Learning Modern 3D Graphics

    How exactly did you get Code::Blocks installed on Ubuntu?
    that was either
    Code :
    sudo apt-get install codeblocks
    or (but i strongly doubt it) compiling from source.

    i seem to have found the place in the manual
    For GNU and makefile-based builds, this is “gmake”. This will generate a makefile. To build for debug, use make config=debug; similarly, to build for release, use make config=release.

    Using the generated build files, compile for both debug and release. You should build the entire solution; the tutorials use all of the libraries provided.
    but going to sleep now (it's past midnight already). Huge thanks for help!

  7. #27
    Junior Member Newbie
    Join Date
    Dec 2011
    Posts
    8

    Re: tutorial building for "Learning Modern 3D Graphics

    Need a little help in here: industriousone.com/premake doesn't respond to me
    Code :
    all3fox@faeton:~$ ping industriousone.com
    PING industriousone.com (204.11.246.1) 56(84) bytes of data.
    ^C
    --- industriousone.com ping statistics ---
    8 packets transmitted, 0 received, 100% packet loss, time 7054ms
    all3fox@faeton:~$
    while isup.me says it's down just for me. So could anyone please download premake4-3 for me (Ubuntu) and share it via something? I decided to make a clean attempt once again because compiling with gmake results in:
    Code :
    all3fox@faeton:~/Tutorial 0.3.7/glsdk$ ../../premake-4.3/bin/release/premake4 gmake
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    /bin/bash: /home/all3fox/Tutorial: No such file or directory
    configure: WARNING: `missing' script is too old or missing
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables... 
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking whether gcc and cc understand -c and -o together... yes
    checking for an ANSI C-conforming const... yes
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for /usr/bin/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -B
    checking whether ln -s works... yes
    checking how to recognize dependent libraries... pass_all
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... gcc3
    checking how to run the C++ preprocessor... g++ -E
    checking for g77... no
    checking for xlf... no
    checking for f77... no
    checking for frt... no
    checking for pgf77... no
    checking for cf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for xlf90... no
    checking for f90... no
    checking for pgf90... no
    checking for pghpf... no
    checking for epcf90... no
    checking for gfortran... no
    checking for g95... no
    checking for xlf95... no
    checking for f95... no
    checking for fort... no
    checking for ifort... no
    checking for ifc... no
    checking for efc... no
    checking for pgf95... no
    checking for lf95... no
    checking for ftn... no
    checking whether we are using the GNU Fortran 77 compiler... no
    checking whether  accepts -g... no
    checking the maximum length of command line arguments... 1572864
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for objdir... .libs
    checking for ar... ar
    checking for ranlib... ranlib
    checking for strip... strip
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC
    checking if gcc PIC flag -fPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking for shl_load... no
    checking for shl_load in -ldld... no
    checking for dlopen... no
    checking for dlopen in -ldl... yes
    checking whether a program can dlopen itself... yes
    checking whether a statically linked program can dlopen itself... no
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    configure: creating libtool
    appending configuration tag "CXX" to libtool
    checking for ld used by g++... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
    checking for g++ option to produce PIC... -fPIC
    checking if g++ PIC flag -fPIC works... yes
    checking if g++ static flag -static works... yes
    checking if g++ supports -c -o file.o... yes
    checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    (cached) (cached) checking how to hardcode library paths into programs... immediate
    appending configuration tag "F77" to libtool
    checking for X... libraries , headers 
    checking for gethostbyname... yes
    checking for connect... yes
    checking for remove... yes
    checking for shmat... yes
    checking for IceConnectionNumber in -lICE... yes
    checking for XF86VidModeSwitchToMode in -lXxf86vm... no
    checking for ANSI C header files... (cached) yes
    checking GL/gl.h usability... yes
    checking GL/gl.h presence... yes
    checking for GL/gl.h... yes
    checking GL/glu.h usability... yes
    checking GL/glu.h presence... yes
    checking for GL/glu.h... yes
    checking GL/glx.h usability... yes
    checking GL/glx.h presence... yes
    checking for GL/glx.h... yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/param.h usability... yes
    checking sys/param.h presence... yes
    checking for sys/param.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking whether time.h and sys/time.h may both be included... yes
    checking for X11/extensions/xf86vmode.h... no
    checking X11/extensions/XI.h usability... yes
    checking X11/extensions/XI.h presence... yes
    checking for X11/extensions/XI.h... yes
    checking X11/extensions/XInput.h usability... yes
    checking X11/extensions/XInput.h presence... yes
    checking for X11/extensions/XInput.h... yes
    checking whether gcc needs -traditional... no
    checking for vprintf... yes
    checking for _doprnt... no
    checking for cos in -lm... yes
    checking for gettimeofday... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating doc/Makefile
    config.status: creating include/GL/Makefile
    config.status: creating include/Makefile
    config.status: creating progs/Makefile
    config.status: creating progs/demos/CallbackMaker/Makefile
    config.status: creating progs/demos/Fractals/Makefile
    config.status: creating progs/demos/Fractals_random/Makefile
    config.status: creating progs/demos/Lorenz/Makefile
    config.status: creating progs/demos/Makefile
    config.status: creating progs/demos/One/Makefile
    config.status: creating progs/demos/shapes/Makefile
    config.status: creating progs/demos/smooth_opengl3/Makefile
    config.status: creating progs/demos/spaceball/Makefile
    config.status: creating src/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    Building configurations...
    Running action 'gmake'...
    Generating Makefile...
    Generating glload/Makefile...
    Generating glimg/Makefile...
    Generating freeglut/Makefile...
    Generating glutil/Makefile...
    Generating glmesh/Makefile...
    Done.
    all3fox@faeton:~/Tutorial 0.3.7/glsdk$ make config=debug
    ==== Building glload (debug) ====
    ==== Building glimg (debug) ====
    ==== Building freeglut (debug) ====
    ==== Building glutil (debug) ====
    ==== Building glmesh (debug) ====
    all3fox@faeton:~/Tutorial 0.3.7/glsdk$ make config=release
    ==== Building glload (release) ====
    ==== Building glimg (release) ====
    ==== Building freeglut (release) ====
    ==== Building glutil (release) ====
    ==== Building glmesh (release) ====
    all3fox@faeton:~/Tutorial 0.3.7/glsdk$ cd ..
    all3fox@faeton:~/Tutorial 0.3.7$ cd tinyxml/
    all3fox@faeton:~/Tutorial 0.3.7/tinyxml$ ../../premake-4.3/bin/release/premake4 gmake
    Building configurations...
    Running action 'gmake'...
    Generating Makefile...
    Generating tinyxml_pm.make...
    Done.
    all3fox@faeton:~/Tutorial 0.3.7/tinyxml$ make config=debug
    ==== Building tinyxml_pm (debug) ====
    all3fox@faeton:~/Tutorial 0.3.7/tinyxml$ make config=release
    ==== Building tinyxml_pm (release) ====
    all3fox@faeton:~/Tutorial 0.3.7/tinyxml$ cd ..
    all3fox@faeton:~/Tutorial 0.3.7$ cd Tut\ 01\ Hello\ Triangle/
    all3fox@faeton:~/Tutorial 0.3.7/Tut 01 Hello Triangle$ ../../premake-4.3/bin/release/premake4 gmake
    Building configurations...
    Running action 'gmake'...
    Generating Makefile...
    Generating ../framework/Makefile...
    Generating Tut 01 Main.make...
    Done.
    all3fox@faeton:~/Tutorial 0.3.7/Tut 01 Hello Triangle$ make config=debug
    ==== Building framework (debug) ====
    ==== Building Tut 01 Main (debug) ====
    all3fox@faeton:~/Tutorial 0.3.7/Tut 01 Hello Triangle$ make config=release
    ==== Building framework (release) ====
    ==== Building Tut 01 Main (release) ====
    all3fox@faeton:~/Tutorial 0.3.7/Tut 01 Hello Triangle$ ./Tut\ 01\ Main
    freeglut (./Tut 01 Main): glXCreateContextAttribsARB not found
    all3fox@faeton:~/Tutorial 0.3.7/Tut 01 Hello Triangle$ ./Tut\ 01\ MainD
    freeglut (./Tut 01 MainD): glXCreateContextAttribsARB not found

    And if i'm doing something wrong again, please tell me. The current mistakes i get are trigured by the last two commands above.

    UPD i scanned this forum and as far as i understand it's worth mentioning that i'm running on ASUS K40IJ notebook with Intel graphics which has kinda bad support for openGL, right?

  8. #28
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: tutorial building for "Learning Modern 3D Graphics

    i scanned this forum and as far as i understand it's worth mentioning that i'm running on ASUS K40IJ notebook with Intel graphics which has kinda bad support for openGL, right?
    Yeah, it looks like Intel didn't attempt to implement GL 3.0 with your integrated chipset (even though they support D3D10). And these tutorials require GL 3.3 to run.

    Sorry about that.

  9. #29
    Junior Member Newbie
    Join Date
    Dec 2011
    Posts
    8

    Re: tutorial building for "Learning Modern 3D Graphics

    thanks a bundle, going to revive my decent desktop machine first.

  10. #30
    Junior Member Newbie
    Join Date
    Dec 2011
    Posts
    8

    Re: tutorial building for "Learning Modern 3D Graphics

    ok, so i revived my desktop which is
    Intel Core 2 Duo smth + motherboard ASUS P5QE + ATI Radeon HD 4870 (with an installed proprietary driver that has OpenGL 3.3.11318 Compatibility Profile Context)
    and is now running a completely clear Ubuntu
    Code :
    all3fox@aldan:$ uname -a
    Linux aldan 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
    so i get Tutorial 0.3.7 and premake4 and make my first attempts to compile in glsdk subdirectory. These attempts fail because of several consequent codeblocks compilation errors (for some i found solutions):
    1) Xlib.h no such file or directory
    Code :
    sudo apt-get install libx11-dev
    2) GL/glu.h No such file or directory
    Code :
    sudo apt-get install libglu1-mesa-dev
    3) this error actually bugged me: codeblocks said "/bin/sh: g++ not found"
    Code :
    sudo apt-get install g++
    4) XInput.h no such file or directory
    Code :
    sudo apt-get install libxi-dev

    and then i hit the fifth error that i had already encountered before:
    Code :
    ||=== freeglut, Debug ===|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1430|ошибка: «O_RDONLY» undeclared (first use in this function)|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1430|замечание: each undeclared identifier is reported only once for each function it appears in|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1448|ошибка: «F_SETFL» undeclared (first use in this function)|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1448|ошибка: «O_NONBLOCK» undeclared (first use in this function)|
    /Tutorial 0.3.7/glsdk/freeglut/src/freeglut_joystick.c|1597|ошибка: «F_OK» undeclared (first use in this function)|
    ||=== Build finished: 5 errors, 0 warnings ===|
    i googled it more aggresively than before but the only decent thing i found was that guys from some other project encountered it a year or so ago and their solution, as far as i understood, was to throw the freeglu_joystick.c out from freeglut.
    here is their debating http://code.google.com/p/box2d/issues/detail?id=77#c10
    i'd be happy to hear any explanations for this but meanwhile i'll try to compile it with gmake.

Posting Permissions

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