Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User rashm2k's Avatar
    Join Date
    Dec 2011
    Posts
    15
    I'm trying to develop an app for the Nokia N9 and possibly symbian as well. The app relies heavily on web services.

    As a result I have chosen to use Apache Axis2 C to generate XML data bindings to make my life a little easier when dealing with XML. There are no XML data binding tools for Qt.

    Axis2C has 3 different sub-projects it depends on:

    1- Axis utils (bunch of utils used by Axis2c - not a independent project in itself)
    2- Apache Axiom
    3- Apache Neethi

    There is of course my own project that will be calling the webservice - this has been created using the WSDL2C tools which generates C++ XML data bindings.

    What I have done is created shared library projects for each of these in Qt. Then added the Apache source files and compiled the resulting code. They ALL compile successfully.


    When I try to run my app and call a web service - it complains about undefined reference to some method. However when I add the library that I have built it throws a segmentation fault!

    I can't figure out why this is? ALL the libraries are compiled for Harmattann,

    Any help ANYONE can give me would be very very much appreciated!

    EDIT:::

    the libraries I have compiled are C libraries (most of them are .c files not .cpp)
    Last edited by rashm2k; 2012-04-16 at 22:18.

  2. #2
    Registered User conxt's Avatar
    Join Date
    Nov 2011
    Posts
    48
    Do you use Q_DECL_EXPORT in your library code?

  3. #3
    Registered User rashm2k's Avatar
    Join Date
    Dec 2011
    Posts
    15
    Quote Originally Posted by conxt View Post
    Do you use Q_DECL_EXPORT in your library code?
    I don't think so? I have not changed the library code from Apache Axis at at all. Simply copied the .c, .cpp (if there are any) and .h files to my Qt project.

    What exactly is Q_DECL_EXPORT and why would I need it?

    EDIT:::

    Q_DECL_EXPORT appears to be M$ specific... I'm compiling on Linux for the Meego environment.

  4. #4
    Registered User conxt's Avatar
    Join Date
    Nov 2011
    Posts
    48
    Quote Originally Posted by rashm2k View Post
    Q_DECL_EXPORT appears to be M$ specific...
    Not quite. The functions or classes the code of the shared library contains do not become public symbols by themselves that's why thay need to be marked.

    Check your code against this article: http://doc.qt.nokia.com/4.7-snapshot/sharedlibrary.html

  5. #5
    Registered User rashm2k's Avatar
    Join Date
    Dec 2011
    Posts
    15
    Can you please explain this to me? I come from a Java background and I'm still learning Qt/C++ (the language is straight forward - but this kind of stuff just screws everything up!).

    I was under the impression that if a method/class/variable is public then it is accessible to the outside world regardless, why do I need this EXPORT tag?

    Also do I need to add this EXPORT to EVERY SINGLE header in my library?

    Can I just make them ALL visible - so I can at least get around the Segmentation fault?

    How about if I created a static library? I don't care if it's static or shared really as its my own library and no-one else is going to use it.
    Last edited by rashm2k; 2012-04-18 at 09:03.

Similar Threads

  1. a segmentation fault
    By yaohao@nokia in forum Qt
    Replies: 13
    Last Post: 2011-03-18, 05:25
  2. Segmentation Fault?
    By LarryP in forum [Archived] Qt SDKs and Tools
    Replies: 6
    Last Post: 2010-11-17, 18:30
  3. Segmentation fault problem
    By NMMA in forum Qt
    Replies: 8
    Last Post: 2010-06-17, 11:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved