• Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 564 from 2004/4/15
    Hello,

    I jsut tried to compile and my own 3D engine on MorphOs (3.9, g++ 5).
    That's how I link:
    Code:

    g++ -o example_frist_person example_first_person.o -noixemul -L./ -lGl -lglut -lm -lexdevgfx2


    Everything seems to be fine.
    But when I start the executable, I get the following error:

    Code:

    Work:workspace/ExdevGfx2> example_frist_person
    terminate called after throwing an instance of 'std::ios_base::failure'
    what(): basic_ios::clear
    Program aborted


    Any idea what's going wrong?
    On other platforms it runs well.

    EDIT:
    When I am not linking against gl and glut, I get the following error from ld:
    Code:

    example_first_person.o: In function `main':
    example_first_person.o(.text.startup+0x106): undefined reference to `__tglContext'
    example_first_person.o(.text.startup+0x10e): undefined reference to `__tglContext'
    example_first_person.o(.text.startup+0x112): undefined reference to `TinyGLBase'
    example_first_person.o(.text.startup+0x11a): undefined reference to `TinyGLBase'
    collect2: error: ld returned 1 exit status


    [ Edited by eliot 26.01.2016 - 19:53 ]
    regards
    eliot
  • »26.01.16 - 19:46
    Profile