FLTK logo

Re: [fltk.general] Installing FLTK with Mingw in Windows

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 ]

Re: Installing FLTK with Mingw in Windows Theodore Sep 19, 2020  
  Thanks Greg!
Indeed I took the idea of a build subfolder from another reply of yours.
I chose the "configure" path because I was thinking to use Make instead of CMake, I have the impression that it's a simpler tool for simpler projects.
But if you say that CMake is the future... then I have to think again...

On Saturday, September 19, 2020 at 8:27:01 PM UTC+2 Greg Ercolano wrote:
On 2020-09-19 09:14, Theodore wrote:
> Hi everyone!
>
> I followed the steps from the README.Windows file and I succeded installing FLTK from an Msys2 shell with the commands:
> ./configure
>  make

You can probably just stop there and skip the 'make install', as the libs and examples will
already be built at this point, and sitting in that same FLTK folder, e.g.

C:\Program Files\fltk-1.4.x\lib\* -- the constructed lib files
C:\Program Files\fltk-1.4.x\test\*.exe -- the constructed test programs

'make install' will just copy the libs into a more generalized place.
I can't remember where that is in Windows, but in unix it's usually
/usr/local/{bin,lib,include,...}.

> The problem is I don't know there where they are installed.

See above, after 'make' the libs will be in .\lib\* and test programs in .\test\*.exe
if you used configure.

> I was in the path C:\Program Files\fltk-1.4.x
> So I assumed I installed them on this path.

You don't have to use 'make install' if you want the built libs+examples
to be in that C:\Program Files\fltk-1.4.x path.

If you use configure, the libs would be in ./lib/*, test programs in ./test/*.exe, etc.
If you use cmake, the libs would be in ./lib/*, test programs in ./bin/test/*, etc.

> But then I read on https://fltk.gitlab.io/fltk/intro.html this:
> === quote ===
>
> Then Msys will "install" the libraries to where it thinks the path "/usr/local/" leads to. If you only ever build code from within the Msys environment this works well, but the actual "Windows path" these files are located in will be something like "C:\msys\1.0\local\lib", depending on where your Msys installation is rooted, which may not be useful to other tools.

Ya, you don't have to use 'make install' or any of that 'local' stuff.
That's only useful if you're using other packages that build against FLTK
and want to look in a 'standard' place for it.

> If you want to install your built FLTK libraries in a non-standard location you may do:
> sh configure --prefix=C:/FLTK
> make
>
> === end quote ===
>
> So I created a new subfolder:   "C:\Program Files\fltk-1.4.x\build"

It'd be normal to create a ./build folder as you describe
for building with cmake *instead of configure*, e.g.

cd "C:\Program Files\fltk-1.4.x"
mkdir build
cd build
cmake -G "Unix Makefiles"
make

..to build FLTK.

"configure" and "cmake" are two different ways to configure FLTK to build
with 'make'.

'configure' is the older build technique, which can only be run from the top level
directory, and you might use instead of 'cmake'. But 'cmake' is the way of the future,
and 'configure' is the way of the past (possibly soon to be obsoleted or removed).

So I would advise using cmake. But if you don't have cmake installed, or want
to just use what you've already had success with using configure, you can certainly
use that for now.. just know 'cmake' is the way things are going these days.

> , I moved the "configure" file here and I tried to configure, build and install here.

No, don't move it. 'configure' has to be in the top level dir only, and when
you run make, everything is built relative to the top level dir (.\lib, .\test, etc)

It's only with cmake you'd use the empty build directory technique, so that when
you build the library, all stuff goes in there, rather than mixed in with the
rest of the library code.

--
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/feb8e2c3-fabf-41dc-a1ae-3795b6fc3e21n%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'.