help with c

J

John

Hi,

I'm trying to compile the opennurbs toolkit and keep getting the
messages shown below. I don't know much about c++, but I would like to
use this package. Any help on getting these errors worked out would be
greatly appreciated. My system is Linux and gcc 4.1.1. Thanks.

John


==============================================
g++ -g -Wall -Wmissing-prototypes -D_GNU_SOURCE -I. -c
opennurbs_3dm_attributes.cpp -o opennurbs_3dm_attributes.o
cc1plus: warning: command line option "-Wmissing-prototypes" is valid
for C/ObjC but not for C++
opennurbs_nurbscurve.h:40: error: extra qualification `ON_NurbsCurve::'
on member `New'
opennurbs_nurbscurve.h:43: error: extra qualification `ON_NurbsCurve::'
on member `New'
opennurbs_nurbscurve.h:46: error: extra qualification `ON_NurbsCurve::'
on member `New'
==============================================
The pertaining lines in the file opennurbs_nurbscurve.h are

class ON_NurbsCurve;
class ON_CLASS ON_NurbsCurve : public ON_Curve
{
ON_OBJECT_DECLARE(ON_NurbsCurve);

public:
/*
Description:
Use ON_NurbsCurve::New(...) instead of new ON_NurbsCurve(...)
Returns:
Pointer to an ON_NurbsCurve. Destroy by calling delete.
Remarks:
See static ON_Brep* ON_Brep::New() for details.
*/
static ON_NurbsCurve* ON_NurbsCurve::New();
static ON_NurbsCurve* ON_NurbsCurve::New(
const ON_NurbsCurve& nurbs_curve
);
static ON_NurbsCurve* ON_NurbsCurve::New(
const ON_BezierCurve& bezier_curve
);
static ON_NurbsCurve* ON_NurbsCurve::New(
int dimension,
BOOL bIsRational,
int order,
int cv_count
);
 
A

Alf P. Steinbach

* John:
I'm trying to compile the opennurbs toolkit and keep getting the
messages shown below. I don't know much about c++, but I would like to
use this package. Any help on getting these errors worked out would be
greatly appreciated. My system is Linux and gcc 4.1.1. Thanks.

John


g++ -g -Wall -Wmissing-prototypes -D_GNU_SOURCE -I. -c
opennurbs_3dm_attributes.cpp -o opennurbs_3dm_attributes.o
cc1plus: warning: command line option "-Wmissing-prototypes" is valid
for C/ObjC but not for C++

Seemingly this relates to the two first lines of code presented below.
In C++ you can't derive from an incomplete type such as ON_NurbsCurve.
Are you sure this is actually C++ code?

opennurbs_nurbscurve.h:40: error: extra qualification `ON_NurbsCurve::'
on member `New'
opennurbs_nurbscurve.h:43: error: extra qualification `ON_NurbsCurve::'
on member `New'
opennurbs_nurbscurve.h:46: error: extra qualification `ON_NurbsCurve::'
on member `New'

Here's something Not Quite Right: there should be four of those error
messages, not just three.

==============================================
The pertaining lines in the file opennurbs_nurbscurve.h are

class ON_NurbsCurve;
class ON_CLASS ON_NurbsCurve : public ON_Curve
{
ON_OBJECT_DECLARE(ON_NurbsCurve);

public:
/*
Description:
Use ON_NurbsCurve::New(...) instead of new ON_NurbsCurve(...)
Returns:
Pointer to an ON_NurbsCurve. Destroy by calling delete.
Remarks:
See static ON_Brep* ON_Brep::New() for details.
*/
static ON_NurbsCurve* ON_NurbsCurve::New();

Remove the qualification.

static ON_NurbsCurve* ON_NurbsCurve::New(
const ON_NurbsCurve& nurbs_curve
);

Remove the qualification.

static ON_NurbsCurve* ON_NurbsCurve::New(
const ON_BezierCurve& bezier_curve
);

Remove the qualification.

static ON_NurbsCurve* ON_NurbsCurve::New(
int dimension,
BOOL bIsRational,
int order,
int cv_count
);

Remove the qualification.
 
J

John

Seemingly this relates to the two first lines of code presented below.
In C++ you can't derive from an incomplete type such as ON_NurbsCurve.
Are you sure this is actually C++ code?

I'm not 100% sure it's c++ code, but the associatef file has a .cpp
extension and it certainly looks like c++ code.
Here's something Not Quite Right: there should be four of those error
messages, not just three.

You are right. There is a fourth error message that got cut off in my
post.
Remove the qualification.

By "remove the qualification" do you mean comment out the whole line or
remove the New?

Thanks,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top