Do a 'make distclean' first, and re-run 'configure', then 'make'.

The errors would seem to indicate fltk2 was 'configure'd on a machine
with GL or glut installed, and later this pre-configured code was copied
to another machine without re-running configure.

So run configure again; it should notice GL/glut is not installed, and
then on build, those fatal build errors shouldn't happen. (Warnings may
still happen though)

If you've ever made any hand mods to the fltk2 code, then you'd maybe
better rename it out, and do a clean re-checkout of all the code, to
ensure you're working with a clean code base.

Two things I didn't see you confirm:

        > Did you add error checking to the font calls in the test program I 
posted?

        > Does the 'fonts' program now show Kochi Gothic after you installed it?
          If not, the font might not be in effect until you restart the 
window/font managers.

        > Did you try putting iLeiHi in place of Kochi Gothic, since you know 
that font
          is installed (since the fonts program can see it)



Eric Liao wrote:
> 1. The output of  fltk2-config --ldflags:
> -L/usr/local/lib -lfltk2 -lX11 -lXi -lXinerama -lXcursor -lXft -lpthread
> -lm -lXext -lsupc++
>  
> 2. I didn't use Makefile to compile exmaple programs. I used the
> following command:
> g++ -o fltkhello1 fltkhello1.cxx -I/usr/local/include -L/usr/local/lib
> -lfltk2 -lXext -lXft -lX11 -lXi -lm
> 3. I SVN r6829 execute make. This is the error mesage:
> Compiling template_panel.cxx...
> Compiling undo.cxx...
> Compiling widget_panel.cxx...
> Compiling WidgetClassType.cxx...
> Compiling WidgetType.cxx...
> WidgetType.cxx: In member function ‘const char* WidgetType::array_name()
> const’:
> WidgetType.cxx:1534: warning: suggest parentheses around && within ||
> Compiling WindowType.cxx...
> WindowType.cxx: In member function ‘void
> WindowType::newposition(WidgetType*, int&, int&, int&, int&)’:
> WindowType.cxx:369: warning: suggest explicit braces to avoid ambiguous
> ‘else’
> WindowType.cxx:370: warning: suggest explicit braces to avoid ambiguous
> ‘else’
> WindowType.cxx:371: warning: suggest explicit braces to avoid ambiguous
> ‘else’
> WindowType.cxx:372: warning: suggest explicit braces to avoid ambiguous
> ‘else’
> Linking fluid2...
> === making glut ===
> Makefile:92: makedepend: No such file or directory
> Compiling glut_compatability.cxx...
> Compiling glut_font.cxx...
> /usr/bin/ar cr ../lib/libfltk2_glut.a ...
> Compiling glpuzzle.cxx...
> In file included from ../fltk/glut.h:49,
>                  from glpuzzle.cxx:35:
> ../fltk/gl.h:69:21: error: GL/gl.h: No such file or directory
> glpuzzle.cxx:39:40: error: GL/glu.h: No such file or directory
> In file included from ../fltk/glut.h:49,
>                  from glpuzzle.cxx:35:
> ../fltk/gl.h: In function ‘void fltk::glfillrect(int, int, int, int)’:
> ../fltk/gl.h:92: error: ‘glRecti’ was not declared in this scope
> In file included from glpuzzle.cxx:35:
> ../fltk/glut.h: At global scope:
> ../fltk/glut.h:194: error: variable or field ‘glutUseLayer’ declared void
> ../fltk/glut.h:194: error: ‘GLenum’ was not declared in this scope
> ../fltk/glut.h:326: error: ‘GLenum’ was not declared in this scope
> ../fltk/glut.h:391: error: ‘GLenum’ was not declared in this scope
> ../fltk/glut.h:447: error: expected initializer before
> ‘glutExtensionSupported’
> ../fltk/glut.h:461: error: expected initializer before ‘glutStrokeCharacter’
> ../fltk/glut.h:462: error: expected initializer before ‘glutStrokeWidth’
> ../fltk/glut.h:465: error: expected initializer before ‘glutWireSphere’
> ../fltk/glut.h:466: error: expected initializer before ‘glutSolidSphere’
> ../fltk/glut.h:467: error: expected initializer before ‘glutWireCone’
> ../fltk/glut.h:468: error: expected initializer before ‘glutSolidCone’
> ../fltk/glut.h:469: error: expected initializer before ‘glutWireCube’
> ../fltk/glut.h:470: error: expected initializer before ‘glutSolidCube’
> ../fltk/glut.h:471: error: expected initializer before ‘glutWireTorus’
> ../fltk/glut.h:472: error: expected initializer before ‘glutSolidTorus’
> ../fltk/glut.h:473: error: expected initializer before
> ‘glutWireDodecahedron’
> ../fltk/glut.h:474: error: expected initializer before
> ‘glutSolidDodecahedron’
> ../fltk/glut.h:475: error: expected initializer before ‘glutWireTeapot’
> ../fltk/glut.h:476: error: expected initializer before ‘glutSolidTeapot’
> ../fltk/glut.h:477: error: expected initializer before ‘glutWireOctahedron’
> ../fltk/glut.h:478: error: expected initializer before ‘glutSolidOctahedron’
> ../fltk/glut.h:479: error: expected initializer before ‘glutWireTetrahedron’
> ../fltk/glut.h:480: error: expected initializer before
> ‘glutSolidTetrahedron’
> ../fltk/glut.h:481: error: expected initializer before ‘glutWireIcosahedron’
> ../fltk/glut.h:482: error: expected initializer before
> ‘glutSolidIcosahedron’
> glpuzzle.cxx:132: error: ‘GLint’ does not name a type
> glpuzzle.cxx: In function ‘void drawBox(int, float, float)’:
> glpuzzle.cxx:266: error: ‘glColor3ubv’ was not declared in this scope
> glpuzzle.cxx:267: error: ‘GL_QUADS’ was not declared in this scope
> glpuzzle.cxx:267: error: ‘glBegin’ was not declared in this scope
> glpuzzle.cxx:269: error: ‘glNormal3fv’ was not declared in this scope
> glpuzzle.cxx:283: error: ‘glVertex3f’ was not declared in this scope
> glpuzzle.cxx:286: error: ‘glEnd’ was not declared in this scope
> glpuzzle.cxx:287: error: ‘GL_TRIANGLES’ was not declared in this scope
> glpuzzle.cxx:289: error: ‘glNormal3fv’ was not declared in this scope
> glpuzzle.cxx:303: error: ‘glVertex3f’ was not declared in this scope
> glpuzzle.cxx: In function ‘void drawContainer()’:
> glpuzzle.cxx:411: error: ‘glColor3ub’ was not declared in this scope
> glpuzzle.cxx:412: error: ‘GL_QUADS’ was not declared in this scope
> glpuzzle.cxx:412: error: ‘glBegin’ was not declared in this scope
> glpuzzle.cxx:415: error: ‘glNormal3f’ was not declared in this scope
> glpuzzle.cxx:418: error: ‘glVertex3f’ was not declared in this scope
> glpuzzle.cxx:421: error: ‘glEnd’ was not declared in this scope
> glpuzzle.cxx: In function ‘void drawAll()’:
> glpuzzle.cxx:433: error: ‘GL_MODELVIEW’ was not declared in this scope
> glpuzzle.cxx:433: error: ‘glMatrixMode’ was not declared in this scope
> glpuzzle.cxx:434: error: ‘glLoadIdentity’ was not declared in this scope
> glpuzzle.cxx:435: error: ‘glTranslatef’ was not declared in this scope
> glpuzzle.cxx:436: error: ‘glMultMatrixf’ was not declared in this scope
> glpuzzle.cxx:437: error: ‘glRotatef’ was not declared in this scope
> glpuzzle.cxx:440: error: ‘GL_COLOR_BUFFER_BIT’ was not declared in this
> scope
> glpuzzle.cxx:440: error: ‘GL_DEPTH_BUFFER_BIT’ was not declared in this
> scope
> glpuzzle.cxx:440: error: ‘glClear’ was not declared in this scope
> glpuzzle.cxx:442: error: ‘GL_COLOR_BUFFER_BIT’ was not declared in this
> scope
> glpuzzle.cxx:442: error: ‘glClear’ was not declared in this scope
> glpuzzle.cxx:447: error: ‘glLoadName’ was not declared in this scope
> glpuzzle.cxx: In function ‘void redraw()’:
> glpuzzle.cxx:470: error: ‘GL_PROJECTION’ was not declared in this scope
> glpuzzle.cxx:470: error: ‘glMatrixMode’ was not declared in this scope
> glpuzzle.cxx:471: error: ‘glLoadIdentity’ was not declared in this scope
> glpuzzle.cxx:472: error: ‘viewport’ was not declared in this scope
> glpuzzle.cxx:472: error: ‘gluPerspective’ was not declared in this scope
> glpuzzle.cxx:479: error: ‘glFinish’ was not declared in this scope
> glpuzzle.cxx: In function ‘int selectPiece(int, int)’:
> glpuzzle.cxx:778: error: ‘GLuint’ was not declared in this scope
> glpuzzle.cxx:778: error: expected `;' before ‘selectBuf’
> glpuzzle.cxx:779: error: expected `;' before ‘closest’
> glpuzzle.cxx:780: error: expected `;' before ‘dist’
> glpuzzle.cxx:782: error: ‘selectBuf’ was not declared in this scope
> glpuzzle.cxx:782: error: ‘glSelectBuffer’ was not declared in this scope
> glpuzzle.cxx:783: error: ‘GL_SELECT’ was not declared in this scope
> glpuzzle.cxx:783: error: ‘glRenderMode’ was not declared in this scope
> glpuzzle.cxx:784: error: ‘glInitNames’ was not declared in this scope
> glpuzzle.cxx:787: error: ‘glPushName’ was not declared in this scope
> glpuzzle.cxx:789: error: ‘GL_PROJECTION’ was not declared in this scope
> glpuzzle.cxx:789: error: ‘glMatrixMode’ was not declared in this scope
> glpuzzle.cxx:790: error: ‘glLoadIdentity’ was not declared in this scope
> glpuzzle.cxx:791: error: ‘viewport’ was not declared in this scope
> glpuzzle.cxx:791: error: ‘gluPickMatrix’ was not declared in this scope
> glpuzzle.cxx:792: error: ‘gluPerspective’ was not declared in this scope
> glpuzzle.cxx:796: error: ‘GL_RENDER’ was not declared in this scope
> glpuzzle.cxx:800: error: ‘closest’ was not declared in this scope
> glpuzzle.cxx:801: error: ‘dist’ was not declared in this scope
> glpuzzle.cxx: At global scope:
> glpuzzle.cxx:827: error: expected ‘,’ or ‘...’ before ‘a’
> glpuzzle.cxx:827: error: ISO C++ forbids declaration of ‘GLfloat’ with
> no type
> glpuzzle.cxx: In function ‘void multMatrices(int)’:
> glpuzzle.cxx:833: error: ‘r’ was not declared in this scope
> glpuzzle.cxx:834: error: ‘a’ was not declared in this scope
> glpuzzle.cxx:834: error: ‘b’ was not declared in this scope
> glpuzzle.cxx: At global scope:
> glpuzzle.cxx:843: error: variable or field ‘makeIdentity’ declared void
> glpuzzle.cxx:843: error: ‘GLfloat’ was not declared in this scope
> glpuzzle.cxx:867: error: expected ‘,’ or ‘...’ before ‘src’
> glpuzzle.cxx:867: error: ISO C++ forbids declaration of ‘GLfloat’ with
> no type
> glpuzzle.cxx: In function ‘int invertMatrix(int)’:
> glpuzzle.cxx:871: error: expected `;' before ‘temp’
> glpuzzle.cxx:871: warning: statement has no effect
> glpuzzle.cxx:875: error: ‘temp’ was not declared in this scope
> glpuzzle.cxx:875: error: ‘src’ was not declared in this scope
> glpuzzle.cxx:878: error: ‘inverse’ was not declared in this scope
> glpuzzle.cxx:878: error: ‘makeIdentity’ was not declared in this scope
> glpuzzle.cxx:885: error: ‘temp’ was not declared in this scope
> glpuzzle.cxx:894: error: ‘temp’ was not declared in this scope
> glpuzzle.cxx:903: error: ‘temp’ was not declared in this scope
> glpuzzle.cxx:910: error: ‘temp’ was not declared in this scope
> glpuzzle.cxx: At global scope:
> glpuzzle.cxx:937: error: ‘GLfloat’ has not been declared
> glpuzzle.cxx:937: error: ‘GLfloat’ has not been declared
> glpuzzle.cxx: In function ‘int computeCoords(int, int, int, int*, int*)’:
> glpuzzle.cxx:939: error: ‘GLfloat’ was not declared in this scope
> glpuzzle.cxx:939: error: expected `;' before ‘modelMatrix’
> glpuzzle.cxx:940: error: expected `;' before ‘projMatrix’
> glpuzzle.cxx:941: error: expected `;' before ‘finalMatrix’
> glpuzzle.cxx:942: error: expected `;' before ‘in’
> glpuzzle.cxx:943: error: expected `;' before ‘a’
> glpuzzle.cxx:944: error: expected `;' before ‘top’
> glpuzzle.cxx:945: error: expected `;' before ‘z’
> glpuzzle.cxx:946: error: expected `;' before ‘w’
> glpuzzle.cxx:947: error: expected `;' before ‘height’
> glpuzzle.cxx:951: error: ‘height’ was not declared in this scope
> glpuzzle.cxx:953: error: ‘GL_PROJECTION_MATRIX’ was not declared in this
> scope
> glpuzzle.cxx:953: error: ‘projMatrix’ was not declared in this scope
> glpuzzle.cxx:953: error: ‘glGetFloatv’ was not declared in this scope
> glpuzzle.cxx:954: error: ‘GL_MODELVIEW_MATRIX’ was not declared in this
> scope
> glpuzzle.cxx:954: error: ‘modelMatrix’ was not declared in this scope
> glpuzzle.cxx:955: error: ‘finalMatrix’ was not declared in this scope
> glpuzzle.cxx:959: error: ‘in’ was not declared in this scope
> glpuzzle.cxx:959: error: ‘viewport’ was not declared in this scope
> glpuzzle.cxx:962: error: ‘a’ was not declared in this scope
> glpuzzle.cxx:965: error: ‘b’ was not declared in this scope
> glpuzzle.cxx:966: error: ‘c’ was not declared in this scope
> glpuzzle.cxx:969: error: ‘d’ was not declared in this scope
> glpuzzle.cxx:979: error: ‘top’ was not declared in this scope
> glpuzzle.cxx:980: error: ‘bot’ was not declared in this scope
> glpuzzle.cxx:984: error: ‘z’ was not declared in this scope
> glpuzzle.cxx:989: error: ‘w’ was not declared in this scope
> glpuzzle.cxx: In function ‘void Reshape(int, int)’:
> glpuzzle.cxx:1133: error: ‘glViewport’ was not declared in this scope
> glpuzzle.cxx:1134: error: ‘GL_VIEWPORT’ was not declared in this scope
> glpuzzle.cxx:1134: error: ‘viewport’ was not declared in this scope
> glpuzzle.cxx:1134: error: ‘glGetIntegerv’ was not declared in this scope
> glpuzzle.cxx: In function ‘void keyboard(unsigned char, int, int)’:
> glpuzzle.cxx:1208: error: ‘GL_DEPTH_TEST’ was not declared in this scope
> glpuzzle.cxx:1208: error: ‘glEnable’ was not declared in this scope
> glpuzzle.cxx:1210: error: ‘GL_DEPTH_TEST’ was not declared in this scope
> glpuzzle.cxx:1210: error: ‘glDisable’ was not declared in this scope
> glpuzzle.cxx: In function ‘void motion(int, int)’:
> glpuzzle.cxx:1236: error: cannot convert ‘float*’ to ‘int*’ for argument
> ‘4’ to ‘int computeCoords(int, int, int, int*, int*)’
> glpuzzle.cxx: In function ‘void mouse(int, int, int, int)’:
> glpuzzle.cxx:1264: error: ‘GL_TRUE’ was not declared in this scope
> glpuzzle.cxx:1267: error: ‘GL_FALSE’ was not declared in this scope
> glpuzzle.cxx:1269: error: cannot convert ‘float*’ to ‘int*’ for argument
> ‘4’ to ‘int computeCoords(int, int, int, int*, int*)’
> glpuzzle.cxx:1281: error: ‘GL_FALSE’ was not declared in this scope
> glpuzzle.cxx:1285: error: ‘GL_FALSE’ was not declared in this scope
> glpuzzle.cxx: In function ‘void init()’:
> glpuzzle.cxx:1331: error: ‘GL_FALSE’ was not declared in this scope
> glpuzzle.cxx:1351: error: ‘GL_CULL_FACE’ was not declared in this scope
> glpuzzle.cxx:1351: error: ‘glEnable’ was not declared in this scope
> glpuzzle.cxx:1352: error: ‘GL_BACK’ was not declared in this scope
> glpuzzle.cxx:1352: error: ‘glCullFace’ was not declared in this scope
> glpuzzle.cxx:1353: error: ‘GL_DEPTH_TEST’ was not declared in this scope
> glpuzzle.cxx:1354: error: ‘glClearDepth’ was not declared in this scope
> glpuzzle.cxx:1356: error: ‘glClearColor’ was not declared in this scope
> glpuzzle.cxx:1357: error: ‘GL_LIGHT0’ was not declared in this scope
> glpuzzle.cxx:1357: error: ‘GL_AMBIENT’ was not declared in this scope
> glpuzzle.cxx:1357: error: ‘glLightfv’ was not declared in this scope
> glpuzzle.cxx:1358: error: ‘GL_DIFFUSE’ was not declared in this scope
> glpuzzle.cxx:1359: error: ‘GL_SPECULAR’ was not declared in this scope
> glpuzzle.cxx:1360: error: ‘GL_POSITION’ was not declared in this scope
> glpuzzle.cxx:1363: error: ‘GL_LIGHT_MODEL_LOCAL_VIEWER’ was not declared
> in this scope
> glpuzzle.cxx:1363: error: ‘glLightModelfv’ was not declared in this scope
> glpuzzle.cxx:1364: error: ‘GL_LIGHT_MODEL_TWO_SIDE’ was not declared in
> this scope
> glpuzzle.cxx:1365: error: ‘GL_LIGHT_MODEL_AMBIENT’ was not declared in
> this scope
> glpuzzle.cxx:1366: error: ‘GL_LIGHTING’ was not declared in this scope
> glpuzzle.cxx:1368: error: ‘GL_FRONT’ was not declared in this scope
> glpuzzle.cxx:1368: error: ‘glMaterialfv’ was not declared in this scope
> glpuzzle.cxx:1369: error: ‘GL_SHININESS’ was not declared in this scope
> glpuzzle.cxx:1373: error: ‘GL_FRONT_AND_BACK’ was not declared in this scope
> glpuzzle.cxx:1373: error: ‘glColorMaterial’ was not declared in this scope
> glpuzzle.cxx:1374: error: ‘GL_COLOR_MATERIAL’ was not declared in this scope
> glpuzzle.cxx:1375: error: ‘GL_FLAT’ was not declared in this scope
> glpuzzle.cxx:1375: error: ‘glShadeModel’ was not declared in this scope
> glpuzzle.cxx: In function ‘int main(int, char**)’:
> glpuzzle.cxx:1448: error: ‘GL_VIEWPORT’ was not declared in this scope
> glpuzzle.cxx:1448: error: ‘viewport’ was not declared in this scope
> glpuzzle.cxx:1448: error: ‘glGetIntegerv’ was not declared in this scope
> make[1]: *** [glpuzzle.o] Error 1
> make: *** [all] Error 2
> 
> 
> On Thu, Jul 16, 2009 at 8:12 PM, MacArthur, Ian (SELEX GALILEO, UK)
> <[email protected] <mailto:[email protected]>>
> wrote:
> 
> 
>     > I just installed fltk2 svnr 6829 and rebuilt the Chinese
>     > test program. Sill no correct result.
>     > When I compile fltk2, I always got some error.
>     > To avoid these error, I modified a line in Makefile:
>     >       from "DIRS = src $(LOCALIMAGES) images OpenGL fluid glut test"
>     >    to "DIRS = src $(LOCALIMAGES) images OpenGL fluid".
>     >
>     > Will this modification affect Easter Asia text dispaly?
> 
>     I would not expect so.
>     However, the build should work without modifications, so it might help
>     if you posted some details of what the error is, in case that sheds any
>     light on the problem.
> 
>     Also, what does "fltk2-config --ldflags" report? That might also help
>     show what libs are being linked in.
> 
>     How are you compiling your test program? Do you use a Makefile? If so,
>     can you show us what is in the Makefile?
> 
>     Greg's example should just be built using fltk2-config, like this:
> 
>            fltk2-config --compile foo.cxx
> 
> 
> 
> 
>     SELEX Sensors and Airborne Systems Limited
>     Registered Office: Sigma House, Christopher Martin Road, Basildon,
>     Essex SS14 3EL
>     A company registered in England & Wales.  Company no. 02426132
>     ********************************************************************
>     This email and any attachments are confidential to the intended
>     recipient and may also be privileged. If you are not the intended
>     recipient please delete it from your system and notify the sender.
>     You should not copy it or use it for any purpose nor disclose or
>     distribute its contents to any other person.
>     ********************************************************************
> 
>     _______________________________________________
>     fltk-dev mailing list
>     [email protected] <mailto:[email protected]>
>     http://lists.easysw.com/mailman/listinfo/fltk-dev
> 
> 
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to