FLTK logo

[fltk.general] FLTK on Mac OS X El Capitan installed with brew

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

FLTK on Mac OS X El Capitan installed with brew Adam Mendoza Oct 03, 2016  
 
This very simple program compiles but fails the linker stage.

I installed FLTK with brew install fltk


CODE:
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>

int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(300,180);
Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!");
box->box(FL_UP_BOX);
box->labelsize(36);
box->labelfont(FL_BOLD+FL_ITALIC);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->show(argc, argv);
return Fl::run();
}



OUTPUT:

/Applications/CLion.app/Contents/bin/cmake/bin/cmake --build /Users/adam/Library/Caches/CLion2016.2/cmake/generated/fltk_test-f06748b0/f06748b0/Debug --target all -- -j 8
Scanning dependencies of target fltk_test
[ 50%] Building CXX object CMakeFiles/fltk_test.dir/main.cpp.o
[100%] Linking CXX executable fltk_test
Undefined symbols for architecture x86_64:
  "fl_define_FL_SHADOW_LABEL()", referenced from:
      _main in main.cpp.o
  "Fl::run()", referenced from:
      _main in main.cpp.o
  "Fl_Box::Fl_Box(int, int, int, int, char const*)", referenced from:
      _main in main.cpp.o
  "Fl_Group::end()", referenced from:
      _main in main.cpp.o
  "Fl_Window::show(int, char**)", referenced from:
      _main in main.cpp.o
  "Fl_Window::Fl_Window(int, int, char const*)", referenced from:
      _main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [fltk_test] Error 1
make[1]: *** [CMakeFiles/fltk_test.dir/all] Error 2
make: *** [all] Error 2

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.