Problem building library in Eclipse

I am trying to create a new control in G4P that uses the PeasyCam library but I am getting errors when I try and build G4P.

Here is part of the code that I am trying to build

pcam = new PeasyCam(theApplet, view, (double) dist);
pcam.lookAt(lookAt.x, lookAt.y, lookAt.z);
pcam.setViewport((int)x, (int)y, (int)width, (int)height);

When I try to build it I get the following messages

    [javac] /Users/peter/git/g4p-repos/G4P/tmp/G4P/src/g4p_controls/ error: no suitable constructor found for PeasyCam(PApplet,PGraphics,double)
    [javac] 		pcam = new PeasyCam(theApplet, view, (double) dist);
    [javac] 		       ^
    [javac]     constructor PeasyCam.PeasyCam(PApplet,double,double,double,double) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor PeasyCam.PeasyCam(PApplet,double) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] /Users/peter/git/g4p-repos/G4P/tmp/G4P/src/g4p_controls/ error: cannot find symbol
    [javac] 		pcam.setViewport((int)x, (int)y, (int)width, (int)height);
    [javac] 		    ^
    [javac]   symbol:   method setViewport(int,int,int,int)
    [javac]   location: variable pcam of type PeasyCam
    [javac] 2 errors
    [javac] 19 warnings

The code does not produce syntax errors and runs in Eclipse. I am using the latest version of Processing (3.4) and PeasyCam (302).

I have added the PeasyCam library jar files to the build path as per normal

Eclipse can see the PeasyCam constructors in the editor but not when building it.

Any thoughts please?


My best guess is that you might have included two different versions of the PeasyCam library on your classpath? If I remember correctly, Eclipse orders things slightly differently when you run from Eclipse vs when you export something.


@Kevin thanks for responding to my problem and I have found the solution.

It was interesting that the the build process was quite happy with syntax available in earlier versions of PeasyCam (source code line 2 above) but anything related to the latest version was rejected. It made me think I was linking to some earlier version of PeasyCam. That kept me on the wrong track for hours .

I checked the build path everything that I could, pulled my hair out, racked my brains and finally I decided to go through the file with a fine tooth comb and found the problem.

I hadn’t told Processing to include PeasyCam in the build.

I modified to