clippoly compile errors

Help
mike
2006-05-17
2013-04-02
  • mike

    mike - 2006-05-17

    Hi all,

    I'd like to use clippoly with ivtools, but am having difficulty getting clippoly to compile.

    # g++ --version
    g++ (GCC) 4.1.0 (SUSE Linux)

    # gcc --version
    gcc (GCC) 4.1.0 (SUSE Linux)

    best,
    mike

    ===================================

    ## make
    g++ -fno-implicit-templates -Wall -g -I. -DGEN_TEMPLATES -c nclip.cc
    ./poly.h:92: error: expected ‘,’ or ‘...’ before ‘*’ token
    ./poly.h:92: error: ISO C++ forbids declaration of ‘Poly’ with no type
    ./poly.h:93: error: expected ‘,’ or ‘...’ before ‘*’ token
    ./poly.h:93: error: ISO C++ forbids declaration of ‘Poly’ with no type
    ./poly.h:97: error: expected ‘,’ or ‘...’ before ‘*’ token
    ./poly.h:97: error: ISO C++ forbids declaration of ‘Poly’ with no type
    ./poly.h:97: error: ‘PolyNode::PolyNode(const Point&, int)’ cannot be overloaded
    ./poly.h:93: error: with ‘PolyNode::PolyNode(const Point&, int)’
    ./poly.h:108: error: ISO C++ forbids declaration of ‘Poly’ with no type
    ./poly.h:108: error: expected ‘;’ before ‘*’ token
    ./poly.h:109: error: ISO C++ forbids declaration of ‘Poly’ with no type
    ./poly.h:109: error: expected ‘;’ before ‘*’ token
    ./poly.h: In constructor ‘PolyNode::PolyNode(const Point&, int)’:
    ./poly.h:94: error: ‘tail’ was not declared in this scope
    ./poly.h:95: error: class ‘PolyNode’ does not have any field named ‘_parent_poly’
    ./poly.h:95: error: ‘parent’ was not declared in this scope
    ./poly.h: In constructor ‘PolyNode::PolyNode(const Point&, int)’:
    ./poly.h:99: error: class ‘PolyNode’ does not have any field named ‘_parent_poly’
    ./poly.h:99: error: ‘parent’ was not declared in this scope
    ./poly.h:99: error: ‘es’ was not declared in this scope
    ./poly.h: In copy constructor ‘Poly::Poly(const Poly&)’:
    ./poly.h:152: error: invalid conversion from ‘Poly* const’ to ‘int’
    ./poly.h:152: error:   initializing argument 2 of ‘PolyNode::PolyNode(const PolyNode&, int)’
    ./poly.h: In constructor ‘Poly::Poly(const Point&, const Poly*, EdgeState)’:
    ./poly.h:158: error: no matching function for call to ‘PolyNode::PolyNode(const Point&, const Poly*&, EdgeState&)’
    ./poly.h:93: note: candidates are: PolyNode::PolyNode(const Point&, int)
    ./poly.h:92: note:                 PolyNode::PolyNode(const PolyNode&, int)
    ./poly.h:91: note:                 PolyNode::PolyNode(const PolyNode&)
    ./poly.h: In constructor ‘Poly::Poly(const Point&)’:
    ./poly.h:162: error: invalid conversion from ‘Poly* const’ to ‘int’
    ./poly.h:162: error:   initializing argument 2 of ‘PolyNode::PolyNode(const Point&, int)’
    ./poly.h: In member function ‘const PolyNode& PolyNode::prevnode() const’:
    ./poly.h:198: error: ‘_parent_poly’ was not declared in this scope
    ./poly.h: In member function ‘const PolyNode& PolyNode::nextnode() const’:
    ./poly.h:204: error: ‘_parent_poly’ was not declared in this scope
    make: *** [nclip.o] Error 1
    ##

     
    • w.weidner

      w.weidner - 2008-01-24

      I had the same problem.

      This can be solved by adding the following line:

      class Poly;

      just before "class PolyNode" (line 69) in poly.h

      Best,
      Wolfgang

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks