Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Running Console Applications in Carbide.c++
Especially when starting to learn development for Symbian OS, it is often faster to use the console instead of using a full UI application. It makes your application easier to grasp and to debug. The main advantage is that the emulator starts up instantly and does not take several seconds to load like the full UI version, making experimenting around with cleanup stack issues, descriptors and so on a lot easier.
Configuring the Emulator
To run console applications in the S60 3rd Edition emulator, you have to reconfigure the emulator to start up using the console mode. Otherwise, it'd load up the full user interface - which is obviously not what you want.
To do this, search the epoc.ini-file. It should be located in the <EPOCROOT>\epoc32\data\-directory of the S60 SDK you're working with. Once there, just add the word "textshell" (without the quotes) to a new line at the beginning of the file.
When you want to work with UI applications again, don't forget to remove the "textshell"-line again!
The run settings available through Carbide.c++ have to be adapted as well. The easiest solution seems to be to just compile your console application project for "S60 3.x Emulator Debug" and run it once. This makes the IDE automatically generate the run configuration for your project, saving you some work. However, the emulator won't start up your console application in this configuration.
Therefore, you should now right-click the project and choose "Run -> Run As...". In the window that will pop up now, remove (!) the contents of the "Emulator"-field. This might seem strange, but if you use this configuration to start your application, you will see that it'll work out fine.