Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any up-to-date documentation of how to build fltk with NX11? #34

Open
Mathias-Fuchs opened this issue Jul 28, 2019 · 11 comments
Open

Comments

@Mathias-Fuchs
Copy link

Hello!
I'd be great if there were ... the most recent information on that topic I've found is this one https://www.fltk.org/articles.php?L1352 from 2014, despite fltk being advertised prominently on the README.md of this repository .. are the instructions given there still valid?
Thanks for info and/or adding a few words on the topic!
Mathias

@georgp24
Copy link
Collaborator

In the doc/html directory there is a faq2.html file which also describes how to build different versions of fltk for NX11.

@Mathias-Fuchs
Copy link
Author

Thanks, ... I saw it and read it but I'm having a few issues:

  • the file config.fltk it recommends to use is in the "deprecated" folder ... so what is the current version?
  • the path to the X11 headers seems to be wrong: I guess it's nx11/X11-local/X11 rather than something like nxlib/X11 as it says in the faq2.html?
  • despite using that config file and following the instructions and playing with the SHAREDLIBS option it does not build either a static library libNX11.a nor a dynamic one libNX11.so ... instead, after building with that configuration, all that ends up in src/lib are the files
    libmwengine.a libnano-X.a libnano-X.so
    so that fltk complains about missing NX11.
    Any ideas? Thanks.

@georgp24
Copy link
Collaborator

I am sorry my documentation was correct up to last December. Greg has moved and modified files since then. Maybe he can provide new documention.

@Mathias-Fuchs
Copy link
Author

ok, thanks ... would be great to have new doc on that topic.

@georgp24
Copy link
Collaborator

georgp24 commented Aug 1, 2019

Do you want to run FLTK on Linux or what are your plans with NX11 and FLTK?

In the current config file there is a switch "NX11 = Y" which must be set to get an NX11 libary:
Libraries to build: microwin, nano-X, nxlib, engine
MICROWIN = Y
NANOX = Y
NUKLEARUI = Y
NX11 = Y

Also the switch "ARCH = MACOSX" is probably only useful for Greg who develops on his Mac. Look into the Arch.rules file for valid options, e.g. LINUX-NATIVE

@ghaerr
Copy link
Owner

ghaerr commented Aug 2, 2019

I have updated the microwindows/doc/html/faq2.html documentation concerning the path changes to finding the NX11 library. In summary, set NX11=Y in the config file, and FLTK is configured on a system not configured for X11, then point the FLTK includes to the NX11 local versions, which are at microwindows/src/nx11/X11-local/X11, and follow the rest of Georg's instructions in the FAQ. The -lX11 and -lXext libraries in the FLTK makefiles need to be replaced with -lNX11 and -lnano-X.

Let me know if you have other build problems, we're glad to help.

@georgp24
Copy link
Collaborator

georgp24 commented Aug 2, 2019

Martin,
I tested the FLTK build and the documentation and it works as described now. If you develop on Linux you have to modify the config file in the src directory to:
ARCH = LINUX-NATIVE
and
INCFT2LIB = /usr/include/freetype2

@georgp24
Copy link
Collaborator

georgp24 commented Aug 3, 2019

Mathias,
the faq2 file is now current and I hope you will have a chance to test the build again. I got it to work following these instructions.
What project do you plan to use Microwindows and FLTK for?

Georg

@Mathias-Fuchs
Copy link
Author

Mathias-Fuchs commented Aug 14, 2019

Hello Georg,
sorry for late answer .... thanks for updating faq2.html!
Yes, I'm trying to build fltk on a debian-based SOC that doesn't have X11 (well it does, but I want to get rid of it ...)
After copying Configs/config.linux-fb to config and setting NX11=Y (and setting the freetype2 path) I get the following error when make'ing:
make[1]: *** No rule to make target '/home/mathias/Downloads/microwindows/src/obj/nx11/Xinerama.o', needed by '/home/mathias/Downloads/microwindows/src/lib/libNX11.a'. Stop.
so that it still doesn't build NX11 ...
Mathias

EDIT: Uncommenting the line "NXOBJS += Xinerama.o" in the Makefile of the NX11 folder solved that issue ...

@georgp24
Copy link
Collaborator

I am sorry, I forgot to commit the xinerama.c file in my last commit and therefore the NX11 library did not build. Uncommenting the line in the Makefile as you have done should have generated a working version for FLTK.
I just made a new commit which includes xinerama.c. I tested NX11 now and it will work with FLTK as described in the faq2.html file.

Georg

@georgp24
Copy link
Collaborator

If you are looking for a very small Linux distro you may try my Nanolinux :) This is based on Tinycore Linux, NX11 and FLTK.
https://sourceforge.net/projects/nanolinux/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants