|
From: John R. <ric...@sp...> - 2001-05-28 00:02:26
|
Hello, I am having problems getting the OpenVRMLcore.mcp project to compile under Codwarrior 6. First some results of queries to the CW list and then some snippet's from the warnings for CW savy people. Perhaps just a case of some newbie type questions about C++ since my C++ is rusty...... John F. Richardson ============================================================================= Here are some of the questions I posed to the Codewarrior list and a response from the metrowerks list guru. >In article <3B0...@sp...>, > John Richardson <ric...@sp...> wrote: > >>Hello, >> >>I'm compiling some open source code from source forge. The files were >>developed using Codewarrior 5. I have some compiler questions and some >>newbie type questions on c++. >> >>All the errors in the CPP files involve the functions "isdigit" and >>"free". Any ideas? > >Is there an old library included we change some functions to be inlined >functions and some old libraries will be looking for them or something. >That doesn't sound like this but it could be. > >Also was there a precompiled header included you might need to have a >new precompiled header that can cause problems. > >>There is a .h file and a .g file causing problems. There are large >>numbers of errors like "illegal use of virtual". Any ideas or any ideas >>on what topic to search for in a C++ textbook. Also, "illegal use of >>abstract class". Lastely, "illegal use of const/volatile function >>qualifier sequence". >>Is any of this due to changes between CW5 and CW6? > >Probably not, it is hard for me to guess at this point without more >information. It could be that the .g file is not included in your >project giving you some errors. > >>Then there is this file with a ".g" extension. The problem is with atof, >>strtol and atol. Am I just missing a C library somewhere? > >I don't recall any .g file extension, is the result of YACC or >something? I'm not sure where that is to be mapped to. Maybe it is >mapped as a C source file. > >I can only guess at this. > >Ron > >-- > Get CW 7 Early Access CD >International : write to in...@me... >Subject: Early Access CD please put your Country in the body >US and Canada please use: http://survey.metrowerks.com/wwdc/ > >New CW Newsgroups: codewarrior.java, codewarrior.java.embedded > >Metrowerks - Ron Liechty - MW...@me... ============================================================================= SNIPPETS From the cpp files =================== Error : undefined identifier 'isdigit' System.cpp line 300 if (*s == ':' && isdigit(*(s+1))) Error : undefined identifier 'free' VrmlNodeProto.cpp line 116 free(r->name); Error : illegal implicit conversion from 'const char *const ' to 'char *' VrmlScene.cpp line 209 if (theSystem->loadUrl( urls[i], np, params )) { from VrmlSFVec3f.h =================== Error : declaration syntax error VrmlSFVec3f.h line 32 float operator[](size_t index) const; Error : illegal 'operator' declaration VrmlSFVec3f.h line 33 float & operator[](size_t index); Error : illegal use of 'virtual' VrmlSFVec3f.h line 35 virtual ostream& print(ostream& os) const; similar errors for VrmlSFVec3f.h line 37 virtual VrmlField * clone() const; VrmlSFVec3f.h line 39 virtual VrmlFieldType fieldType() const; VrmlSFVec3f.h line 40 virtual const VrmlSFVec3f* toSFVec3f() const; VrmlSFVec3f.h line 41 virtual VrmlSFVec3f* toSFVec3f(); Error : illegal use of abstract class ('VRMLField::clone() const ') VrmlSFVec3f.h line 55 const VrmlSFVec3f add(const VrmlSFVec3f & vec) const; similar errors for: const VrmlSFVec3f cross(const VrmlSFVec3f & vec) const; const VrmlSFVec3f divide(float number) const; const VrmlSFVec3f multiply(float number) const; const VrmlSFVec3f negate() const; const VrmlSFVec3f normalize() const; const VrmlSFVec3f subtract(const VrmlSFVec3f & vec) const; Error : illegal use of const/volatile function qualifier sequence VrmlSFVec3f.h line 43 float getX() const; similar errors for VrmlSFVec3f.h line 46 float getY() const; VrmlSFVec3f.h line 49 float getZ() const; VrmlSFVec3f.h line 52 const float * get() const; VrmlSFVec3f.h line 61 double dot(const VrmlSFVec3f & vec) const; VrmlSFVec3f.h line 63 double length() const; Then the Vrml97Parser.g errors ============================== Error : undefined identifier 'atof' Vrml97Parser.g line 928 val = atof(f0->getText().c_str()); Error : undefined identifier 'atol' Vrml97Parser.g line 1002 val = atol(i0->getText().c_str()); Error : undefined identifier 'strtol' Vrml97Parser.g line 1003 val = strtol(i1->getText().c_str(), 0, 16); |