×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    21

    Symbian GUI application and OpenC

    Hi all

    I need help in such question - is it ever possible to use OpenC in the standard Symbian GUI application (S60 3rd edition)?
    I mean to use stl and boost in the application, which is based on standard GUI framework(E32Main looks like this
    TInt E32Main()
    {
    return EikStart::RunApplication(NewApplication));
    }
    I have very strange behaviour during debigging such project - debugger runs into some functions which I don't call at all, aplication crashes in some places which did not crash before using OpenC etc.
    I have read Getting started with Open C and Getting started with The Standard C++ Library articles, set all settings but it did not help
    Is it possible to use OpenC in that way?
    What can be a reason of such behaviour?
    (One more note - I link static library also written with help of Openc to my application)

    Will be thankful for any help - that strabge problems make me crazy

  2. #2
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Symbian GUI application and OpenC

    It is certainly possible.

    I would first check that you have "LIBRARY libc.lib" in your MMP file so the linker doesn't accidentally and implicitly link to incompatible compiler runtime support libraries for standard C library functionality.

    Lauri

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    21

    Re: Symbian GUI application and OpenC

    Thank you for answer

    Yes, my mmp file contains reference to libc.lib library, so it cannot be a reason of problem

  4. #4
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Symbian GUI application and OpenC

    Ok, please post your mmp file anyway - it's a good starting point for investigation.

    Lauri

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    21

    Re: Symbian GUI application and OpenC

    Ok
    It is my mmp file
    Actually it is based on the one of examples from this forum


    // ====================================================================
    // * File: DataSync.mmp
    // * Created: 10/25/07
    // * Author:
    // * Copyright (c): , All rights reserved
    // * ====================================================================

    CAPABILITY ReadDeviceData ReadUserData LocalServices NetworkServices WriteDeviceData WriteUserData

    #ifdef __UI_FRAMEWORKS_V2__
    TARGETPATH \sys\bin
    #if defined(EKA2) || !defined(WINS)
    TARGET DataSync.exe
    TARGETTYPE exe
    #else // EKA1 WINS
    TARGET DataSync.app
    TARGETTYPE exedll
    deffile \epoc32\release\wins\DataSync.def
    #endif
    #else // __UI_FRAMEWORKS_V2__
    TARGET DataSync.app
    TARGETPATH \system\apps\DataSync
    TARGETTYPE app
    #endif

    EPOCSTACKSIZE 0x20000

    UID 0x100039CE 0x0F036012

    LANG SC

    SOURCEPATH ..\src
    DOCUMENT Series_60_APP_ReadMe.txt
    SOURCE DataSync.cpp
    SOURCE DataSyncApplication.cpp
    SOURCE DataSyncAppView.cpp
    SOURCE DataSyncAppUi.cpp
    SOURCE DataSyncDocument.cpp
    SOURCE DataSyncHandler.cpp
    SOURCE SyncProfilesDialog.cpp

    SOURCEPATH ..\group


    USERINCLUDE ..\inc
    USERINCLUDE ..\sis ..\curl_http\inc ..\curl_http\inc\curl ..\curl_http\libcurl

    SYSTEMINCLUDE \epoc32\include\stdapis \epoc32\include ..\ \epoc32\include\stdapis\sys \epoc32\include\stdapis\stlport \epoc32\include\stdapis\stlport\stl

    LIBRARY libc.lib
    LIBRARY euser.lib
    LIBRARY apparc.lib
    LIBRARY cone.lib
    LIBRARY eikcore.lib
    LIBRARY avkon.lib
    LIBRARY gdi.lib syncmlclientapi.lib bafl.lib eikctl.lib eikcoctl.lib form.lib uiklaf.lib aknicon.lib egul.lib msgs.lib etext.lib mmscli.lib efsrv.lib charconv.lib platformenv.lib edbms.lib

    #ifdef EPOC32
    LIBRARY libstdcpp.lib
    #else
    FIRSTLIB ../udeb/libstdcpp.lib
    STATICLIBRARY eexe.lib
    #endif

    #ifdef __UI_FRAMEWORKS_V2__
    START RESOURCE DataSync.RSS
    HEADER
    targetpath \resource\apps
    lang sc
    end
    #else
    RESOURCE DataSync.RSS
    #endif

    #ifdef __UI_FRAMEWORKS_V2__
    sourcepath .
    START RESOURCE DataSync_reg.rss
    #ifdef WINSCW
    TARGETPATH \private\10003a3f\apps
    #else
    TARGETPATH \private\10003a3f\import\apps
    #endif
    END

    start resource DataSync_loc.RSS
    targetpath \resource\apps
    lang sc
    end
    #endif
    STATICLIBRARY libcurl.lib libcrt0.lib

    SOURCEPATH ..\src
    SOURCE client.cpp curl_global.cpp data_consumer.cpp multipart_post.cpp plain_post.cpp post_request.cpp response_receiver.cpp

    MACRO _WCHAR_T_DECLARED HAVE_BOOL_T

    OPTION CW -wchar_t on

  6. #6
    Registered User
    Join Date
    Dec 2004
    Posts
    4

    Re: Symbian GUI application and OpenC

    >> STATICLIBRARY libcrt0.lib
    main() is used as the entry point

  7. #7
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Symbian GUI application and OpenC

    Hi,

    I've created a hybrid application like you're suggesting without any problems.

    What are you testing on? S60 3rd MR emulator? Real device (which one)? Some later SDK?

    Have you got the latest version of Open C/C++ installed? Did you have a previous Open C installation before using Open C++?

    Ebra is correct that you shouldn't have libcrt0.lib linked in if you are running from E32Main() (which you will be for a Symbian GUI application). However, that shouldn't be causing the only problem because I think having eexe.lib linked before it in the MMP will cause the correct symbol to get picked up first.

    The problems you are describing sound very much like you have some incompatible libraries linked in, which is why I'm asking about what versions you are using.

    Sorcery

Similar Threads

  1. Using pipes in S60 GUI application
    By darqan in forum Open C/C++
    Replies: 2
    Last Post: 2008-10-24, 13:56
  2. Replies: 1
    Last Post: 2008-08-21, 13:08
  3. How to Start? OpenC or Symbian OS C++
    By regis.melo in forum Open C/C++
    Replies: 1
    Last Post: 2007-12-18, 01:07
  4. how to accelerate the openc application?
    By kck809 in forum Open C/C++
    Replies: 1
    Last Post: 2007-08-22, 07:52
  5. Error while opening openC Application
    By vishnu_kv in forum Open C/C++
    Replies: 2
    Last Post: 2007-05-18, 10: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
  •  
×