LINK : fatal error LNK1104: cannot open file
| Thu, 2005-10-06 10:12 | |
|
hi,
here is the code... mmp file ===================== /* * ============================================================================ * Name : out.mmp * Part of : out * Created : 9/30/2005 by Shashi * Description: * This is the project specification file for out. * Initial content was generated by Series 60 AppWizard. * * Version : * Copyright: satyam * ============================================================================ */ TARGET out.app TARGETTYPE app UID 0x100039CE 0x02EBB0B7 TARGETPATH \system\apps\out SOURCEPATH ..\src SOURCE OutApp.cpp SOURCE OutAppUi.cpp SOURCE OutDocument.cpp SOURCE OutView.cpp SOURCE ClientApp.cpp RESOURCE ..\data\out.rss RESOURCE ..\data\out_caption.rss LANG SC USERINCLUDE ..\inc SYSTEMINCLUDE \epoc32\include LIBRARY estlib.lib euser.lib LIBRARY euser.lib apparc.lib cone.lib eikcore.lib LIBRARY eikcoctl.lib avkon.lib LIBRARY aknskins.lib /*shashi*/ ====================== main cpp file #include<Etel3rdParty.h> //#include<clientapp.h> #include<eikenv.h> #include <ClientApp.h> //#include "Outdocument.h" //#include <aknselectionlist.h> //#include <aknviewappui.h> void CClientApp::ConstructL() { iTelephony = CTelephony::NewL(); //CActiveScheduler::Add(this); } CClientApp::~CClientApp() { cancel(); // if any request outstanding, calls DoCancel() to cleanup delete iTelephony; } void CClientApp::MakeCall() { _LIT(KNumberToDial, "+01 1234 5678"); iTelephony->EstablishDataCall(iStatus , iDataPort,KNumberToDial ); iState = EEstablishing; SetActive(); } void CClientApp::RunL() { _LIT8(KDataToWrite,"1234567890"); if ( (iStatus == KErrNone) && (iState = EEstablishing) ) { iDataPort.Write(iStatus,KDataToWrite); iState = EWriting; SetActive(); } else iTelephony->TerminateDataCall(); } void CClientApp::DoCancel() { iDataPort.Cancel(); iTelephony->CancelEstablishDataCall(); } /*shashi*/ ====================== errors are C:\Symbian\7.0s\Series60_v20\Examples\out\src\ClientApp.cpp(39) : warning C4706: assignment within conditional expression Doing first-stage link by name link.exe @C:\DOCUME~1\sh24201\LOCALS~1\Temp\nma01368. Creating library \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.lib and object \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp LINK : warning LNK4005: no objects used from library \Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\ESTLIB.LIB CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: static class CTelephony * __cdecl CTelephony::NewL(void)" (?NewL@CTelephony@@SAPAV1@XZ) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CTelephony::~CTelephony(void)" (??1CTelephony@@UAE@XZ) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CClientApp::cancel(void)" (?cancel@CClientApp@@QAEXXZ) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CClientApp::SetActive(void)" (?SetActive@CClientApp@@QAEXXZ) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CTelephony::EstablishDataCall(class TRequestStatus &,class RComm &,class TDesC16 const &)" (?EstablishDataCall@CTelephony@@QAEXAAVTRequestStatus@@AAVRComm@@ABVTDesC16 @@@Z) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: int __thiscall CTelephony::TerminateDataCall(void)" (?TerminateDataCall@CTelephony@@QAEHXZ) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall RComm::Write(class TRequestStatus &,class TDesC8 const &)" (?Write@RComm@@QAEXAAVTRequestStatus@@ABVTDesC8@@@Z) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CTelephony::CancelEstablishDataCall(void)" (?CancelEstablishDataCall@CTelephony@@QAEXXZ) CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall RComm::Cancel(void)" (?Cancel@RComm@@QAEXXZ) \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.APP : fatal error LNK1120: 9 unresolved externals NMAKE : fatal error U1077: 'link.exe' : return code '0x460' Stop. if exist "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp" del "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.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\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp" Error executing link.exe. Creating browse info file... OUT.APP - 12 error(s), 2 warning(s) what's wrong in the code...? |
|






