Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-22 Thread MacArthur, Ian (Selex ES, UK)
  Thanks for responding, Greg. I made an error writing the report
 from the compiler.
  The code is a copy from the hello.cxx on the fltk.org site.
  The compiler statement actually reads :
 
  /hello.cxx:7: undefined reference to 'Fl_Box::Fl_Box(int, int,
 int, int, char const*)'

Assuming your code is short, post it here.

I'm guessing you have forgotten to include the FL/Fl_Box.H header files...





This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.


___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-22 Thread Albrecht Schlosser
On 22.02.2013 03:09, edgar wrote:

 On 21 Feb 2013, at 20:33, edgar wrote:
   Hi Ian - that fixed it! Thanks!!! I've been able to compile numerous tests 
 and play around with the font size and style.

Here is a different issue:

the fltk-config --complile is not finding FL_Box.

I typed fltk-config --complile hello.cxx

and get an error message  /hello.cxx:7: undefined reference to 
 'FL_Box::Fl_Box(int, int, int, int, char const*)'

It is finding FL_Window but not FL_Box ...

   But it will compile programs that do not require FL_Box.
I am assuming it is located in libfltk.a which is in usr/lib/x86_64-   
 linux-gnu  - Is that correct?

No, according to your previous posting this is not correct!
There you wrote:

  Here is what I did:
 
  tar -xvzf fltk-1.3.2-source.tar.gz
  cd fltk-1.3.2
  ./configure
  make
  #make install

I presume you meant that you did not run make install. That's
fine and is the recommended way for development (recommended
by the fltk developer team). However, if ther is some older
version in the system library/include area (path), then you
may get conflicts, if you don't take care.

   Any suggestions?

Use the /full/path/to/fltk-config (not only fltk-config, as
you wrote above) to compile your test program. This should
pull in all required files from the fltk library you just
compiled (if it is in /full/path/to/...).

However, there's still one small possibility that you might
get the wrong lib when _running_ your app (this is not the
case if you get linker errors as you wrote). To be absolutely
sure you should maybe run configure with --disable-shared so
that the shared libs are not built, but this is the default
anyway.

If you are trying to build fltk from source, as you described,
then you should consider uninstalling the system fltk package
and all fltk versions you may have installed previously,
unless you need fltk for another system-supplied package.

Albrecht

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-22 Thread Albrecht Schlosser
On 22.02.2013 10:44, MacArthur, Ian (Selex ES, UK) wrote:
   Thanks for responding, Greg. I made an error writing the report
 from the compiler.
   The code is a copy from the hello.cxx on the fltk.org site.
   The compiler statement actually reads :

   /hello.cxx:7: undefined reference to 'Fl_Box::Fl_Box(int, int,
 int, int, char const*)'

 Assuming your code is short, post it here.

 I'm guessing you have forgotten to include the FL/Fl_Box.H header files...

Hmm, the error message is a linker error, so the compiling stage
should have passed successfully. Maybe a library version mix, as
I wrote in my other post?

Albrecht

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-22 Thread MacArthur, Ian (Selex ES, UK)

 Hmm, the error message is a linker error, so the compiling stage
 should have passed successfully. Maybe a library version mix, as
 I wrote in my other post?


Oops, oh yeah!





This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.


___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-22 Thread edgar

 If you are trying to build fltk from source, as you described,
 then you should consider uninstalling the system fltk package
 and all fltk versions you may have installed previously,
 unless you need fltk for another system-supplied package.

 Albrecht

Hi Albrecht,

I took your advice.  I wiped everything clean and rebuilt and everything seems 
to be running as it should. There must have been some conflict from a previous 
build. Thanks also to Ian for sending the names of the additional dev packages. 
 That made all the difference!
Best,
Edgar
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-22 Thread edgar
Hi Ian,

Thanks so much for all of the terrific advice. I have a lot of experience using 
Finale and ProTools, but I am new to programming.

 Music applications? You mean like Finale and Sibelius? Or something else?

I teach music theory at a college in Illinois.  I take it you are in the UK?  I 
taught at Christ Church College in Canterbury for a while back in the 90's.

I would like to write some music education applications: nothing nearly as vast 
as Finale or Sibelius, but little programs that parse MIDI into notation or 
vice versa. I have written some algorithmic composition programs and some 
programs that generate tone rows and matrices but nothing too deep.



 Now, assuming you are talking about something like Sibelius, then I'd start=
  by cautioning that may be better looking at some of the options already in=
  that space; Musescore, Rosegarden, Lilypond, etc...

I will check these out!  Thanks for the tip!


 Now, (disclosure time) I actually did write a music score app, for a charit=
 y here that uses music therapy in their work with children and disabled adu=
 lts, and they wanted their own proprietary music scoring tool. (It is propr=
 ietary, so the source is not available.) Scoring music is trickier than it =
 looks...

