Results 1 to 4 of 4

Thread: Subversion APIs

  1. #1
    Join Date
    Jan 2010
    Posts
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Subversion APIs

    Hi There,

    I'm having problems and would like some advice, or maybe someone can simply tell me the solution.

    To put you in the picture:

    I have a QT app that currently runs the svn (executable) and reads the standard output and interprets it accordingly. I want to change this to use the svn apis which I thought would be easy but can't seem to compile with QTs default builder. I can compile a small example app with cMake, but I want to use the default builder because it's easier for other developers to keep it maintained.

    So created a project and included paths to the SVN Library and APR library. For snow leopard it was as follow.

    INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/subversion-1 \
    /Developer/SDKs/MacOSX10.6.sdk/usr/include/apr-1

    Now I can include the APIs in my project so I wrote a simple API call.

    #include <QtGui/QApplication>
    #include "svn_client.h"

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    svn_client_ctx_t asd;
    apr_pool_t *pool;
    svn_client_cleanup("/Users/dan/QSubversion/",&asd,pool);

    return a.exec();
    }

    QT recognises all the functions and data type, yeah that was easy.
    Ok, I know that the code may crash during runtime but I can't even get it to compile.
    It throws loads of errors all very similar but it starting with...

    Undefined symbols:
    "_svn_client_delete3", referenced from:
    svn::Client_impl::remove(svn::Targets const&, bool, bool, QMap<QString, QString> const&)in client_modify.o

    Which I don't understand. There is no function called _svn_client_delete3. It seems to be prefixed with an underscore???? Why would it try and link to this?

    Now I have examples that work that are build with cMake and I can build that. I don't really know what the difference is when they all use the same include paths.

    Is there a flag that I need to set for the QT compiler or is it just not possible. Anyone able to help.

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Subversion APIs

    Undefined symbols are typical of linkage that can't locate a particular library. The first step would be to check your path settings and ensure that the libraries you think are needed are actually being found.

    The function in question is likely an internal call, for what it's worth, and therefore isn't documented. You could dump the symbols in your libraries and see if it can be found; this is typically done with 'nm' or the compiler under Linux; Mac probably has its own tools to do the same thing.

  3. #3
    Join Date
    Jan 2010
    Posts
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Subversion APIs

    Cheers, pointed me in the right direction.
    I needed to the following to my .PRO file. However it there a better way of doing this?


    LIBS += /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_client-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_delta-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_diff-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_fs-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_fs_fs-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_fs_util-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_ra-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_ra_local-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_ra_neon-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_ra_svn-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_repos-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_subr-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_swig_ruby-1.dylib \
    /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_wc-1.dylib \
    /usr/lib/libapr-1.dylib \
    /usr/lib/libaprutil-1.dylib

  4. #4
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Thanks
    11
    Thanked 16 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Subversion APIs

    Perhaps pkg-config has support for subversion (I don't know it right now if it works under osx)

Similar Threads

  1. Problem while using the S60 extension APIs and the Qt Mobility APIs
    By sudhir.linux in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd January 2011, 13:48
  2. need help youtube APIs with qt
    By doforumda in forum Newbie
    Replies: 5
    Last Post: 18th November 2010, 21:09
  3. Replies: 2
    Last Post: 24th July 2010, 10:41
  4. QT and Subversion
    By TomASS in forum Qt Tools
    Replies: 1
    Last Post: 18th September 2009, 23:25
  5. APIs and Data structures
    By crazymoonboy in forum Qt Programming
    Replies: 0
    Last Post: 30th September 2008, 08:56

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.