# [how to] compile and port win32 apps to Windows RT ARM

276 posts
Thanks Meter: 102

By no2chem, Senior Member on 13th January 2013, 05:51 AM
13th January 2013, 10:44 PM |#21
Senior Recognized Developer
Thanks Meter: 1,043

Donate to Me
More
Quote:
Originally Posted by rheza02

As i said earlier, there is no Arm option under Active Solution Platform > new. any idea ?

You are in the manager for .net there, which is CLR and does not need to be set to arm

14th January 2013, 04:57 AM |#22
Senior Member
Thanks Meter: 12

More
Quote:
Originally Posted by lilstevie

You are in the manager for .net there, which is CLR and does not need to be set to arm

are you willing to explain about that ?, where do i know my application can be used on windows RT ?, thanks
14th January 2013, 06:07 AM |#23
Senior Recognized Developer
Thanks Meter: 1,043

Donate to Me
More
Quote:
Originally Posted by rheza02

are you willing to explain about that ?, where do i know my application can be used on windows RT ?, thanks

.net applications are platform independent as they are built on a common language runtime (CLR) which is interpreted at runtime and converted into machine code.

Silverlight apps are also CLR but they will not run on Windows RT due to it not being present.

It is fairly difficult to "guess" which of the CLR types you are trying to compile without knowing more about the project, but if it is .net converting it to pure .net 4.5 should be enough providing it isn't WPF.

Where the ARM libs and compiler come in is for C/C++ projects as these turn out native executables.
14th January 2013, 06:40 AM |#24
Senior Member
Thanks Meter: 12

More
Quote:
Originally Posted by lilstevie

.net applications are platform independent as they are built on a common language runtime (CLR) which is interpreted at runtime and converted into machine code.

Silverlight apps are also CLR but they will not run on Windows RT due to it not being present.

It is fairly difficult to "guess" which of the CLR types you are trying to compile without knowing more about the project, but if it is .net converting it to pure .net 4.5 should be enough providing it isn't WPF.

Where the ARM libs and compiler come in is for C/C++ projects as these turn out native executables.

I just created a new project Windows Forms Application, and guess what, I'm able to run it on windows rt. unfortunately i have been working this two days on WPF project. what a waste. is there any workaround to compile WPF project for Windows RT ?

Thanks lilstevie.
19th January 2013, 08:25 PM |#25
Senior Member
Thanks Meter: 34

More
I'm getting the following when compliling (linking) arm console and gui apps
>msvcrt.lib(wcrtexe.obj) : error LNK2001: unresolved external symbol __imp_EncodePointer

(update - and kernel32.lib is already in there)

msvcrt.lib was already in the lib\arm\ directory and I didn't overwrite it

Update
My cmd line building of cmd line apps (using /D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE) that used to work, has also stopped working
(cmd line building of gui apps always gave me issues with lib's etc and I'm still working on that)

Taking the new lib's out of ..\lib\arm and the build from cmd line works again

Looks like I got some lib in there that adversely affects both cmd line and VS gui builds

Now fixed (cant remember exactly what new lib I had to remove, it was in amongst all the l*.lib and m*.lib ones)

Update3
If VS fails at the link stage with "incorrect MSPDB110.DLL version", just temporarily delete (rename) the MSPDB110.DLL in the bin\x86_arm directory
20th January 2013, 01:21 AM |#26
Inactive Recognized Developer
Seattle
Thanks Meter: 2,921

More
According to http://msdn.microsoft.com/en-us/libr...54(VS.85).aspx, EncodePointer is in kernel32.lib. Typically this library is included by default, I believe, but for ARM projects it must be added manually under Project Properties -> Linker -> Input.

In the future, when you encounter such messages, just go look on MSDN for the .LIB that you need to use.
31st January 2013, 11:08 PM |#27
Member
Atlanta
Thanks Meter: 4