I spoke to a guy who codes for Auralia who said the same thing.  I guess I have 
my work cut out for me...

BTW, do you know of some simple MIDI programs that are open source for means of 
studying the code?

 Aside: If you consider writing software as a journey, then if the *destinat=
 ion* is more important to you than the journey itself, I'd strongly advocat=
 e getting involved in Musescore and see if you can turn that to your needs.=
  It's a good bit of work, and quite flexible, and they have a usable plug-i=
 n system for custom behaviours.

That sounds great.

 If the *journey* itself is what you are interested in then, yes, go for it =
 and write your own. It'll be fun (for certain interpretations of the word =
 fun at any rate!)


 As regards fonts, I'm currently using Musica (version 3.06 IIRC) and I quit=
 e like it; though there are quite a lot of free music fonts around.

 The free fonts have the advantage that they tend to implement the Unicode c=
 ode points for the music glyphs, and also often implement support for non-W=
 estern and historical symbols.

 The fonts that Sibelius use (and I think Finale) have their glyphs in weird=
 , non-Unicode places, which is a real pain to work with...

 Loading non-standard fonts into fltk apps is not painful.
 Indeed, in most cases you don't even have to install the font (in OSX you j=
 ust put it in the app bundle, in Windows you use AddFontResourceEx(), and u=
 nder Linux you can do, well, several options actually!)

Thanks again.  I hope I can pick your brain as this project develops.
All best,
Edgar Crockett





 
 This email and any attachments are confidential to the intended
 recipient and may also be privileged. If you are not the intended
 recipient please delete it from your system and notify the sender.
 You should not copy it or use it for any purpose nor disclose or
 distribute its contents to any other person.
 


___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-22 Thread Ian MacArthur

On 22 Feb 2013, at 22:16, edgar wrote:
 
 Thanks so much for all of the terrific advice.

You're welcome: we're happy to help!


 I have a lot of experience using Finale and ProTools, but I am new to 
 programming.

Take a look at Musescore and Rosegarden then - they cover a lot of the same 
ground as Finale and ProTools, but are open source, so you can tweak them to 
your needs more.

The workflow is a bit different, in places, but you can do the same things...


 I would like to write some music education applications: nothing nearly as 
 vast as Finale or Sibelius, but little programs that parse MIDI into notation 
 or vice versa.

There's a whole can o' worms hiding in there though: parsing notation into MIDI 
is pretty easy, but parsing MIDI into notation is *hard* as MIDI doesn't retain 
enough information about what was originally notated...

In many cases it just holds a stream of notes, and the voice each is played 
with.
So you need to figure out the time sig, the key, what the parts are, and if 
it's a piano (say) you need to guess whether to notate the notes to the right 
or left hand, and so on...

And then actually getting the notation to layout nicely on the page is just a 
nightmare - I used Sibelius a fair bit (quite a few years ago now!) and it 
always did an OK sort of job laying things out; I didn't realise at the time 
just how hard that actually was to achieve!

In our tool, we looked at embedding meta-data into the MIDI stream to retain 
more of the layout from the original notation, but it wasn't nice. Ended up 
using a version of MusicXML to store the layout information (and it is fairly 
easy to convert that to MIDI to play it anyway...)
Most of the main tools can read/write MusicXML format these days (though none 
have it as their primary format) so it does represent a sort of common format 
for exchanging material between tools.


 Scoring music is trickier than it looks...
 
 I spoke to a guy who codes for Auralia who said the same thing.  I guess I 
 have my work cut out for me...

Yes: have fun!


 BTW, do you know of some simple MIDI programs that are open source for means 
 of studying the code?

Depends what it is you want to do. The MIDI file format is not all that 
complex, so it is pretty easy to read/write the raw files.

That said, I mainly use Portmidi (an open source MIDI lib) to output MIDI data 
these days as it runs on all the platforms I use, and once you get used to its 
API, it works OK for playing stuff in real time.

Or maybe I answered the wrong question?



___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread Ian MacArthur

On 21 Feb 2013, at 02:35, edgar wrote:

 I copied hello.cxx from the docs and compiled but the font comes up tiny-
 definitely not 36 - and does not change when other values are given as 
 arguments. Nor do the fonts change.  If you send me an email address I will 
 send a screenshot with code and the FLTK window.
 
 One note is that the compiler g++ could not locate the Xext library so I 
 removed it from the compile statement. Is the label font size and type
 dependent on the Xext lib?


No lib Xext? I'm surprised fltk works at all...!

I'm guessing you don't have the dev packages installed then. If you don't have 
Xext dev packages, then you are probably missing a load of other good stuff 
too, so that probably does explain the behaviour you are seeing...


 I can rebuild fltk but it was challenging to get the X11 libraries to link up 
 so I would rather find Xext and get it in the right path if that is the 
 problem.

