[cairo] Sample Linux Based Program
brian.ewins at gmail.com
Fri Sep 28 05:21:49 PDT 2007
On 28/09/2007, Mukul Sharma <elitecoder.mukul at gmail.com> wrote:
> I have received a lot of help from the list previously which I am very
> thankful for. Using the help, I have managed to exclude the source files not
> needed over T-Engine and have compiled the resulting source over Linux using
> my own makefile. While I was trying to finally run a sample program over
> linux platform using the compiled source files, I somehow did not receive
> any output by running the executable for the sample code. I am sure that I
> am missing something here and my understanding is that Cairo needs some kind
> of binding tool to create a surface over which it draws the graphics.
It would be extremely helpful here if you would post the sample code
you're trying to execute, otherwise we can only guess what you're
doing. When you post that, it will also be helpful to know what
version of cairo you're using (the makefile Marc Singer posted used a
version from April 2006) and what backends are enabled, eg. that
makefile only enabled the image backend.
With the image backend, cairo is writing data to memory, and you have
to copy the bitmap to the screen or save it to a file to see it, eg
> Please correct me if my understanding is wrong and also guide regarding what
> I am missing with my example. As I would need to see an output in ideal
> condition, so in later stages I could consider that as a benchmark. If
> anyone could just provide me with a minimal sample program working on Linux
> Platform with an output visible in graphical form, I would be able to learn
> from it and would be able to build my programs further on around the
> example. I would be very helpful for any help.
Again, we need to see your example to know what is wrong with it.
I know that you're altering the makefile to build with t-engine, but
if you just try building unmodified cairo on any popular linux
distribution, 'make test' will compile and run the test code which
should produce plenty of graphical output. Once you've got that
working, you should try to run this test suite with your cut-down
makefile, since it'll help you figure out what still needs to be
implemented in your port.
Hope this helps,
More information about the cairo