我刚学Symbian ..有一些问题想请教一下..
我想问一下
为什么这个hello world程序(照著書本寫的)可以在UIQ的SDK下编译而在S60的SDK下就不能编译呢..
我曾问过别人UIQ和S60在编写程序方面只是在编写界面时有所不同这是对的吗?
编译时显示的信息:
C:\first>abld build winscw udeb
make -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\EXPORT.make" EXPO
RT VERBOSE=-s
Nothing to do
make -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\WINSCW.make" MAKE
FILE VERBOSE=-s
perl -S makmake.pl -D \FIRST\HELLOTEXT WINSCW
make -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\WINSCW.make" LIBR
ARY VERBOSE=-s
make -s -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\HELLOTEXT\WINSCW
\HELLOTEXT.WINSCW" LIBRARY
make -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\WINSCW.make" RESO
URCE CFG=UDEB VERBOSE=-s
make -s -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\HELLOTEXT\WINSCW
\HELLOTEXT.WINSCW" RESOURCEUDEB
make -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\WINSCW.make" TARG
ET CFG=UDEB VERBOSE=-s
make -s -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\HELLOTEXT\WINSCW
\HELLOTEXT.WINSCW" UDEB
make[1]: *** No rule to make target `\Symbian\7.0s\Series60_v21_C\EPOC32\RELEASE
\WINSCW\UDEB\EEXE.LIB', needed by `\Symbian\7.0s\Series60_v21_C\EPOC32\RELEASE\W
INSCW\UDEB\HELLOTEXT.EXE'. Stop.
make: *** [TARGETHELLOTEXT] Error 2
make -r -f "\Symbian\7.0s\Series60_v21_C\EPOC32\BUILD\FIRST\WINSCW.make" FINA
L CFG=UDEB VERBOSE=-s
我的程序:
hellotext.cpp
#include <e32base.h>
#include <e32cons.h>
LOCAL_D CConsoleBase* gConsole;
void mainL(){
gConsole->Printf(_L("hello world!! \n"));
gConsole->Printf(_L("hello! programmer! \n"));
gConsole->Getch();
}
void ConsoleMainL(){
gConsole = Console::NewL(_L("Hello tText"),TSize(KConsFullScreen, KConsFullScreen));
CleanupStack::PushL(gConsole);
mainL();
CleanupStack::Pop(gConsole);
delete gConsole;
}
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;
}
hellotext.mmp
TARGET hellotext.exe
TARGETTYPE exe
SOURCEPATH .
SOURCE hellotext.cpp
USERINCLUDE .
SYSTEMINCLUDE \EPOC32\INCLUDE
LIBRARY euser.lib
谢谢各位的解答~!