FLTK logo

[fltk.general] FLTK as an external dependency in Bazel?

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 as an external dependency in Bazel? Zsolt Pajor-Gyulai Jan 23, 2023  
  I've been trying to integrate FLTK with my Bazel project on a MacOS Ventura 13.0.1. I'm using the following file to test whether I succeeded:
``` - test.cpp
#include <FL/Fl.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Window.H>

int main() {
Fl_Window window(200, 200, "I am a window");
Fl_Box box(0,0, 200, 200, Hello World");
window.show();
return Fl::run();
}
```
If I do 
```
brew install fltk
```
and use a makefile:
```
CC = clang++

CFLAGS = -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -lfltk -lpthread -framework Cocoa

INCLUDE_FLTK = -I/opt/homebrew/Cellar/fltk/1.3.8_1/include
LINK_FLTK = -L/opt/homebrew/Cellar/fltk/1.3.8_1/lib

INCLUDE_GUI = -I/Users/zsolt/Dropbox/Work/Learning/CompSci/C++/PPPuC++/GUI/
LINK_GUI = -I/Users/zsolt/Dropbox/Work/Learning/CompSci/C++/PPPuC++/GUI/

test:
@$(CC) $(INCLUDE_FLTK) $(LINK_FLTK) $(CFLAGS) -o test.out test.cpp
@./test.out
@make clean

clean:
$(RM) *.out
```
then everything works fine and my window pops up. However, if I now try to replicate it in bazel, for example by following this approach, then I can get everything to build successfully with the exception that `Fl::run()` just hangs without producing any output.



t
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/02eb8030-2b04-49ce-9912-ecb100f68014n%40googlegroups.com.
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'.