Yes, sounds like you need to install the dev packages.


What system did you say you were on? Is it ubuntu? They seem to have taken the 
whole user focus thing a bit too far in their desktop systems, and they leave 
out a whole pile of dev stuff that you likely need!

From memory... try...

apt-get install libx11-dev
apt-get install libxt-dev
apt-get install libxft-dev
apt-get install libglut3-dev  

Though that list is probably wrong!


Then re-run the fltk configure script from scratch and then rebuild fltk - 
after that, I'd hope things would be better!


___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread edgar

 On 21 Feb 2013, at 02:35, edgar wrote:

  I copied hello.cxx from the docs and compiled but the font comes up =
 tiny-
  definitely not 36 - and does not change when other values are given as =
 arguments. Nor do the fonts change.  If you send me an email address I =
 will send a screenshot with code and the FLTK window.
 =20
  One note is that the compiler g++ could not locate the Xext library so =
 I removed it from the compile statement. Is the label font size and type
  dependent on the Xext lib?


 No lib Xext? I'm surprised fltk works at all...!

 I'm guessing you don't have the dev packages installed then. If you =
 don't have Xext dev packages, then you are probably missing a load of =
 other good stuff too, so that probably does explain the behaviour you =
 are seeing...


  I can rebuild fltk but it was challenging to get the X11 libraries to =
 link up so I would rather find Xext and get it in the right path if that =
 is the problem.

 Yes, sounds like you need to install the dev packages.


 What system did you say you were on? Is it ubuntu? They seem to have =
 taken the whole user focus thing a bit too far in their desktop systems, =
 and they leave out a whole pile of dev stuff that you likely need!

 =46rom memory... try...

 apt-get install libx11-dev
 apt-get install libxt-dev
 apt-get install libxft-dev
 apt-get install libglut3-dev =20

 Though that list is probably wrong!


 Then re-run the fltk configure script from scratch and then rebuild fltk =
 - after that, I'd hope things would be better!

 Hello again,

I installed the packages above as mentioned.  One note according to Ubuntu 
support: libglut3-dev has been replaced. This package has been replaced by 
``freeglut3-dev''. Could this be affecting the fonts?

Anyway, everything installed except libglut3-dev, so I installed freeglut3-dev. 
 I then reconfigured the fltk and rebuilt.
Here is what I did:

tar -xvzf fltk-1.3.2-source.tar.gz
cd fltk-1.3.2
./configure
make
#make install

Does the build require flags before running the configure script?

So fltk runs and I can compile the programs but unfortunately it still does not 
change the labelsize or labelfont. Do I need to include extra libraries in the 
compiler statement?  Here is how I am compiling:

g++ -Wall hellofltk.cxx -I/usr/local/include -L/usr/local/lib -o hellofltk 
-lfltk lXext -lX11 -lm

Thanks.  Please save me from the bloat of Qt or GTK!
edgar
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread Ian MacArthur

On 21 Feb 2013, at 20:33, edgar wrote:
 
 I installed the packages above as mentioned.  One note according to Ubuntu 
 support: libglut3-dev has been replaced. This package has been replaced by 
 ``freeglut3-dev''. Could this be affecting the fonts?

No, that would only affect use of GL and GLUT, not regular font handling...


 Does the build require flags before running the configure script?

Not on a normal system... might need that if your set up is odd in some way, 
but any stock distro would be fine as is.


 So fltk runs and I can compile the programs but unfortunately it still does 
 not change the labelsize or labelfont. Do I need to include extra libraries 
 in the compiler statement?

Yes, from what you have, I'd say you are missing a good few things...


  Here is how I am compiling:
 
 g++ -Wall hellofltk.cxx -I/usr/local/include -L/usr/local/lib -o hellofltk 
 -lfltk lXext -lX11 -lm


OK, first off, you need to read up on fltk-config, there's a HowTo here:

http://www.fltk.org/articles.php?L599


But in summary, if you are compiling a single file, don't do it yourself,
let fltk-config figure it out for you:


  fltk-config --compile my_file.cxx

That way, the right libs should get pulled in...

To find out what the right libs are, try:

 fltk-config --ldstaticflags

And see what gets listed. I'd guess something like...


/path/to/libfltk.a -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11


The kickers there, at least in terms of font handling, are Xft and fontconfig.

Xinerama probably won't matter much, and pthreads and dl you will need once your
code becomes more complex, though probably not for the sample code you are 
testing
right now!




