Responses are in line below with code. Thanks for taking a look! Peace Gary
-- [EMAIL PROTECTED] http://www.babelgraph.org > Hmmm, where did you get this link line from? It looks a little bit odd > to me (but hey! What do I know?) > > > g++ -L/usr/local/lib/libfltk2.a -L/usr/local/lib/libfltk2_gl.a > I was having trouble linking the proper libraries and headers, so just threw in everything I could think of. Don't know much about proper protocol here, thank you. I took them out. > > You didn't mean that, surely? "-L" is used to set the paths, not usually > to point to libs directly. And many compilers (g++ being one) are > sensitive to link order, so libfltk2_gl.a *must* always come before > libfltk2.a. (Although I notice they occur again, in the correct order, > later in the command...) > > > -L/System/Library/Frameworks/OpenGL.framework/Libraries > > -L/usr/local/lib /usr/local/lib/libfltk2_gl.a -framework AGL > > -framework OpenGL /usr/local/lib/libfltk2.a -lpthread -framework > > Does framework AGL come before or after framework OpenGL? I can't > recall... Actually, is link order significant with frameworks? I'm not > sure it is... I'm not sure about this, but I reversed them in the following example and the same error appears. > > > Carbon -framework ApplicationServices -o "BabelGraph-0.2" ./Graph.o > > ./GraphEngine.o ./edge.o ./main.o ./node.o > > /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: > > fltk::GlWindow::init() > > vtable for GraphEngine > > vtable for fltk::GlWindow > > collect2: ld returned 1 exit status > > Not sure: I think you may also need to show us how you compiled your .o > files, and perhaps a little more conext from your source. > > Can you produce a minimal example that shows the same failure? Here is the new error output from the linker: g++ -L/System/Library/Frameworks/OpenGL.framework/Libraries -L/usr/local/lib /usr/local/lib/libfltk2_gl.a -framework OpenGL -framework AGL /usr/local/lib/libfltk2.a -lpthread -framework Carbon -framework ApplicationServices -o "sampleFLTK" ./GraphEngine.o ./main.o /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: fltk::GlWindow::init() vtable for GraphEngine vtable for fltk::GlWindow collect2: ld returned 1 exit status make: *** [sampleFLTK] Error 1 And here is the bit of code that produced the same error, in three files: // filename: main.cpp // contains main function #include <cstdlib> #include "fltk/Window.h" #include <fltk/Widget.h> #include <fltk/run.h> #include "GraphEngine.hpp" using namespace fltk; int main(int argc, char **argv) { Window *window = new Window(700, 500, "Window Sample"); window->begin(); GraphEngine *engine = new GraphEngine (10, 150, 500, 350, 0); window->end(); window->show(); return fltk::run(); } and then the files for GraphEngine... // filename: GraphEngine.hpp #include <fltk/gl.h> #include <fltk/GlWindow.h> #include <fltk/Window.h> class GraphEngine : public fltk::GlWindow{ public : GraphEngine(int X,int Y,int W,int H,const char*L); ~GraphEngine(); private: void draw(); }; and finally..... // filename: GraphEngine.cpp #include "GraphEngine.hpp" GraphEngine::GraphEngine(int X,int Y,int W,int H,const char*L=0) : fltk::GlWindow(X,Y,W,H,L){} void GraphEngine::draw() { // Clear screen glClear(GL_COLOR_BUFFER_BIT); // Draw white 'X' glColor3f(1.0, 1.0, 1.0); glBegin(GL_LINE_STRIP); glVertex2f(w(), h()); glVertex2f(-w(),-h()); glEnd(); } > > > > 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 mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

