|
|
On 4/26/21 1:06 PM ken williams wrote:
I just build FLTK 1.4 on my /home path and the Makefile compiled...
Wow.. I didn't though that was a problem :)
Thank you!
################ template makefile ##############
# We don't know what compiler to use to build fltk on this machine - but
fltk-config does...
CXX = $(shell fltk-config --cxx)
# Set the flags for compiler: fltk-config knows the basic settings, then
we can add our own...
CXXFLAGS = $(shell fltk-config --cxxflags) -w -Wall -std=c++14 -O3
-I/home/ken/repos/fltk-1.4.x/ -I/home/ken/repos/fltk-1.4.x/build
-I/home/ken/repos/fltk-1.4.x/build/lib/
Ken, just a remark / warning: I notice that you're using
(a1) CXX = $(shell fltk-config --cxx)
(a2) CXXFLAGS = $(shell fltk-config --cxxflags)
and
(b1) -I/home/ken/repos/fltk-1.4.x/ -I/home/ken/repos/fltk-1.4.x/build
(b2) -I/home/ken/repos/fltk-1.4.x/build/lib/
Note 1: Using (a1,a2) '$(shell fltk-config ...)' means you're using
`fltk-config' from your current PATH (or maybe an alias), whereas you're
using fixed paths in (b1,b2). This is inconsistent and error-prone
because fltk-config in the PATH *may* be different than the paths you're
using in (b1,b2).
Note 2: '$(shell fltk-config --cxxflags)' should already include all
necessary '-I ...' flags, hence adding them again later is unnecessary
and (again) error-prone, at least if they're different.
Maybe one or more of these issues caused the failed builds before, I
don't know. The entire purpose of using fltk-config is *NOT* to code
explicit paths in your Makefile, you should really try to get rid of those.
BTW, if you're willing to learn even more new stuff, I recommend to use
CMake to generate your Makefiles which is much easier than writing
Makefiles manually as you did. Makefiles (either written manually or
generated by CMake) can also be used by VS Code and "easily" be
integrated in VS Code's build and debug features. But that's another
story...
--
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/8b3e6993-3181-55e5-b0f6-1bb927466528%40online.de.
[ Direct Link to Message ] | |
|
| |