___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread edgar

 On 21 Feb 2013, at 20:33, edgar wrote:
 =20
  I installed the packages above as mentioned.  One note according to =
 Ubuntu support: libglut3-dev has been replaced. This package has been =
 replaced by ``freeglut3-dev''. Could this be affecting the fonts?

 No, that would only affect use of GL and GLUT, not regular font =
 handling...


  Does the build require flags before running the configure script?

 Not on a normal system... might need that if your set up is odd in =
 some way, but any stock distro would be fine as is.


  So fltk runs and I can compile the programs but unfortunately it still =
 does not change the labelsize or labelfont. Do I need to include extra =
 libraries in the compiler statement?

 Yes, from what you have, I'd say you are missing a good few things...


   Here is how I am compiling:
 =20
  g++ -Wall hellofltk.cxx -I/usr/local/include -L/usr/local/lib -o =
 hellofltk -lfltk lXext -lX11 -lm


 OK, first off, you need to read up on fltk-config, there's a HowTo here:

 http://www.fltk.org/articles.php?L599


 But in summary, if you are compiling a single file, don't do it =
 yourself,
 let fltk-config figure it out for you:


   fltk-config --compile my_file.cxx

 That way, the right libs should get pulled in...

 To find out what the right libs are, try:

  fltk-config --ldstaticflags

 And see what gets listed. I'd guess something like...


 /path/to/libfltk.a -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl =
 -lm -lX11


 The kickers there, at least in terms of font handling, are Xft and =
 fontconfig.

 Xinerama probably won't matter much, and pthreads and dl you will need =
 once your
 code becomes more complex, though probably not for the sample code you =
 are testing
 right now!

 Thanks so much Ian!
I will read up and let you know how it goes.  BTW, I am hoping to write
music applications.  Does fltk have any music fonts or libraries dealing with 
music notation?
Best,
Edgar




___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread edgar

 On 21 Feb 2013, at 20:33, edgar wrote:
 Hi Ian - that fixed it! Thanks!!! I've been able to compile numerous tests and 
play around with the font size and style.

  Here is a different issue:

  the fltk-config --complile is not finding FL_Box.

  I typed fltk-config --complile hello.cxx

  and get an error message  /hello.cxx:7: undefined reference to 
'FL_Box::Fl_Box(int, int, int, int, char const*)'

  It is finding FL_Window but not FL_Box ...

 But it will compile programs that do not require FL_Box.
  I am assuming it is located in libfltk.a which is in usr/lib/x86_64-   
linux-gnu  - Is that correct?
 Any suggestions?

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread Greg Ercolano
On 02/21/13 18:09, edgar wrote:

 On 21 Feb 2013, at 20:33, edgar wrote:
  Hi Ian - that fixed it! Thanks!!! I've been able to compile numerous tests 
 and play around with the font size and style.
 
   Here is a different issue:
 
   the fltk-config --complile is not finding FL_Box.
 
   I typed fltk-config --complile hello.cxx
 
   and get an error message  /hello.cxx:7: undefined reference to 
 'FL_Box::Fl_Box(int, int, int, int, char const*)'
 
   It is finding FL_Window but not FL_Box ...

Note the casing on the names: the 'l' in Fl_* should be lowercase. ie:
Fl_Window and Fl_Box,
..and not..
FL_Window and FL_Box.

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread edgar
 On 02/21/13 18:09, edgar wrote:
 
  On 21 Feb 2013, at 20:33, edgar wrote:
   Hi Ian - that fixed it! Thanks!!! I've been able to compile numerous tests 
  and play around with the font size and style.
 
Here is a different issue:
 
the fltk-config --complile is not finding FL_Box.
 
I typed fltk-config --complile hello.cxx
 
and get an error message  /hello.cxx:7: undefined reference to 
  'FL_Box::Fl_Box(int, int, int, int, char const*)'
 
It is finding FL_Window but not FL_Box ...

   Note the casing on the names: the 'l' in Fl_* should be lowercase. ie:
   Fl_Window and Fl_Box,
   ..and not..
   FL_Window and FL_Box.


___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] change labelfont and labelize in fltk 1.3.2

2013-02-21 Thread edgar
 On 02/21/13 18:09, edgar wrote:


 
the fltk-config --complile is not finding Fl_Box.
 
I typed fltk-config --complile hello.cxx
 
and get an error message  /hello.cxx:7: undefined reference to 
  'FL_Box::Fl_Box(int, int, int, int, char const*)'
 
It is finding FL_Window but not FL_Box ...

   Note the casing on the names: the 'l' in Fl_* should be lowercase. ie:
   Fl_Window and Fl_Box,
   ..and not..
   FL_Window and FL_Box.

 Thanks for responding, Greg. I made an error writing the report from the 
compiler.
 The code is a copy from the hello.cxx on the fltk.org site.
 The compiler statement actually reads :

 /hello.cxx:7: undefined reference to 'Fl_Box::Fl_Box(int, int, int, int, 
char const*)'

  Other suggestions? By the way - I am enjoying your cheat sheet tutorials.
Edgar

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk