aM,
I sent 2 emails to you directly last week....did you not get them? If not, here they are. I'm guessing you may still have multiple libraries on your system (see last part). Let me know if this doesn't help.


aM,
Hmmm...it works fine here. I'm guessing you still may be linking to the previous libgerbv library, since I just added the ability to pass NULL as the transform pointer. You can try make clean, then make install on the gerbv source...you can also try manually deleting the library from your /usr/local directory (or wherever you're installing it to and try compiling the examples again). Worst case, you can just replace the relevant code in the examples you're interested in to:


gerbv_user_transformation_t identityTransform = {0,0,1,1,0,FALSE,FALSE,FALSE};
        thisTransform = &identityTransform;

    /* export the first (and only) image in the project, which will be the
       one we just loaded */
    gerbv_export_rs274x_file_from_image ("example1-output.gbx",
            mainProject->file[0]->image, thisTransform);


Another possible culprit may be multiple libgerbv libraries on your system. You can find out the library location by using:

ldd /usr/local/bin/gerbv (or wherever the gerbv binary is installed)

If you have also installed gerbv using a package on your system (ubuntu, fedora, etc), this may be causing multiple libraries to exist. To fix this, and make the examples use the version you are installing, do this:

        2. If you installed gerbv to "/usr/local" (the default), many
            distributions don't correctly point pkgconfig to this target.
            To fix this, add the following to your ~/.bashrc file:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig/


Hope this helps--



Julian

On 06/22/2010 02:09 AM, a m wrote:
Any idea about the segfaults? They seem to happen in the gerbv_export_rs274x_file_from_image () call.

thanks

On Fri, Jun 11, 2010 at 6:50 PM, a m <makha...@gmail.com <mailto:makha...@gmail.com>> wrote:

    That was quick. I did a [git pull] to grab the changes, ran
    [make], and [make install].
    All of the examples now compile for me. However, all of the
    previously broken ones (1,2,4,5) now give me segmentation faults.

    thanks,
    aM


    On Fri, Jun 11, 2010 at 4:03 PM, Julian Lamb <thepurl...@gmail.com
    <mailto:thepurl...@gmail.com>> wrote:

        aM,
            Thanks for spotting this problem...I guess I missed
        updating the example files when we changed the API
        previously.  I went ahead and fixed it all in git, so please
        update your tree and check out the changes.  Basically, pass
        NULL in for the transform and the function will just use the
        default identity transform.  I think I checked all 6 of the
        examples and they should work now.  Let me know if you find
        otherwise, and feel free to ask any questions regarding
        libgerbv...we're glad to help!

        Cheers--
        Julian

        On 06/11/2010 02:55 AM, a m wrote:
        Julian,

        Thanks for the prompt reply. Ive finally installed all the
        dependencies and was able to build it from source.

        I ran into problems with examples 1, 2, 4, 5. All the same
        thing:
        example5.c:56: error: too few arguments to function
        ‘gerbv_export_rs274x_file_from_image’

        looks like a transform is missing. Whatś a quick way to get
        this working?

        Thanks again, it looks like this library will be perfect.

        aM

        On Tue, Jun 8, 2010 at 5:37 PM, Julian Lamb
        <thepurl...@gmail.com <mailto:thepurl...@gmail.com>> wrote:

            Hi aM,
                It depends on how in-depth you want to go.  We have
            split out "libgerbv" as a separate library you're welcome
            to use in your own applications.  If you download the
            gerbv source from git (see webpage on how to do this),
            look at the /doc/example-code/ directory for a bunch of
            examples on making some command line apps using
            libgerbv.  The rendering code is also accessible with
            libgerv, so you can make fully functional GUI apps with
            it too.
                If you want to just use the regular gerbv program and
            add some specialized functions of your own, that would be
            another option.  Go to /src/interface.c to add any
            buttons or menu entries you want to add, and then place
            the callbacks for those buttons in the /src/callback.c
            file.  You can then put whatever code you want in those
            callback stubs.  There's an example in /doc/example-code
            on how to draw rectangles.  For zooming to specific
            levels, you'll probably just want to look at the
            functions in callbacks.c on how to do that.

            Hack away!
            Julian

            On 06/08/2010 01:36 AM, a m wrote:
            Hello,

            Im wondering how it would be possible for me to zoom in
            on a certain region or a drawing that is specified by
            typing in (x, y, width, height) parameters. Another use
            case would be to draw a box or circle based on the above
            parameters.

            Where would i start to be able to do something like this?

            In general, how scriptable is gerbv? how can i start
            hacking?

            thanks,
            aM


            
------------------------------------------------------------------------------
            ThinkGeek and WIRED's GeekDad team up for the Ultimate
            GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
            lucky parental unit.  See the prize list and enter to win:
            http://p.sf.net/sfu/thinkgeek-promo


            _______________________________________________
            Gerbv-devel mailing list
            Gerbv-devel@lists.sourceforge.net  
<mailto:Gerbv-devel@lists.sourceforge.net>
            https://lists.sourceforge.net/lists/listinfo/gerbv-devel

            
------------------------------------------------------------------------------
            ThinkGeek and WIRED's GeekDad team up for the Ultimate
            GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
            lucky parental unit.  See the prize list and enter to win:
            http://p.sf.net/sfu/thinkgeek-promo
            _______________________________________________
            Gerbv-devel mailing list
            Gerbv-devel@lists.sourceforge.net
            <mailto:Gerbv-devel@lists.sourceforge.net>
            https://lists.sourceforge.net/lists/listinfo/gerbv-devel



        
------------------------------------------------------------------------------
        ThinkGeek and WIRED's GeekDad team up for the Ultimate
        GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
        lucky parental unit.  See the prize list and enter to win:
        http://p.sf.net/sfu/thinkgeek-promo


        _______________________________________________
        Gerbv-devel mailing list
        Gerbv-devel@lists.sourceforge.net  
<mailto:Gerbv-devel@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/gerbv-devel

        
------------------------------------------------------------------------------
        ThinkGeek and WIRED's GeekDad team up for the Ultimate
        GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
        lucky parental unit.  See the prize list and enter to win:
        http://p.sf.net/sfu/thinkgeek-promo
        _______________________________________________
        Gerbv-devel mailing list
        Gerbv-devel@lists.sourceforge.net
        <mailto:Gerbv-devel@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/gerbv-devel




------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo


_______________________________________________
Gerbv-devel mailing list
Gerbv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gerbv-devel
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Gerbv-devel mailing list
Gerbv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gerbv-devel

Reply via email to