×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    18

    Problem using Symbian Libs in Qt

    Hi all
    I have started to use Qt for my symbian programming and it is surely fantastic.But I have a problem and I wish You could help me with it.
    I need to use cryptography algorithms for my application. At first I wanted to try QCA,but sadly,i couldn't compile it for symbian use. My first question is that Is there any way to compile QCA for symbian?
    Next I tried to use openssl. Previously,I was used symbian openssl library(libcrypto.lib) with no problem. But after writing my application with openssl, now I cannot link "libcrypto.lib" to my application at all.
    In normal symbian c++ application,i should add this library to mmp file,but in Qt project,this file will be generated dynamically. So I don't know what I should do. I have used LIBS variable for .pro file and specified my library with it,but it will not be linked to my application yet.
    How I should add this library to my project's configuration for linking?

    Regards

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    18

    Re: Problem using Symbian Libs in Qt

    Hi all
    I should say that I successfully crossed my problem with linking libcrypto.lib to my application.I was using LIBS incorrectly.correct form is here for those ones who will need it:

    LIBS += -llibcrypto

    but I have a new strange problem now.when compiling my application,qmake generates an strange error(it is surely related to use of openssl function in Qt application):

    Code:
    make[1]: *** [\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\Pir\Carbide\workspace\MobileOpenssl\MOBILEOPENSSL_0XE9E78938\WINSCW\udeb\QOpenSsl.o] Error -1073741819
    make[1]: *** Waiting for unfinished jobs....
    make[1]: *** Waiting for unfinished jobs....
    make: *** [TARGETMOBILEOPENSSL_0XE9E78938] Error 2
    any idea what is this error? it is not even shown in problems dialog(it is a compile problem,probably).you can see it only in console,so it took me a while to find there is such a error too...

    Regards

  3. #3
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: Problem using Symbian Libs in Qt

    Quote Originally Posted by Afshin_Pir View Post
    Hi all
    I should say that I successfully crossed my problem with linking libcrypto.lib to my application.I was using LIBS incorrectly.correct form is here for those ones who will need it:

    LIBS += -llibcrypto

    but I have a new strange problem now.when compiling my application,qmake generates an strange error(it is surely related to use of openssl function in Qt application):

    Code:
    make[1]: *** [\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\Pir\Carbide\workspace\MobileOpenssl\MOBILEOPENSSL_0XE9E78938\WINSCW\udeb\QOpenSsl.o] Error -1073741819
    make[1]: *** Waiting for unfinished jobs....
    make[1]: *** Waiting for unfinished jobs....
    make: *** [TARGETMOBILEOPENSSL_0XE9E78938] Error 2
    any idea what is this error? it is not even shown in problems dialog(it is a compile problem,probably).you can see it only in console,so it took me a while to find there is such a error too...

    Regards
    I'm not familiar with libcrypto, so my advice is a bit limited.
    I assume you are trying to link the library in statically in to your application. What are the capabilies in libcrypto ?
    Have you tried dynamic linking instead, if that is all possible?
    Is there any relevant output above those lines ? Like what files it is currently compiling ?
    Can you build this from command line instead of Carbide?

    -Janne

  4. #4
    Registered User
    Join Date
    Mar 2009
    Posts
    18

    Re: Problem using Symbian Libs in Qt

    Quote Originally Posted by jakoskin View Post
    I'm not familiar with libcrypto, so my advice is a bit limited.
    I assume you are trying to link the library in statically in to your application. What are the capabilies in libcrypto ?
    Have you tried dynamic linking instead, if that is all possible?
    Is there any relevant output above those lines ? Like what files it is currently compiling ?
    Can you build this from command line instead of Carbide?

    -Janne
    Hm...
    I have not seen any dynamic version of openssl in Symbian c++ libraries and there is no related output to this error for posting here.
    But I have tried something else and noticed something strange:

    I have made a new console Qt project and linked it with libcrypto and called same API that could make problem in my application.
    But this application compiled,linked and ran with no problem.
    Perhaps qmake doesn't like my class because it is too big... Is there any code size limit for Qt class source codes?

    It seems that there is a bug in qmake that generates this problem.I say this,because I noticed that -1073741819 is equal to 0xC0000005 which is EXCEPTION_ACCESS_VIOLATION exception and qmake probably return it when an exception happens in compiling my main application code.

    Any idea why this happens?(not in mood to debug all qmake to find problem...)

    Regards
    Last edited by Afshin_Pir; 2009-10-17 at 17:56.

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    18

    Re: Problem using Symbian Libs in Qt

    OH,finnaly!!!!!!!!!!!!!!!!!!!!!
    I found what the problem is. It is not related to openssl at all.
    A simple part of code that I was written was incorrect(or correct not even sure anymore) that makes an exception in qmake rather than showing any problem in carbide c++.
    To test this add this simple class to yous code,clean than build to see effect:

    abc.h:
    Code:
    #include <QObject>
    
    class abc : public QObject
    {
    public:
    	abc(){};
    	~abc(){};
    private:
    	void test(QString str)
    	{
    	char *filename = (char*)str;
    	}
    
    };
    check the result

    Regards

  6. #6
    Registered User
    Join Date
    Oct 2010
    Posts
    1

    Re: Problem using Symbian Libs in Qt

    Hello there

    Actually I am facing the same problem adding the library c32.lib when i include c32comm.h to my .cpp, it is always giving me the same error (check bellow)

    I tried in my *.pro file :

    LIBS += -c32

    is there any special place or folder that i must put the library inside ?

    please help

    main.cpp: (.text+0x18): undefined reference to `RCommServ::RCommServ()'
    main.cpp: (.text+0x1e): undefined reference to `RComm::RComm()'
    main.cpp: (.text+0x24): undefined reference to `RCommServ::Connect()'
    main.cpp: (.text+0x30): undefined reference to `RCommServ::LoadCommModule(TDesC16 const&)'
    main.cpp: (.text+0x42): undefined reference to `RComm::Open(RCommServ&, TDesC16 const&, TCommAccess)'
    main.cpp: (.text+0x58): undefined reference to `RComm::Write(TRequestStatus&, TDesC8 const&)'
    main.cpp: (.text+0x88): undefined reference to `RComm::ReadOneOrMore(TRequestStatus&, TDes8&)'
    main.cpp: (.text+0xae): undefined reference to `RComm::ReadOneOrMore(TRequestStatus&, TDes8&)'
    main.cpp: (.text+0xca): undefined reference to `RComm::Close()'

  7. #7
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Problem using Symbian Libs in Qt

    Place an "l" (lower-case "ell") between the "-" and the library name.

Similar Threads

  1. Symbian QT
    By ramyanair in forum News and Announcements
    Replies: 3
    Last Post: 2009-08-14, 18:30
  2. Symbian Signed capabilities problem
    By iulian_moldovan in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 3
    Last Post: 2008-02-29, 08:25
  3. Java TCP server, Symbian Client connection problem
    By ufepuf in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2008-02-23, 19:14
  4. Replies: 3
    Last Post: 2008-01-31, 23:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×