Menu

Compiling samples in linux

Help
crabby
2009-10-31
2012-10-22
  • crabby

    crabby - 2009-10-31

    Hello everyone:

    I'm trying to use g++ to compile the GuidoDisplay.cpp sample code in the
    console. First i placed source code, headers and .so in the same folder, and
    then:

    $ g++ GuidoDisplay.cpp

    but I get an error. It asks me GDevidePostScript.h, which I don't know where
    it is.

    Where is this header? after including it, do I need something else? thanks

     
  • Dominique Fober

    Dominique Fober - 2009-11-03

    Hi,

    The GuidoDisplay.cpp file is provided as a sample code but it is quite
    obsolete now, notably due to the fact that the GDevicePostScript is not
    supported any more. However, the GDevicePostScript.h header is available from
    the repository (or from the src distribution).

    See at: [http://guidolib.svn.sourceforge.net/viewvc/guidolib/trunk/src/tools/]
    (http://guidolib.svn.sourceforge.net/viewvc/guidolib/trunk/src/tools/)

    On linux, you should rather use the Qt framework which is actually the only
    graphic device supported. The Guido / Qt dev kit includes sample code too.

    See at
    http://sourceforge.net/projects/guidolib/files/Qt%20dev.%20kit/guidolib-1.38
    -devkit-Qt/guidolib-1.38-devkit-Qt.tgz/download

    Dominique

     
  • crabby

    crabby - 2009-11-08

    Thank you very much,Dominique!

    I'm now trying to compile the example1 source which comes in the Qt4 dev kit,
    but I ran into some problems again

    Here's what I did:

    • Downloaded both 'guidolib-1.38-devkit-linux-x86' (I'm using Ubuntu 9.10 AMD64) and 'guidolib-1.38-devkit-Qt'
    • In synaptic, installed libqt4-dev - Placed 'libGUIDOEngine.so.1.38' in the 'src' folder, as the README said to.
    • In the 'example1' folder, through the console: qmake example1.pro -> cannot find -lGuidoQt
    • In the 'guidoQt' folder: qmake guidoqt.pro --> 'printf' was not declared in this scope
    • Included stdio.h in GDeviceQt.cpp. Now it works (was that really missing??)
    • Again, in the 'example1' folder: qmake example1.pro --> cannot find -lguidoengine
    • Changed 'libGUIDOEngine.so.1.38' to 'libguidoengine.so'. It compiles (but that wasn't the solution, was it?)
    • ./example1 --> error while loading shared libraries: libGUIDOEngine.so.1.38: cannot open shared object file: No such file or directory

    What am I missing??

    Thanks!

     
  • Christophe Daudin

    Hi,

    • about printf pb in GDeviceQt: the stdio.h was really missing, indeed ! (I didn't need it on my system so I didn't notice this problem)
    • about the libGUIDOEngine: in fact, on Linux, you should build it yourself and not use the binary from guidolib-1.38-devkit-linux-x86. (Actually, this could work but the libGUIDOEngine.so has strong dependencies to the system it was built on, so we recommend that you build it yourself).
    • Download the guidolib-1.38-src.tgz and follow the instructions.
    • After building your libGUIDOEngine.so, run make install. It will copy libGUIDOEngine.so in /usr/local/lib . As you have a x64 system, you must move the libGUIDOEngine.so, libGUIDOEngine.so.1.38, etc... files to /usr/local/lib64. (Note: we'll fix this problem in the next version, so that the files are directly copied in the right place)
    • Finally (!), copy the the libGUIDOEngine.so, libGUIDOEngine.so.1.38, etc... files to the 'devkit-Qt/src' folder.
    • Now, you can build first GuidoQt, and then example1 and the other applications...

    We'll work on that to make in simplier...

    Christophe.

     
  • crabby

    crabby - 2009-11-14

    Yes! Now It worked! It looks pretty cool, specially the second example in the
    window.

    Thank you very much.

     
  • Henry Thacker

    Henry Thacker - 2010-03-18

    Sorry to add to this old thread. Just wanted to give you guys a heads up in
    case a new release is going to be made? I needed to add includes for <stdio.h>
    into the following two files to compile:

    guidolib-1.38-src/src/abstract/ARChord.cpp
    guidolib-1.38-src/src/graphic/GRRest.cpp

     
  • Henry Thacker

    Henry Thacker - 2010-03-18

    Also when running "make install" within the linux subdirectory of
    guidolib-1.38-src, there are two missing files within ../src/include..

    ScoreSymbolMap.h and VScoreSymbolMap.h, both of which can be found within the
    guidolib-1.38-src/misc folder.

     
  • Dominique Fober

    Dominique Fober - 2010-03-19

    talking about the future next release:

    guidolib-1.38-src/src/abstract/ARChord.cpp

    has the stdio dependency removed (uses now iostream only)

    guidolib-1.38-src/src/graphic/GRRest.cpp

    already includes <stdio.h>

    Concerning ScoreSymbolMap.h and VScoreSymbolMap.h :
    with the future release, all the mapping has been redesigned and the
    corresponding header files will disappear.
    It'll break the compatibility with previous versions.
    If you want to have a look at the new design, see the GUIDOScoreMap.h file
    from the branches/mapping branch.
    (http://guidolib.svn.sourceforge.net/viewvc/guidolib/branches/mapping/src/inc
    lude/
    )

     
  • Henry Thacker

    Henry Thacker - 2010-03-19

    Apologies - I should have checked the repository!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.