interrogate issues

Trying to run interrogate, and get the error message:


F:\dev\FSPandaWrappers>\Panda3D-1.0.3\bin\interrogate -DCPPPARSER -string -refco
unt -assert -python -fnames -DPUBLISHED=__published fractalSplineBoxNode.cxx
      *** Error in fractalSplineNode.h near line 61, column 39:
      parse error
Error parsing file: 'fractalSplineBoxNode.cxx'

Line 61 is as follows:


   FractalSplineNode( const string &name );

The surrounding context lines are:


class EXPCL_FRACTALSPLINEPANDAWRAP FractalSplineNode : public PandaNode, public FractalSpline::RendererCallbacksClass {
PUBLISHED:

   FractalSplineNode( const string &name );
   
	virtual void set_twist( int newtwist )
	{
	  pfractalsplineprimitive->SetTwist( newtwist );
	}

This file #includes “fspandawrapdllsymbols.h”, which should define EXPCL_FRACTALSPLINEPANDAWRAP to nothing.

You can see that I’ve included -string on the commandline, but this just shifted the problem from column 29 to column 39.

All Panda code here (interrogate.exe, headers etc) are from Panda 1.0.3 release.

Hugh

Update:

Using the following commandline now:


\panda3d-1.0.3\bin\interrogate -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32 -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall -DFORCE_INLINING -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const  -module fractalsplinepanda -library libfractalsplinepanda -fnames -string -refcount -assert -python -S\panda3d-1.0.3\include\parser-inc -DBUILDING_FRACTALSPLINEPANDAWRAP -I"f:\program files\microsoft sdk\include" -I"f:\program files\microsoft visual c++ toolkit 2003\include" -I\Panda3D-1.0.3\include -If:\dev\FSDev fractalSplineNode.h fractalSplineBoxNode.cxx

Getting the following error message:


F:\dev\FSPandaWrappers>\panda3d-1.0.3\bin\interrogate -DCPPPARSER -D__STDC__=1 -
D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32 -D"_declspec(param)="
 -D_near -D_far -D__near -D__far -D__stdcall -DFORCE_INLINING -DCPPPARSER -D__ST
DC__=1 -D__cplusplus -D__i386__ -D__const=const  -module fractalsplinepanda -lib
rary libfractalsplinepanda -fnames -string -refcount -assert -python -S\panda3d-
1.0.3\include\parser-inc -DBUILDING_FRACTALSPLINEPANDAWRAP -I"f:\program files\m
icrosoft sdk\include" -I"f:\program files\microsoft visual c++ toolkit 2003\incl
ude" -I\Panda3D-1.0.3\include -If:\dev\FSDev fractalSplineNode.h fractalSplineBo
xNode.cxx
      *** Error in f:\dev\FSDev/PrimitiveInterface.h near line 36, column 2:
      parse error
Error parsing file: 'fractalSplineNode.h'

line 36 is:


   	public: 

but I sortof suspect that this issue isnt really about line 36 :confused:

The lines before this in the file are:


#ifndef _PRIMITIVEINTERFACE_H
#define _PRIMITIVEINTERFACE_H

#include "fsdllsymbols.h"

namespace FractalSpline
{
	 const int ALL_FACES = -1;
	 
   //! Primitive is the base class for FractalSpline Primitive classes
   class EXPCL_FRACTALSPLINE PrimitiveInterface
   {
   	public:     
      virtual void Render() = 0;  //!< Renders primitive to OpenGL at origin

Hugh

I suspect the problem is the namespace declaration. We never bothered to add full support for namespaces to interrogate, since we had to support compilers for Panda3D that did not themselves have namespace support.

David

On reflection, actually, maybe namespaces are supported by interrogate. I don’t honestly remember. If removing the namespace doesn’t help, it must be that the macro isn’t getting defined properly.

You can run interrogate with a -v option to give more information about what it is parsing; that may give some clues.

David

Oooo, yes, you’re right! My bad.

In my dllsymbols.h, I’d put:


#ifdef(_WIN32)
   #ifdef BUILDING_FRACTALSPLINE
      #define EXPCL_FRACTALSPLINE __declspec(dllexport)
   #else
      #define EXPCL_FRACTALSPLINE __declspec(dllimport)
   #endif
#else
  #define EXPCL_FRACTALSPLINE
#endif

instead of something like:


#if defined(_WIN32) && !defined(BUILDING_PYTHONINTERFACES)
   #ifdef BUILDING_FRACTALSPLINE
      #define EXPCL_FRACTALSPLINE __declspec(dllexport)
   #else
      #define EXPCL_FRACTALSPLINE __declspec(dllimport)
   #endif
#else
  #define EXPCL_FRACTALSPLINE
#endif

Great! Thank-you!

Hugh