I pulled the latest change and compiled it, and it didn't link.  To give
away the ending, I've taken the liberty of pushing a fix that works here,
which I hope will be satisfactory to everybody.

The error message is:

src/document/io/LilyPondExporter.o: In function
`Rosegarden::LilyPondExporter::readConfigVariables()':
/home/tehom/projects/rosegarden/rosegarden/src/document/io/LilyPondExporter.cpp:139:
undefined reference to `Rosegarden::LilyPondExporter::REPEAT_VOLTA'
/home/tehom/projects/rosegarden/rosegarden/src/document/io/LilyPondExporter.cpp:139:
undefined reference to `Rosegarden::LilyPondExporter::REPEAT_UNFOLD'
collect2: ld returned 1 exit status
make: *** [rosegarden] Error 1

and I'm using:

g++ (Debian 4.3.5-4) 4.3.5
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE


What seems to be going on is that the compiler wants to see actual objects
for REPEAT_VOLTA and REPEAT_UNFOLD, and it doesn't think the definitions
in class LilyPondExporter suffice.  IIRC, different C++ compilers treat
them differently.  So what didn't work here probably worked elsewhere.

REPEAT_BASIC actually succeeds, maybe because it's used differently. 
There are a number of "class constants" defined in LilyPondExporter, but
only REPEAT_UNFOLD and REPEAT_VOLTA are used conditionally.

Several potential fixes presented themselves:
 * Make them real objects by moving their definitions into
LilyPondExporter.cpp
 * Fix just the conditional, perhaps by declaring "unsigned int
repeat_volta = REPEAT_VOLTA; " etc and using that.
   * Con: Leaves a potential problem lurking for us.
   * Con: I'm uncertain that that solves it, without actually coding and
compiling it.
 * Change those constants to enumerations, which the compiler doesn't
mistake for objects.
   * Pro: Enumeration seems to be their intent.  They step upwards from 0
and enumerate distinct cases.

The last one made the most sense to me.  I left the enumerations
anonymous, since they are not used as types AFAICT.

        Tom Breton (Tehom)



------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to