How to Install FLTK using CodeBlocks ?

244 views
Skip to first unread message

cvba...@mtu.edu

unread,
Aug 30, 2018, 2:06:18 PM8/30/18
to fltk.general
Hello,
I am new to FLTK and want to install on my computer to develop a GUI. But I wasn't successful installing it correctly. I followed this procedure that was mentioned in this link https://06158621197992422767.googlegroups.com/attach/9641989a1f7eef4c/README-FLTK-WINDOWS.md?part=0.1&view=1&vt=ANaJVrEUPo3tWKPvT5ouKu4ZHmbxBB68KBzYfrafZkay7mInZZgxR-D9cI4ehz054sORqbGgV39t--BNhWWnvTrd_MzFzgMjwAT4jt4LO6BBU2x44np9Ynw

But after running the commands in Command prompt I got an error saying Installing:  
C:/Program Files (x86)/FLTK/include/FL
CMake Error at cmake_install.cmake:36 (file):
  file INSTALL cannot make directory "C:/Program Files
  (x86)/FLTK/include/FL": No such file or directory
Can someone tell me what am I doing wrong over here?

Ian MacArthur

unread,
Aug 30, 2018, 4:32:45 PM8/30/18
to fltkg...@googlegroups.com


> On 30 Aug 2018, at 18:50, cvba...@mtu.edu wrote:
>
> Hello,
> I am new to FLTK and want to install on my computer to develop a GUI. But I wasn't successful installing it correctly. I followed this procedure that was mentioned in this link https://06158621197992422767.googlegroups.com/attach/9641989a1f7eef4c/README-FLTK-WINDOWS.md?part=0.1&view=1&vt=ANaJVrEUPo3tWKPvT5ouKu4ZHmbxBB68KBzYfrafZkay7mInZZgxR-D9cI4ehz054sORqbGgV39t--BNhWWnvTrd_MzFzgMjwAT4jt4LO6BBU2x44np9Ynw


I am not at all familiar with those instructions and some parts of them make me uneasy. In particular, the suggestion to install FLTK into the

C:/Program Files (x86)/FLTK

directory path seems like a *bad* idea to me.

What platform are you on? Some recent WinXX variants can be quite picky about even letting non-priveledged users to write into the C:/Program Files (x86)/ path at all...

I’d strongly advocate for using fltk from some “local” space, not from some privileged system location.


>
> But after running the commands in Command prompt I got an error saying Installing:
> C:/Program Files (x86)/FLTK/include/FL
> CMake Error at cmake_install.cmake:36 (file):
> file INSTALL cannot make directory "C:/Program Files
> (x86)/FLTK/include/FL": No such file or directory
> Can someone tell me what am I doing wrong over here?

Hard to say, but I would advise to install to somewhere else anyway...

Are you especially keen to use code:blocks? There are other IDE that are freely available on Windows that are easy to set up - indeed, fltk Just Works right out of the box with the free Community Edition of VS, so that’s might be the “easiest” option.

I tend to just use mingw and Msys myself, but I’ve never really been that keen on IDE’s anyway... The fltk README’s will guide you in setting up VS or mingw.


Greg Ercolano

unread,
Aug 30, 2018, 4:59:36 PM8/30/18
to fltkg...@googlegroups.com
On 08/30/18 13:32, Ian MacArthur wrote:
>
>
>> On 30 Aug 2018, at 18:50, cvba...@mtu.edu wrote:
>>
>> Hello,
>> I am new to FLTK and want to install on my computer to develop a GUI. But I wasn't successful installing it correctly. I followed this procedure that was mentioned in this link https://06158621197992422767.googlegroups.com/attach/9641989a1f7eef4c/README-FLTK-WINDOWS.md?part=0.1&view=1&vt=ANaJVrEUPo3tWKPvT5ouKu4ZHmbxBB68KBzYfrafZkay7mInZZgxR-D9cI4ehz054sORqbGgV39t--BNhWWnvTrd_MzFzgMjwAT4jt4LO6BBU2x44np9Ynw
>
>
> I am not at all familiar with those instructions and some parts of them make me uneasy. In particular, the suggestion to install FLTK into the
>
> C:/Program Files (x86)/FLTK
>
> directory path seems like a *bad* idea to me.

..or for me, worse than that is this suggestion in that README file:

BAD: - If creating a new fltk project remove subdirectory FL\ from includes.

BAD: #include <FL\Fl.H> becomes #include <Fl.H>


No, that is BAD advice.
That goes against all fltk example code, docs, and public projects.

And the use of backslashes in the example for #includes is wrong too.
The only right way to do an #include for FLTK files, windows or unix,
is e.g.

GOOD: #include <FL/Fl.H>

All that one has to do is set up Microsoft's "/I" compiler flag,
or if GNU G++ is involved, g++'s "-I" flag to point to the directory
that is the parent of the FL/ directory.

Apparently the parent article for that README file is this 2014 article:
https://groups.google.com/forum/#!topic/fltkgeneral/wPdHz2NA2R8

> The fltk README’s will guide you in setting up VS or mingw.

Yes, and for doing a codeblocks setup, I'd look for other articles
as a source.

I know the FLTK docs don't go into codeblocks.. I think only our
README.Unix.txt mentions it. We don't have anything for Windows
in that regard, and perhaps should.
Reply all
Reply to author
Forward
0 new messages