Author Topic: Building FLTK with Code::Blocks/ mingw  (Read 458 times)

Offline nji

  • Multiple posting newcomer
  • *
  • Posts: 40
Building FLTK with Code::Blocks/ mingw
« on: April 15, 2020, 02:31:21 pm »
Hello.
I'm still new to CB etc. (coming from VS) and did fairly good
with the standard installation (still 16.02).
Now I wanted to use FLTK for smaller executables,
but am not successful in generating it.

The installation instruction for fltk is in
README.MSWindows.txt

There it says to configure fltk by typing "configure" in a
dos box opened in the fltk directory.
But in whole CB/ mingw there is no "configure" so similar.

Same with make.
So I chose mingw32-make
But this gave an error
Makefile:19: makeinclude: No such file or directory

Why must be there hurdles in the most simplest things?
In VS I double-click the solution file, build, done.

Please help.

Offline sodev

  • Regular
  • ***
  • Posts: 382
Re: Building FLTK with Code::Blocks/ mingw
« Reply #1 on: April 15, 2020, 04:49:13 pm »
You need to differentiate between two things: building the library and using the library. First you need to build the library and it is very unlikely that it ships with project files for CodeBlocks like it does for Visual Studio. The next difference is that CodeBlocks is not bound to a specific compiler like Visual Studio, you can even use the Visual Studio compiler with CodeBlocks! If you are doing this you are already done with step one, you can use the library you created with the Visual Studio project files.

But it seems like you are not doing this but instead use GCC? Unfortunately you have to compile the library first and that most probably not by using CodeBlocks. The instructions you refer sound like they are for a posix like environment like MSYS2. I don't know if they also ship pregenerated Makefiles or offer some other way to build with native tools only, you have to refer to their documentation and better ask in their forums for help.

If you need help integrating the library into a CodeBlocks project you can get help here.

Offline nji

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building FLTK with Code::Blocks/ mingw
« Reply #2 on: April 15, 2020, 06:04:18 pm »
Please excuse if my description was not clear enough.

I just want to make FLTK usable in CB.
And I know I have to build FLTK for that.

I use CB 16.0.2 with mingw.
I did not expect that FLTK includes CB projects for its build process.
But it includes makefiles of course.
And I had expected that these makefiles can be used by
mingw tools (mingw32-make etc.).

But sadly the mingw tools seems not sufficient for building FLTK.
As there is need for a "pre makefile" step = configuration step.
And for this step there seems to be necessary additional tools
(like autoconf or cmake if I get it right).

These are MANY steps (let me call them hurdles ;-)
for someone coming from the convenient "VS paradise".
Moreover the documentation is completely unsufficient, incomplete.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6911
    • My Best Post
Re: Building FLTK with Code::Blocks/ mingw
« Reply #3 on: April 15, 2020, 06:46:14 pm »
Code::Blocks is an IDE/Editor it is not a Compiler!!!!!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6911
    • My Best Post
Re: Building FLTK with Code::Blocks/ mingw
« Reply #4 on: April 15, 2020, 06:48:05 pm »
Please read the directions for FLTK and ask questions about them at another website!
Please read and follow the rules for this website!
http://forums.codeblocks.org/index.php/topic,9996.0.html

Quote
3. Is your problem library, framework specific? There are appropriate forums for it, not the Code::Blocks forum.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline nji

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building FLTK with Code::Blocks/ mingw
« Reply #5 on: April 15, 2020, 06:53:28 pm »
Very well.
I just thought that if CB is shipped with mingw
the problems that arise when trying to use a favoured lib (FLTK) should be of any interest?

mingw/ gcc is a compiler it is not an IDE/ Editor.

THIS is just that kind of arrogance of open source scene
that will keep the scene low ... until the end.
Bravo!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6911
    • My Best Post
Re: Building FLTK with Code::Blocks/ mingw
« Reply #6 on: April 15, 2020, 06:59:24 pm »
Very well.
I just thought that if CB is shipped with mingw
the problems that arise when trying to use a favoured lib (FLTK) should be of any interest?

mingw/ gcc is a compiler it is not an IDE/ Editor.

THIS is just that kind of arrogance of open source scene
that will keep the scene low ... until the end.
Bravo!

And, you are just the type of ignorant newbie that resulted in me suggesting Code::Blocks not ship with a compiler!

Edit: People like you who can not understand directions are not easy for any group to help.
Code::Blocks has never shipped with either msys or msys2 which your directions likely mentioned.

Tim S.
« Last Edit: April 15, 2020, 07:02:07 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline nji

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building FLTK with Code::Blocks/ mingw
« Reply #7 on: April 15, 2020, 07:16:25 pm »
I understand what you mean.
Sorry if I offended.

But do you understand what I mean?

All this open source tool chain becomes so unconvenient to use
(especially for the ones that want to migrate from M$ finally).
And even more if you "pull the parts of the chain apart" even more.
For just a simple task to build a simple GUI app.

Yes, probably you are right, the best place for my question would be
the forum of fltk.
(Where I would get the info that mingw alone is not sufficient for
building it ... need even more additional tools ... without end).

But maybe it's not the worst idea to offer some info about that
in CB context ... as it uses these compilers and libs.

Make it more convenient or you will shrink to nothing.
Which would be sad, and leave the place for $$.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6911
    • My Best Post
Re: Building FLTK with Code::Blocks/ mingw
« Reply #8 on: April 15, 2020, 07:30:01 pm »
Did you even read the directions or this website rules?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline nji

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building FLTK with Code::Blocks/ mingw
« Reply #9 on: April 15, 2020, 07:36:42 pm »
I don't understand what your question has to do with all this.

But, no I usually do not read any "directions".
I rely on what feels right.

Asked the other way round:
Did you even read what I try to tell you, Mr. 6823 posts?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6911
    • My Best Post
Re: Building FLTK with Code::Blocks/ mingw
« Reply #10 on: April 15, 2020, 07:49:05 pm »
From https://github.com/ilovezfs/fltk/blob/master/README.MSWindows.txt

Quote
In order to build FLTK from the command line, you need to install the MinGW
environment from www.mingw.org. The graphical installer "mingw-get-inst" can
be downloaded here for free:

  http://www.mingw.org/wiki/Getting_Started

Launch the installer and follow the instructions. In the "Select Components"
dialog, add "C++ Compiler", "MSYS Basic System", and "MinGW Developer Toolkit".
Wait for the installer to finish.

Edit: Add 1.3 directions snippet
https://github.com/fltk/fltk/blob/branch-1.3/README.MSWindows.txt

Quote
    2. Get the latest MinGW toolset. It is recommended that
       you also get the MSYS shell and the msysDTK developer
       toolset.


Please read the directions and maybe you would learn something!

Tim S.
« Last Edit: April 15, 2020, 07:56:21 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6911
    • My Best Post
Re: Building FLTK with Code::Blocks/ mingw
« Reply #11 on: April 15, 2020, 07:51:18 pm »
Since you do not understand how to follow a hyperlink from the rules.

Quote
Finale note: Ignoring these rules may result in the topic being (silently) locked and/or even removed completely without any notice.

In case you wonder why we are so strict: I could say: "Search the forum" - as this has been discussed a lot. To make is short: By law we (the devs/moderators) are responsible for the content of our forum. This means we need to read all posts. If you want us to continue the development of C::B and have the time to answer some of the questions that are really related to C::B, apply the rules above. It's obviously a matter of time for us.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline nji

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building FLTK with Code::Blocks/ mingw
« Reply #12 on: April 15, 2020, 08:02:40 pm »
Sorry, but you still misunderstand me:
I'm not ignoring the rules, I don't read them.
That's a big difference.

Anyhow, thankyou for your hint concerning the topic we're discussing here.

I already read that instructions (for building FLTK), at the first place, since the beginning.
And ... as I already stated many times in this thread ...
they DO NOT WORK.
There is missing the autoconfig, configure, msys or whatever.
And these tools in turn ... yes, no joke ... need other tools ... like perl etc.
Fine-fine!
(To tell the truth I since long have the suspicion that M$ places it's "dementors"
in open source scene. Busy posters ... ;-)

To close this thread by a useful hint.
This (on a private website) does the job:
http://gintasdx.althirius-studios.com/2011/08/tutorial-codeblocks-with-fltk.html

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9594
Re: Building FLTK with Code::Blocks/ mingw
« Reply #13 on: May 05, 2020, 02:59:44 pm »
Some remarks before closing this topic because it got a little "out of control":

1.) FLTK is an external library that does not ship with C::B
2.) C::B only supports using the library
3.) FLTK must either be self-compiled or a pre-compiled version must be used.
4.) To use a pre-compiled version, it usually must have been compiled with the same or at least 100% compatible compiler as using for the project.
5.) There are binary releases of FLTK compatible with MinGW compiler that ships with C::B, google for FLTK DevPak
6.) If you self-compile FLTK that this is not the right forum to ask for. Please ask in the FLTK forum. We only support C::B and not each and every external library out there.
7.) If you compiled FLTK right, then the wizard in C::B will work, but you _may_ need to adjust the path's to the lib, and maybe even the lib names in the project settings. It again depends on how you compiled it and there are many ways.

8.) One thing must be clear: We cannot and therefore will not make everything convenient and easy to handle. There are hundreds of compilers and tenth of thousands of libraries out there. How should be make all of these convenient for everybody? Mission impossible!

Closing the topic now.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