Donate to Me
More
Re: [how to] compile and port win32 apps to Windows RT ARM
Thanks. Also, one more question. As you may already know a person can build there own arm base device to test code on. I wish to do this for the rt. Is there a list of requirements for building for rt. ( the device could be made with Adriano and arm. How do a attain a development copy of rt or rt embedded?

Sent from my SGH-T999 using xda premium
1st February 2013, 12:52 AM |#28
Inactive Recognized Developer
Denver
Thanks Meter: 563

Donate to Me
More
Quote:
Originally Posted by befreshshaveivorysalesoap

Thanks. Also, one more question. As you may already know a person can build there own arm base device to test code on. I wish to do this for the rt. Is there a list of requirements for building for rt. ( the device could be made with Adriano and arm. How do a attain a development copy of rt or rt embedded?

Sent from my SGH-T999 using xda premium

RT is only available on OEM devices (retail tablets, Surface, Vivo Tab, etc...)
1st February 2013, 09:43 AM |#29
Inactive Recognized Developer
Seattle
Thanks Meter: 2,921

More
Yeah, it's not even listed in MSDN subscriber section.
1st February 2013, 11:41 AM |#30
Inactive Recognized Developer
Denver
Thanks Meter: 563

Donate to Me
More
Quote:
Originally Posted by GoodDayToDie

According to http://msdn.microsoft.com/en-us/libr...54(VS.85).aspx, EncodePointer is in kernel32.lib. Typically this library is included by default, I believe, but for ARM projects it must be added manually under Project Properties -> Linker -> Input.

In the future, when you encounter such messages, just go look on MSDN for the .LIB that you need to use.

You could also be lazy and put all of your Windows RT libs in a folder and just add 'c:\path\to\folder\*.lib' as a library and it'll import all of them. That's what I've been doing.
3rd February 2013, 11:18 AM |#31
Member
Thanks Meter: 49

More
Hi, I'm trying to recompile ScummVM for Windows RT and everything seems to go well, after changing solution platform and configuration building goes well, but at 99% there is an error:

Code:
Error	2	error MSB6006: "cmd.exe" exited with code 9009.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets	172	5	scummvm
Could anyone help?

EDIT: Possibly I found source of a problem:

Code:
31>------ Rebuild All started: Project: scummvm, Configuration: Release ARM ------
31>  Performing Custom Build Tools
31>  'nasm.exe' is not recognized as an internal or external command,
31>  operable program or batch file.
31>  Performing Custom Build Tools
31>  'nasm.exe' is not recognized as an internal or external command,
31>  operable program or batch file.
31>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 9009.
========== Rebuild All: 30 succeeded, 1 failed, 0 skipped ==========
From ScummVM dev wiki:

You will need to download and install nasm which is used for assembler versions of our scalers."

Must find a way to cut it from source.

EDIT: Ok, there were 2 scalers written in ASM, I deleted those so nasm is no longer needed, also scummvm make use of libmad - MPEG audio decoder library which has some inline assembly so I was forced to get rid of it. Still there are 6 errors I can't resolve:

Code:
31>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(1182): warning C4005: 'ARRAYSIZE' : macro redefinition
31>          ..\..\common/util.h(58) : see previous definition of 'ARRAYSIZE'
31>D:\Programy\VS2011\VC\include\setjmp.h(122): warning C4005: 'setjmp' : macro redefinition
31>          ..\..\common/forbidden.h(189) : see previous definition of 'setjmp'
31>D:\Programy\VS2011\VC\include\setjmp.h(175): error C2146: syntax error : missing ';' before identifier 'SYMBOL'
31>D:\Programy\VS2011\VC\include\setjmp.h(175): warning C4229: anachronism used : modifiers on data are ignored
31>D:\Programy\VS2011\VC\include\setjmp.h(175): error C2182: 'FORBIDDEN_look_at_common_forbidden_h_for_more_info' : illegal use of type 'void'
31>D:\Programy\VS2011\VC\include\setjmp.h(175): error C2495: 'FORBIDDEN_look_at_common_forbidden_h_for_more_info' : '__declspec(noreturn)' can only be applied to function declarations or definitions
31>D:\Programy\VS2011\VC\include\setjmp.h(175): error C2143: syntax error : missing ';' before '!'
31>D:\Programy\VS2011\VC\include\setjmp.h(175): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
31>D:\Programy\VS2011\VC\include\setjmp.h(175): error C2059: syntax error : '%'

 Guest Quick Reply (no urls or BBcode) Message: