×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    14

    still have problems?

    Hi everybody
    Thanks you all for your very useful discussion.
    I read the whole board but I still have problems?
    Would any of you help me to solve my problem?
    Thanks alot...:-)
    this is my situation.
    I use VC6 with service back 5 and symbian app wizard which generate Avkn app to me. The problem is, I used Yucca code but I always got unresolved external symboles.
    The err msg is
    **************************************************************************************************
    --------------------Configuration: NETWORKINFO - Win32 Uni Debug--------------------
    Compiling...
    Networkinfocontainer.cpp
    D:\NETWORKINFO\SRC\Networkinfocontainer.cpp(56) : warning C4189: 'aMcc' : local variable is initialized but not referenced
    D:\NETWORKINFO\SRC\Networkinfocontainer.cpp(30) : warning C4101: 'Ret' : unreferenced local variable
    D:\NETWORKINFO\SRC\Networkinfocontainer.cpp(57) : warning C4189: 'aMnc' : local variable is initialized but not referenced
    D:\NETWORKINFO\SRC\Networkinfocontainer.cpp(59) : warning C4189: 'aCellId' : local variable is initialized but not referenced
    D:\NETWORKINFO\SRC\Networkinfocontainer.cpp(58) : warning C4189: 'aLocation' : local variable is initialized but not referenced
    Doing first-stage link by name
    link.exe @D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nma01528.
    Creating library \Symbian\6.1\Series60\EPOC32\BUILD\NETWORKINFO\GROUP\NETWORKINFO\WINS\UDEB\NETWORKINFO.lib and object \Symbian\6.1\Series60\EPOC32\BUILD\NETWORKINFO\GROUP\NETWORKINFO\WINS\UDEB\NETWORKINFO.exp
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall RBasicGsmPhone::GetCurrentNetworkInfo(struct MBasicGsmPhoneNetwork::TCurrentNetworkInfo &)const " (?GetCurrentNetworkInfo@RBasicGsmPhone@@UBEHAAUTCu
    rrentNetworkInfo@MBasicGsmPhoneNetwork@@@Z)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: int __thiscall RPhone::Open(class RTelServer &,class TDesC16 const &)" (?Open@RPhone@@QAEHAAVRTelServer@@ABVTDesC16@@@Z)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: int __thiscall RTelServer::GetPhoneInfo(int,struct RTelServer::TPhoneInfo &)const " (?GetPhoneInfo@RTelServer@@QBEHHAAUTPhoneInfo@1@@Z)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: int __thiscall RTelServer::EnumeratePhones(int &)const " (?EnumeratePhones@RTelServer@@QBEHAAH@Z)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: int __thiscall RTelServer::LoadPhoneModule(class TDesC16 const &)const " (?LoadPhoneModule@RTelServer@@QBEHABVTDesC16@@@Z)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: int __thiscall RTelServer::Connect(int)" (?Connect@RTelServer@@QAEHH@Z)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: __thiscall RBasicGsmPhone::RBasicGsmPhone(void)" (??0RBasicGsmPhone@@QAE@XZ)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: __thiscall RTelServer::RTelServer(void)" (??0RTelServer@@QAE@XZ)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: __thiscall MBasicGsmPhoneNetwork::TNetworkInfo::TNetworkInfo(void)" (??0TNetworkInfo@MBasicGsmPhoneNetwork@@QAE@XZ)
    NETWORKINFOCONTAINER.obj : error LNK2001: unresolved external symbol "public: void __thiscall RPhone::Close(void)" (?Close@RPhone@@QAEXXZ)
    \Symbian\6.1\Series60\EPOC32\BUILD\NETWORKINFO\GROUP\NETWORKINFO\WINS\UDEB\NETWORKINFO.APP : fatal error LNK1120: 10 unresolved externals
    NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
    Stop.
    if exist "\Symbian\6.1\Series60\EPOC32\BUILD\NETWORKINFO\GROUP\NETWORKINFO\WINS\UDEB\NETWORKINFO.exp" del "\Symbian\6.1\Series60\EPOC32\BUILD\NETWORKINFO\GROUP\NETWORKINFO\WINS\UDEB\NETWORKINFO.exp"
    Stopped the build by removing the export object,
    if present, because the pre-link stage failed
    Linking...
    LINK : fatal error LNK1104: cannot open file "\Symbian\6.1\Series60\EPOC32\BUILD\NETWORKINFO\GROUP\NETWORKINFO\WINS\UDEB\NETWORKINFO.exp"
    Error executing link.exe.

    NETWORKINFO.APP - 13 error(s), 5 warning(s)

    *********************************************************************************************************************

    And the code is:
    ////////////////////////////////////////////////////////////////
    // INCLUDE FILES
    #include "NetworkInfoContainer.h"

    #include <eiklabel.h> // for example label control
    #include <etel.h>
    #include <etelbgsm.h>

    // ================= MEMBER FUNCTIONS =======================

    // ---------------------------------------------------------
    // CNetworkInfoContainer::ConstructL(const TRect& aRect)
    // EPOC two phased constructor
    // ---------------------------------------------------------
    //
    void CNetworkInfoContainer::ConstructL(const TRect& aRect)
    {

    TInt Ret, enumphone = 1;
    RTelServer server;
    RBasicGsmPhone phone;
    RTelServer::TPhoneInfo info;
    MBasicGsmPhoneNetwork::TCurrentNetworkInfo NetworkInfo;


    User::LeaveIfError(server.Connect());
    CleanupClosePushL(server);

    User::LeaveIfError(server.LoadPhoneModule(_L("phonetsy.tsy")));
    User::LeaveIfError(server.EnumeratePhones(enumphone));

    if (enumphone < 1)
    {
    User::Leave(KErrNotFound);
    }

    User::LeaveIfError(server.GetPhoneInfo(0, info));

    User::LeaveIfError(phone.Open(server, info.iName));
    CleanupClosePushL(phone);

    User::LeaveIfError(phone.GetCurrentNetworkInfo(NetworkInfo));


    TInt aMcc = NetworkInfo.iNetworkInfo.iId.iMCC;
    TInt aMnc = NetworkInfo.iNetworkInfo.iId.iMNC;
    TInt aLocation = NetworkInfo.iLocationAreaCode;
    TInt aCellId = NetworkInfo.iCellId;

    CleanupStack::PopAndDestroy(2);//server,phone


    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
    iLabel->SetTextL( _L("Example View") );

    iToDoLabel = new (ELeave) CEikLabel;
    iToDoLabel->SetContainerWindowL( *this );
    iToDoLabel->SetTextL( _L("Add Your controls here") );

    SetRect(aRect);
    ActivateL();
    }
    /////////////////////////////////////////////////////////////////////////////////

    I did the following for me project settings.
    I added the following paths:
    "\Symbian\6.1\Series60\EPOC32\RELEASE\WINS\UDEB\etel.lib"
    "\Symbian\6.1\Series60\EPOC32\RELEASE\WINS\UDEB\gsmbas.lib"

    and my sdk version is 1.2 "nS60_sdk_v1_2.zip"

    Thanks for your help.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169
    Hi

    Try including etel.lib & Gsmbas.lib, and build the VC workspace again and try the build then again.

    yucca

  3. #3
    Registered User
    Join Date
    Jan 2004
    Posts
    14
    I solve it by putting this line into mmp file.

    LIBRARY etel.lib gsmBAS.lib

  4. #4
    jp4symbian
    Guest

    Re: still have problems?

    hi khossy,

    Quote Originally Posted by khossy

    And the code is:
    ////////////////////////////////////////////////////////////////
    // INCLUDE FILES
    #include "NetworkInfoContainer.h"

    #include <eiklabel.h> // for example label control
    #include <etel.h>
    #include <etelbgsm.h>

    // ================= MEMBER FUNCTIONS =======================

    // ---------------------------------------------------------
    // CNetworkInfoContainer::ConstructL(const TRect& aRect)
    // EPOC two phased constructor
    // ---------------------------------------------------------
    //
    void CNetworkInfoContainer::ConstructL(const TRect& aRect)
    {

    TInt Ret, enumphone = 1;
    RTelServer server;
    RBasicGsmPhone phone;
    RTelServer::TPhoneInfo info;
    MBasicGsmPhoneNetwork::TCurrentNetworkInfo NetworkInfo;


    User::LeaveIfError(server.Connect());
    CleanupClosePushL(server);

    User::LeaveIfError(server.LoadPhoneModule(_L("phonetsy.tsy")));
    User::LeaveIfError(server.EnumeratePhones(enumphone));

    if (enumphone < 1)
    {
    User::Leave(KErrNotFound);
    }

    User::LeaveIfError(server.GetPhoneInfo(0, info));

    User::LeaveIfError(phone.Open(server, info.iName));
    CleanupClosePushL(phone);

    User::LeaveIfError(phone.GetCurrentNetworkInfo(NetworkInfo));


    TInt aMcc = NetworkInfo.iNetworkInfo.iId.iMCC;
    TInt aMnc = NetworkInfo.iNetworkInfo.iId.iMNC;
    TInt aLocation = NetworkInfo.iLocationAreaCode;
    TInt aCellId = NetworkInfo.iCellId;

    CleanupStack::PopAndDestroy(2);//server,phone


    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
    iLabel->SetTextL( _L("Example View") );

    iToDoLabel = new (ELeave) CEikLabel;
    iToDoLabel->SetContainerWindowL( *this );
    iToDoLabel->SetTextL( _L("Add Your controls here") );

    SetRect(aRect);
    ActivateL();
    }
    /////////////////////////////////////////////////////////////////////////////////

    I did the following for me project settings.
    I added the following paths:
    "\Symbian\6.1\Series60\EPOC32\RELEASE\WINS\UDEB\etel.lib"
    "\Symbian\6.1\Series60\EPOC32\RELEASE\WINS\UDEB\gsmbas.lib"

    and my sdk version is 1.2 "nS60_sdk_v1_2.zip"

    Thanks for your help.
    I have the same code as you have but mine is for fetching the IMEI number..
    Have you been able to run the above code successfully in the phone??

    I am testing it on 6600 and my SDK is S60_2nd_FP2.....The code works fine in the emulator but does not in 6600...

    On thorough testing, i found that the code blocks at this line:
    RBasicGsmPhone phone;

    Everything else above it i.e the RTelServer and all works fine..
    Please let me know if you have solved this problem....

Posting Permissions

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