Menu

Can't build examples

Help
eklitias
2013-02-19
2013-03-04
  • eklitias

    eklitias - 2013-02-19

    Hello!

    Configuration successfully finishes, but make fails with the following errors:

    $ make                                                                                                                                                           
    Scanning dependencies of target oglplus_example_harness
    [  1%] Building CXX object example/oglplus/CMakeFiles/oglplus_example_harness.dir/glut_main.cpp.o
    In file included from /home/lester/workspace/ogplus/example/oglplus/glut_main.cpp:40:0:
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp: In function ‘int oglplus::example_guarded_exec(Func, std::ostream&)’:
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:111:8: error: expected type-specifier
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:111:25: error: expected unqualified-id before ‘&’ token
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:111:25: error: expected ‘)’ before ‘&’ token
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:111:25: error: expected ‘{’ before ‘&’ token
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:111:27: error: ‘sye’ was not declared in this scope
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:111:30: error: expected ‘;’ before ‘)’ token
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:118:2: error: expected primary-expression before ‘catch’
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:118:2: error: expected ‘;’ before ‘catch’
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:124:2: error: expected primary-expression before ‘catch’
    /home/lester/workspace/ogplus/example/oglplus/example_main.hpp:124:2: error: expected ‘;’ before ‘catch’
    make[2]: *** [example/oglplus/CMakeFiles/oglplus_example_harness.dir/glut_main.cpp.o] Error 1
    make[1]: *** [example/oglplus/CMakeFiles/oglplus_example_harness.dir/all] Error 2
    make: *** [all] Error 2
    

    Manual compiling fails with the same errors:

    $ g++ -std=c++11 glut_main.cpp -I../../utils                                                                                                                  
    In file included from glut_main.cpp:40:0:
    example_main.hpp: In function ‘int oglplus::example_guarded_exec(Func, std::ostream&)’:
    example_main.hpp:111:8: error: expected type-specifier
    example_main.hpp:111:25: error: expected unqualified-id before ‘&’ token
    example_main.hpp:111:25: error: expected ‘)’ before ‘&’ token
    example_main.hpp:111:25: error: expected ‘{’ before ‘&’ token
    example_main.hpp:111:27: error: ‘sye’ was not declared in this scope
    example_main.hpp:111:30: error: expected ‘;’ before ‘)’ token
    example_main.hpp:118:2: error: expected primary-expression before ‘catch’
    example_main.hpp:118:2: error: expected ‘;’ before ‘catch’
    example_main.hpp:124:2: error: expected primary-expression before ‘catch’
    example_main.hpp:124:2: error: expected ‘;’ before ‘catch’
    

    Am I doing something wrong?

     
  • Matus Chochlik

    Matus Chochlik - 2013-02-20

    Hi,

    are you using recent code from the repository ?
    If so the error might be related to std::system_error
    not being defined.
    Either add:

    #include <system_error>

    to the ./example/oglplus/example_main.hpp

    or pull the latest commit from the repo where this
    should be fixed.

    Please let us know if it worked.

     
  • eklitias

    eklitias - 2013-02-20

    >are you using recent code from the repository ?

    I think so, yes. I used

    git clone git://oglplus.git.sourceforge.net/gitroot/oglplus/oglplus ogplus
    

    to get code yesterday. Is this correct?

    >add #include <system_error> to the ./example/oglplus/example_main.hpp

    It totally worked and it's so simple I feel stupid now =) Thank you!

     
  • Matus Chochlik

    Matus Chochlik - 2013-02-20

    No problem, it was our mistake and thanks for reporting it.
    It was patched only a ~hour ago, so you might want to do:

    git reset -hard
    git pull

     
  • eklitias

    eklitias - 2013-02-20

    Got everything working. Thank you for your awesome library.

     
  • Matus Chochlik

    Matus Chochlik - 2013-02-20

    Glad to hear! Thanks.

     

Log in to post a comment.