Forum posts: 46
According to the docs for CTelephony, you need to link against: Etel3rdParty.lib
So you need to add a line to the mmp:
LIBRARY Etel3rdParty.lib
Cheers,
Glen.
Forum posts: 23
..but the same error is coming....
any other way?
Forum posts: 672
Forum posts: 23
program
#include<Etel3rdParty.h>
//#include<clientapp.h>
#include<eikenv.h>
#include <ClientApp.h>
//#include "Outdocument.h"
//#include <aknselectionlist.h>
//#include <aknviewappui.h>
void CClientApp::ConstructL()
{
iTelephony = CTelephony::NewL();
//CActiveScheduler::Add(this);
}
CClientApp::~CClientApp()
{
cancel(); // if any request outstanding, calls DoCancel() to cleanup
delete iTelephony;
}
void CClientApp::MakeCall()
{
_LIT(KNumberToDial, "+01 1234 5678");
iTelephony->EstablishDataCall(iStatus , iDataPort,KNumberToDial );
iState = EEstablishing;
SetActive();
}
void CClientApp::RunL()
{
_LIT8(KDataToWrite,"1234567890");
if ( (iStatus == KErrNone) && (iState = EEstablishing) )
{
iDataPort.Write(iStatus,KDataToWrite);
iState = EWriting;
SetActive();
}
else
iTelephony->TerminateDataCall();
}
void CClientApp::DoCancel()
{
iDataPort.Cancel();
iTelephony->CancelEstablishDataCall();
}
/*shashi*/
======================
errors:
C:\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\SRC\Clientapp.cpp(39) : warning C4706: assignment within conditional expression
Doing first-stage link by name
link.exe @C:\DOCUME~1\sh24201\LOCALS~1\Temp\nma02804.
Creating library \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.lib and object \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp
LINK : warning LNK4005: no objects used from library \Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\ESTLIB.LIB
LINK : warning LNK4005: no objects used from library \Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\EFSRV.LIB
LINK : warning LNK4005: no objects used from library \Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\EDBMS.LIB
LINK : warning LNK4005: no objects used from library \Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\ESTOR.LIB
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CTelephony::~CTelephony(void)" (??1CTelephony@@UAE@XZ)
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CClientApp::cancel(void)" (?cancel@CClientApp@@QAEXXZ)
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CClientApp::SetActive(void)" (?SetActive@CClientApp@@QAEXXZ)
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall RComm::Write(class TRequestStatus &,class TDesC8 const &)" (?Write@RComm@@QAEXAAVTRequestStatus@@ABVTDesC8@@@Z)
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall RComm::Cancel(void)" (?Cancel@RComm@@QAEXXZ)
\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.APP : fatal error LNK1120: 5 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
if exist "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp" del "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.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\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp"
Error executing link.exe.
Creating browse info file...
OUT.APP - 8 error(s), 5 warning(s)
==========================any suggestions?
Forum posts: 672
Forum posts: 23
#include<Etel3rdParty.h>
//#include<clientapp.h>
#include<eikenv.h>
#include <ClientApp.h>
//#include "Outdocument.h"
//#include <aknselectionlist.h>
//#include <aknviewappui.h>
void CClientApp::ConstructL()
{
iTelephony = CTelephony::NewL();
CActiveScheduler::Add(this);
}
CClientApp::~CClientApp()
{
Cancel(); // if any request outstanding, calls DoCancel() to cleanup
delete iTelephony;
}
void CClientApp::MakeCall()
{
_LIT(KNumberToDial, "+01 1234 5678");
iTelephony->EstablishDataCall(iStatus , iDataPort,KNumberToDial );
iState = EEstablishing;
SetActive();
}
void CClientApp::RunL()
{
_LIT8(KDataToWrite,"1234567890");
if ( (iStatus == KErrNone) && (iState = EEstablishing) )
{
iDataPort.Write(iStatus,KDataToWrite);
iState = EWriting;
SetActive();
}
else
iTelephony->TerminateDataCall();
}
void CClientApp::DoCancel()
{
iDataPort.Cancel();
iTelephony->CancelEstablishDataCall();
}
/*shashi*/
===========================
mmp file
===========================
/*
* ============================================================================
* Name : out.mmp
* Part of : out
* Created : 9/30/2005 by Shashi
* Description:
* This is the project specification file for out.
* Initial content was generated by Series 60 AppWizard.
*
* Version :
* Copyright: satyam
* ============================================================================
*/
TARGET out.app
TARGETTYPE app
UID 0x100039CE 0x02EBB0B7
TARGETPATH \system\apps\out
SOURCEPATH ..\src
SOURCE OutApp.cpp
SOURCE OutAppUi.cpp
SOURCE OutDocument.cpp
SOURCE OutView.cpp
SOURCE ClientApp.cpp
RESOURCE ..\data\out.rss
RESOURCE ..\data\out_caption.rss
LANG SC
USERINCLUDE ..\inc
SYSTEMINCLUDE \epoc32\include
LIBRARY estlib.lib euser.lib
LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
LIBRARY eikcoctl.lib avkon.lib
LIBRARY aknskins.lib
LIBRARY Etel3rdParty.lib
LIBRARY ws32.lib
/*shashi*/
====================
.h file
+++++++++++++++++++++
/*
* ============================================================================
* Name : COutView from OutView.h
* Part of : out
* Created : 9/30/2005 by Shashi
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright: satyam
* ============================================================================
*/
#ifndef CLIENTAPP_H
#define CLIENTAPP_H
/*shashi*/
/* Declare the client class */
class CClientApp :public CActive
{
public:
// Construction
void ConstructL();
// Destruction
~CClientApp();
// Issue request: make an outgoing call
void MakeCall();
void SetActive();
void Cancel();
// Cancel request
void DoCancel();
void EstablishDataCall(TRequestStatus& aRequestStatus, RComm& aDataChannel, const TDesC& aDialNumber);
// Service completed request
void RunL();
TRequestStatus iStatus ;
private:
enum {EEstablishing, EWriting};
CClientApp();
private:
RComm iDataPort; // data port
CTelephony* iTelephony; // telephony object we own
TInt iState; // simple state tracking
};
#endif
===============
errors are
C:\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\SRC\Clientapp.cpp(39) : warning C4706: assignment within conditional expression
Doing first-stage link by name
link.exe @C:\DOCUME~1\sh24201\LOCALS~1\Temp\nma00808.
Creating library \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.lib and object \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp
LINK : warning LNK4005: no objects used from library \Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\ESTLIB.LIB
LINK : warning LNK4005: no objects used from library \Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\WS32.LIB
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CClientApp::Cancel(void)" (?Cancel@CClientApp@@QAEXXZ)
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall CClientApp::SetActive(void)" (?SetActive@CClientApp@@QAEXXZ)
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall RComm::Write(class TRequestStatus &,class TDesC8 const &)" (?Write@RComm@@QAEXAAVTRequestStatus@@ABVTDesC8@@@Z)
CLIENTAPP.obj : error LNK2001: unresolved external symbol "public: void __thiscall RComm::Cancel(void)" (?Cancel@RComm@@QAEXXZ)
\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.APP : fatal error LNK1120: 4 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
if exist "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp" del "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.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\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EXAMPLES\OUT\GROUP\OUT\WINS\UDEB\OUT.exp"
Error executing link.exe.
Creating browse info file...
OUT.APP - 7 error(s), 3 warning(s)
any improvements?
Forum posts: 3
I don't know the device you're using, but if you're trying with nokia S60 2nd FP2,the problem is that CTelephony isn't supported in the device, at least in my 6680 I don't have the proper file int the mobile phone.
Forum posts: 239
Even I too have faced this problem so many times.
you can try with this,cos this worked fine for me so many times ,when I made any changes to .mmp file and other .rss file and forgot to reimport .mmp file.
Cleanup your BUILD folder.
Clean all your intermediate files from Inc,localisation,release path.
Recompile again.
It will work.It works for me whenever I faced such "fatalError::FileNotopened" error.
BR
---------------
Bhatt Kavita