求助,编译Helloworld!
蓝色歌谣 2009-11-06 04:07:59
开发环境:S60 sdk 3dr FP1 + carbide
新建工程:
new ->symbian os c++ project ->empty project for symbian
《Symbian OS C++ for Mobile Phones Volume 3》中的第一个例子:
///////////////////////////////////////////////////////////////
代码:
// hellotext.cpp
//
// ?Symbian Software Ltd 2007. All rights reserved.
//
#include <e32base.h>
#include <e32cons.h>
LOCAL_D CConsoleBase* gConsole;
// Real main function
void MainL()
{
gConsole->Printf(_L("Hello text!\n"));
}
// Console harness
void ConsoleMainL()
{
// Get a console
gConsole = Console::NewL(_L("Hello Text"),
TSize(KConsFullScreen, KConsFullScreen));
CleanupStack::PushL(gConsole);
// Call function
MainL();
// Pause before terminating
User::After(15000000); // 15 second delay
// Finished with console
CleanupStack::PopAndDestroy(gConsole);
}
// Cleanup stack harness
GLDEF_C TInt E32Main()
{
__UHEAP_MARK;
CTrapCleanup* cleanupStack = CTrapCleanup::New();
TRAPD(error, ConsoleMainL());
__ASSERT_ALWAYS(!error, User::Panic(_L("Hello world panic"), error));
delete cleanupStack;
__UHEAP_MARKEND;
return 0;
}
/////////////////////////////////////////////////////////////////////////////
编译错误:
Creation Time Description Resource Path Location Type
1257494192953 Undefined symbol: 'TPtrC16::TPtrC16(unsigned short const *) (??0TPtrC16@@QAE@PBG@Z)' hello_emptpro Unknown C/C++ Problem
1257494192984 Undefined symbol: 'void CConsoleBase::Printf(class TRefByValue<class TDesC16 const >, ...) (?Printf@CConsoleBase@@QAAXV?$TRefByValue@$$CBVTDesC16@@@@ZZ)' hello_emptpro Unknown C/C++ Problem
1257494193015 Undefined symbol: 'class CConsoleBase * Console::NewL(class TDesC16 const &, class TSize) (?NewL@Console@@SAPAVCConsoleBase@@ABVTDesC16@@VTSize@@@Z)' hello_emptpro Unknown C/C++ Problem
1257494193046 Undefined symbol: 'void CleanupStack::PushL(class CBase *) (?PushL@CleanupStack@@SAXPAVCBase@@@Z)' hello_emptpro Unknown C/C++ Problem
1257494193078 Undefined symbol: 'void User::After(class TTimeIntervalMicroSeconds32) (?After@User@@SAXVTTimeIntervalMicroSeconds32@@@Z)' hello_emptpro Unknown C/C++ Problem
1257494193109 Undefined symbol: 'void CleanupStack::Check(void *) (?Check@CleanupStack@@SAXPAX@Z)' hello_emptpro Unknown C/C++ Problem
1257494193140 Undefined symbol: 'void CleanupStack::PopAndDestroy(void) (?PopAndDestroy@CleanupStack@@SAXXZ)' hello_emptpro Unknown C/C++ Problem
1257494193171 Undefined symbol: 'void User::__DbgMarkStart(int) (?__DbgMarkStart@User@@SAXH@Z)' hello_emptpro Unknown C/C++ Problem
1257494193203 Undefined symbol: 'class CTrapCleanup * CTrapCleanup::New(void) (?New@CTrapCleanup@@SAPAV1@XZ)' hello_emptpro Unknown C/C++ Problem
1257494193234 Undefined symbol: 'TWin32SEHTrap::TWin32SEHTrap(void) (??0TWin32SEHTrap@@QAE@XZ)' hello_emptpro Unknown C/C++ Problem
1257494193265 Undefined symbol: 'void TWin32SEHTrap::Trap(void) (?Trap@TWin32SEHTrap@@QAEXXZ)' hello_emptpro Unknown C/C++ Problem
1257494193296 Undefined symbol: 'class TTrapHandler * User::MarkCleanupStack(void) (?MarkCleanupStack@User@@SAPAVTTrapHandler@@XZ)' hello_emptpro Unknown C/C++ Problem
1257494193328 Undefined symbol: 'void User::UnMarkCleanupStack(class TTrapHandler *) (?UnMarkCleanupStack@User@@SAXPAVTTrapHandler@@@Z)' hello_emptpro Unknown C/C++ Problem
1257494193359 Undefined symbol: 'void TWin32SEHTrap::UnTrap(void) (?UnTrap@TWin32SEHTrap@@QAEXXZ)' hello_emptpro Unknown C/C++ Problem
1257494193390 Undefined symbol: 'int XLeaveException::GetReason(void) const (?GetReason@XLeaveException@@QBEHXZ)' hello_emptpro Unknown C/C++ Problem
1257494193421 Undefined symbol: 'void User::Invariant(void) (?Invariant@User@@SAXXZ)' hello_emptpro Unknown C/C++ Problem
1257494193453 Undefined symbol: 'void User::Panic(class TDesC16 const &, int) (?Panic@User@@SAXABVTDesC16@@H@Z)' hello_emptpro Unknown C/C++ Problem
1257494193484 Undefined symbol: 'unsigned long User::__DbgMarkEnd(int, int) (?__DbgMarkEnd@User@@SAKHH@Z)' hello_emptpro Unknown C/C++ Problem
1257494193515 Undefined symbol: 'int UserHeap::SetupThreadHeap(int, struct SStdEpocThreadCreateInfo &) (?SetupThreadHeap@UserHeap@@SAHHAAUSStdEpocThreadCreateInfo@@@Z)' hello_emptpro Unknown C/C++ Problem
1257494193546 Undefined symbol: 'void User::InitProcess(void) (?InitProcess@User@@SAXXZ)' hello_emptpro Unknown C/C++ Problem
1257494193578 Undefined symbol: 'void User::Exit(int) (?Exit@User@@SAXH@Z)' hello_emptpro Unknown C/C++ Problem
1257494193609 Undefined symbol: 'void User::HandleException(void *) (?HandleException@User@@SAXPAX@Z)' hello_emptpro Unknown C/C++ Problem
1257494193640 Undefined symbol: 'void BootEpoc(int) (?BootEpoc@@YAXH@Z)' hello_emptpro Unknown C/C++ Problem