×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    43

    Emulator does not installs console applications

    Hi, I'm starting to develop Symbian C++ programs with Carbide 1.2, SDK S60 3erd ed, FP1.

    Im tarting some hello world console applications, but on the emulator, i cant find the installed program under installed applicatios.

    So far, evem the Carbide Hello world console template does not appears.

    It seems I can only run GUI apps, that seems to install correctly on the emulator, but so far no console apps cant be run on emulator...

    Any help or ideas?

  2. #2
    Super Contributor
    Join Date
    Jul 2004
    Location
    Romania
    Posts
    560

    Re: Emulator does not installs console applications

    Quote Originally Posted by asmatic
    Hi, I'm starting to develop Symbian C++ programs with Carbide 1.2, SDK S60 3erd ed, FP1.

    Im tarting some hello world console applications, but on the emulator, i cant find the installed program under installed applicatios.

    So far, evem the Carbide Hello world console template does not appears.

    It seems I can only run GUI apps, that seems to install correctly on the emulator, but so far no console apps cant be run on emulator...

    Any help or ideas?

    If you want to run/see the console app (from Carbide) you have to put the name of your app instead of emulator (in run configuration).

    For your second problem....the template one I have no idea :-D

  3. #3
    Super Contributor
    Join Date
    May 2003
    Location
    Vancouver, Canada
    Posts
    985

    Re: Emulator does not installs console applications

    You have to add the following statement:

    textshell

    to your epoc.ini. It will launch the emulator in console mode. If you want to switch back to GUI, then remove this statement.

    Antony
    Antony Pranata
    http://www.antonypranata.com/
    http://www.s60tips.com/

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    43

    Re: Emulator does not installs console applications

    Quote Originally Posted by pirosl
    If you want to run/see the console app (from Carbide) you have to put the name of your app instead of emulator (in run configuration).

    For your second problem....the template one I have no idea :-D
    Thanks pirosl,
    did you mean to change the "Emulator" line under Run Configuration to actually show the route to my program?
    I've tried that and although the emulator starts, cant fid the app on ot :(

    Antonypr, tried that also, the wmulator starts on console mode... I've browsed some dirs but cannot find any trace of my HelloWorld app. I Don't know too deeply symbiaan OS directory structure by the way.
    Last edited by asmatic; 2007-07-09 at 21:42.

  5. #5
    Super Contributor
    Join Date
    Jul 2004
    Location
    Romania
    Posts
    560

    Re: Emulator does not installs console applications

    Quote Originally Posted by asmatic
    Thanks pirosl,
    did you mean to change the "Emulator" line under Run Configuration to actually show the route to my program?
    I've tried that and although the emulator starts, cant fid the app on ot :(
    Yes.....the application will not appear under installed applications. Instead the application should directly start when emulator starts

  6. #6
    Registered User
    Join Date
    Jul 2005
    Posts
    43

    Re: Emulator does not installs console applications

    that's the only source file:

    #include "hw.h"
    #include <e32base.h>
    #include <e32std.h>
    #include <e32cons.h> // Console


    // Constants

    _LIT(KTextConsoleTitle, "Console");
    _LIT(KTextFailed, " failed, leave code = %d");
    _LIT(KTextPressAnyKey, " [press any key]\n");


    // Global Variables

    LOCAL_D CConsoleBase* console; // write all messages to this


    // Local Functions

    LOCAL_C void MainL()
    {
    //
    // add your program code here, example code below
    //
    console->Write(_L("Hello, world!\n"));
    }


    LOCAL_C void DoStartL()
    {
    // Create active scheduler (to run active objects)
    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    CleanupStack::PushL(scheduler);
    CActiveScheduler::Install(scheduler);

    MainL();

    // Delete active scheduler
    CleanupStack::PopAndDestroy(scheduler);
    }


    // Global Functions

    GLDEF_C TInt E32Main()
    {
    // Create cleanup stack
    __UHEAP_MARK;
    CTrapCleanup* cleanup = CTrapCleanup::New();

    // Create output console
    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)));
    if (createError)
    return createError;

    // Run application code inside TRAP harness, wait keypress when terminated
    TRAPD(mainError, DoStartL());
    if (mainError)
    console->Printf(KTextFailed, mainError);
    console->Printf(KTextPressAnyKey);
    console->Getch();

    delete console;
    delete cleanup;
    __UHEAP_MARKEND;
    return KErrNone;
    }



    It's standard SDK template for a hello world basic console APP.

    That's the mpp file

    TARGET hw.exe
    TARGETTYPE exe
    UID 0 0xE83D2A01

    USERINCLUDE ..\inc
    SYSTEMINCLUDE \epoc32\include

    SOURCEPATH ..\src
    SOURCE joder.cpp

    LIBRARY euser.lib

    BLD file:
    PRJ_PLATFORMS
    DEFAULT

    PRJ_MMPFILES
    hw.mmp

  7. #7
    Super Contributor
    Join Date
    May 2003
    Location
    Vancouver, Canada
    Posts
    985

    Re: Emulator does not installs console applications

    Quote Originally Posted by asmatic
    Antonypr, tried that also, the wmulator starts on console mode... I've browsed some dirs but cannot find any trace of my HelloWorld app. I Don't know too deeply symbiaan OS directory structure by the way.
    If you are using S60 3rd, your application should be yourfile.exe (and not yourfile.app).
    Normally, if you specify yourfile.exe in the executable and emulator file name in Carbide.c++, your application will be launched automatically.

    If not, you can just type the name of your application in the command line. For example:

    c:\>yourfile

    Antony
    Antony Pranata
    http://www.antonypranata.com/
    http://www.s60tips.com/

  8. #8
    Registered User
    Join Date
    Jul 2005
    Posts
    43

    Re: Emulator does not installs console applications

    Antony Yes, yes, I mean .EXE, "app" was short for application :)

    Suddenly The method proposed by pirosl is working... I dont know exactly what happened before :)

    I have made i work on the other way, starting emulator in text mode...The first time I was thinking that I was supposed to search for my app on the directory tree :)

    Thank-you both

    I think probably, that the app was in fact starting, but that it was put on the background when the main phone screens shows up... :$
    Last edited by asmatic; 2007-07-09 at 22:38.

  9. #9
    Super Contributor
    Join Date
    Jul 2004
    Location
    Romania
    Posts
    560

    Re: Emulator does not installs console applications

    Quote Originally Posted by asmatic
    Antony Yes, yes, I mean .EXE, "app" was short for application :)

    Suddenly The method proposed by pirosl is working... I dont know exactly what happened before :)

    I have made i work on the other way, starting emulator in text mode...The first time I was thinking that I was supposed to search for my app on the directory tree :)

    Thank-you both

    I think probably, that the app was in fact starting, but that it was put on the background when the main phone screens shows up... :$
    Yep....I think your application just went in background

Similar Threads

  1. Console applications
    By evariste in forum Symbian
    Replies: 11
    Last Post: 2008-12-19, 09:53
  2. Replies: 14
    Last Post: 2007-06-29, 14:26
  3. Testing Console Applications
    By ticktock in forum Symbian
    Replies: 7
    Last Post: 2007-02-16, 03:23
  4. Replies: 4
    Last Post: 2006-06-21, 16:33
  5. Applications crashing in Cingular-branded 6682. Feedback appreciated.
    By Razor1973 in forum General Development Questions
    Replies: 3
    Last Post: 2006-01-27, 13:11

Posting Permissions

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