Link to home
Start Free TrialLog in
Avatar of SEden
SEden

asked on

Building a symbian sample app using VC++ .NET

Hey there experts,

I am using VC++ .NET to build the Symbian 6.1 HelloWorld App and getting this output:

13 errors:
HELLOWORLD error LNK2001: unresolved external symbol ___CxxFrameHandler
HELLOWORLD warning LNK4044: unrecognized option '/WARN:3'; ignored
HELLOWORLD error LNK2001: unresolved external symbol ___CxxFrameHandler
HELLOWORLD error LNK2001: unresolved external symbol ___CxxFrameHandler
HELLOWORLD error LNK2019: unresolved external symbol __except_list referenced in function "public: virtual __thiscall CExampleAppUi::~CExampleAppUi(void)" (??1CExampleAppUi@@UAE@XZ)
HELLOWORLD error LNK2001: unresolved external symbol __except_list
HELLOWORLD error LNK2001: unresolved external symbol __except_list
HELLOWORLD error LNK2019: unresolved external symbol __EH_prolog referenced in function "public: virtual __thiscall CExampleAppUi::~CExampleAppUi(void)" (??1CExampleAppUi@@UAE@XZ)
HELLOWORLD error LNK2001: unresolved external symbol __EH_prolog
HELLOWORLD error LNK2001: unresolved external symbol __EH_prolog
HELLOWORLD fatal error LNK1120: 3 unresolved externals
HELLOWORLD fatal error U1077: 'link.exe' : return code '0x460'
HELLOWORLD fatal error LNK1181: cannot open input file '\Symbian\6.1\Series60\EPOC32\BUILD\SYMBIAN\6.1\SERIES60\EPOC32EX\HELLOWORLD\HELLOWORLD\WINS\UDEB\HELLOWORLD.exp'

I am new to using the Symbian C++ SDK, and as far as I understand it is not meant to be compatible with VC++ .NET, but that's what i've got.
I havn't got a clue where to begin to solve this one. I have done what is said in the manual to build it; Have type bldmake...abld makefile vc6... it wouldn't buid in the command line either.

Really hope you could give me a lead or direction on how to solve this one,

Shaul

Shaul
Avatar of Didier Vx
Didier Vx
Flag of France image

You must first install the "wizard" sdk for Nokia 60 series (some files from the SDK to copy into a common directory of Visual C++ 6.0). Then build your app from the Visual C++ 6.0 UI, then you should see the Hello World application running on the EPOC R5 Emulator. To reach a real device, use Makesis (mine bugs!) or Sisar.


Avatar of AnnaNachesa
AnnaNachesa

DO not use VS.NET. Use MSVC 6. Symbian SDK does not work with .NET... not yet.
Pls see that u've added in the project settings the required lib files
you must set the environment before you run the commands.
please run the C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT.

:)
I've only been able to compile the examples given with the SDK ONLY ON VISUAL C++ 6.0 + SYMBIAN SDK.
Not sure about this SDK working on .NET !
See Ya
The Symbian SDK uses Unmanaged Code whereas .Net supports Managed Code (within .Net CLR). So to use Symbian SDK with VS.Net you have to do lot of manual configurations. That is a tedious task, so i suggest you to go ahead with using Visual Studio 6.0. That should work fine.. Best Wishes
You are getting unresolved external symbol errors due to the missing links to the libraries. Since they refer to the libraries of Visual Studio 6, the include files and imports should be done before compilation in .Net . You can try this if you have ample time and not in a hurry. Anyway its better you first try your hands using Visual Studio 6 and Symbian SDK before going for VS.Net and Symbian SDK. So that you understand how it works and you can make it work in other environment. Best wishes
ASKER CERTIFIED SOLUTION
Avatar of filipecorreia
filipecorreia
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<standard cleanup recommendation>

 No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept a comment (I would say the one I posted, I think it's the easiest and cleanest one, but maybe it shouldn't be me to decide that)

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Filipe
EE Cleanup Volunteer
Visual Studio .NET is not officially supported for use with any Symbian OS SDKs. However, based on feedback from some developers who have experimented with it, you may find that using the following steps you can get your SDK to work correctly.

After doing abld makefile vc6 as usual, open the generated .dsp file. Visual C++ .NET will convert it to the new "solution" format (.sln). You will now need to change some compiler settings. Right click on the project name and bring up the Project Properties dialog. Under the C/C++ heading, set the following options as shown:

Code Generation
Enable C++ Exceptions No
Buffer Security Check No
Command Line
Additional Options /QIfist

This should remove all compiler/linker errors and warnings.

You also need to make sure your PATH environment variable is correctly setup. If you've upgraded from Visual Studio 6.0 then you should change the entries like C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin; to point to the new Visual Studio .NET installation, something like C:\Program Files\Microsoft Visual Studio .net\VC7\Bin;C:\Program Files\Microsoft Visual Studio .net\Common7\IDE;.

To enable command line builds to complete properly, you will also need to add the /QIfist flag to \epoc32\tools\cl_win.pm. The exact form of this varies with the SDK that's installed but in general it will look something like this:

&main::Output(
"CLFLAGS = /nologo /Zp4 /W4 /QIfist"
);

Or

&main::Output(
"CLFLAGS =",
" /nologo", # suppress "sign-on" banner message
" /Zp4", # packs structures on 4 byte boundaries
" /GF", # Pools strings and places them in ead-only memory
" /QIfist" # fixes _ftol2 link errors with Visual C++ .net
);  
 
 
best of luck
Visual Studio is officially supported since the last version of the SDK as it's mentioned in the SDK's download page: http://www.forum.nokia.com/symbianforum/main/1,6566,1_32_12,00.html
Unfourtenately, that doesn't mean there is any sort of documentation from nokia or symbian about it.

I think bsrujan's solution would work, but using the .NET wizard ( http://wallsmedia.narod.ru/epoc/ ) would be much easier, avoiding a bunch of manual configurations ;)


     Cheers,

           Filipe