C++ Programming? - Windows RT General

Hi, simple question. I know there are code editors on the windows store, but how would I go about compiling and running basic (command line) c++ code on RT. I would rather carry my lenovo yoga around than my lenovo i7 chunky laptop to my university lectures.
Any possibilities?
Thanks, Zack.

You cannot on RT

Sad, but true. You could use Remote Desktop to your main machine and just use the tablet as a thin client. You can even use the cross-compiler for ARM and produce executables that will run on (jailbroken) RT systems, which could then be copied back down from Remote Desktop for local execution. However, to the best of my knowledge, there is no working C++ (or even C) compiler that will run on RT right now.
It *might* be possible to run MSVC through Mamaich's x86 compatibility layer, which (if configured to produce ARM binaries) would let you compile code (slowly) that would run natively on the tablet. I don't know if that's practical, though; the dynamic recompilation is probably up to it (at the machine level, compilation is surprisingly simple given how complex it is at the algorithm level) but MSVC probably requires libraries and/or system calls which aren't implemented yet. Normally I'd say that's a great thing to request focusing on, but the public build of the emulator hasn't been updated in many months...

Unless you did do the remote desktop or find another way to be able to do it. Otherwise I'd just write the code on your tablet and just wait to compile later on.

You can try an online compiler such as ideone[dot]com or compileonline[dot]com.

Related

Extracting Native APIs? Possible...maybe.

Okay, so since the unlocked emulator has a file manager and task manager, does that mean it would be possible to extract them and run them on an actual WP7S device? And if that was possible, would it also be possible to extract the Native APIs from these apps? I'm fairly certain that they use Native APIs because ordinary apps can only access their own directory. I'm not very smart with these things, so sorry if it's obviously impossible or something.
It's wince - the native API is always there, where do you want to extract it from? Also some people figured out most WP7 apps from the emulator ROM are written in native as well. it's always here.
But you can't just put file manager on a WP7 device because there's no access for you to put anything on it, except apps from Marketplace you got the picture? even if we could cook our custom ROMs in the future the only thing we could do is throw in our own DLLs, services or background tools on it and customize it a little. I still doubt you'd be able to develop real WP7 style apps like a file manager or registry editor because the GUI is supposed to be written in Silverlight/XNA. And from those frameworks you can't access the native API unless Microsoft would add support for it.
101% dumb phone. If you think about it then WP7 is even WORSE then iphone.
But what if you could use Visual Studio to load it onto the device? If you look around in it, there is an option for that.
Actual devices will have to be unlocked for developement purposes to allow sideloading through Visual Studio and even then I doubt the system would be able to deploy native code. Developer phone means a yearly fee for membership in the MS developer programm.
I don't think that using native APIs from managed code would be impossible in the SDK - carriers, e.g. will be allowed to use it, but for normal applications the Security Context in .Net would prevent the programm from calling them (Code Security Managers are configurably available in Java and .Net from the beginning, so i believe that would be what MS uses to block access).
And of course programs using those wouldn't get on the marketplace.
Oh, too bad then, but thanks for your response anyway!
Fdo35 said:
Okay, so since the unlocked emulator has a file manager and task manager, does that mean it would be possible to extract them and run them on an actual WP7S device? And if that was possible, would it also be possible to extract the Native APIs from these apps? I'm fairly certain that they use Native APIs because ordinary apps can only access their own directory. I'm not very smart with these things, so sorry if it's obviously impossible or something.
Click to expand...
Click to collapse
Okay, the issue here is the lack of a few key DLLs: Windows 7 Series will not offer GDI most likely (I'm downloading the emulator set now, and will confirm this soon) and will lack comctl32.dll and the like, removing these functions. As it's been stated before, like Windows 7 uses the 6.1 NT Kernel, Windows Phone 7 series uses the 6.5 Windows CE kernel, at least, last that I've heard. It would then be both possible to bring Windows Mobile 6.5 DLLs over, but anything that calls GDI will not work. Solution? Make a mock GDI that uses the new render.
This isn't new either, Windows 7 uses WPF more than ever (Which composes most of the games as well as Windows Media Center), which is a 3D accelerated and fancier way to draw to the screen, and Windows 7's GDI subset has been updated to allow hardware acceleration granted the graphics card allows it (It's actually something the video card driver must tell Windows, as MSDN states)
Deploy native code, no. Run it, of course
I'll be investigating the possibility of native code here shortly. Chances are, you will need to set the target to ARMV6, and set the compile type to Native, not Windows. Most developers, if not all, probably have overlooked this.
I would expect that it'll require privileged access to run native code, so you'll need to solve the code signing problem.
ThymeCypher said:
Okay, the issue here is the lack of a few key DLLs: Windows 7 Series will not offer GDI most likely (I'm downloading the emulator set now, and will confirm this soon) and will lack comctl32.dll and the like, removing these functions. As it's been stated before, like Windows 7 uses the 6.1 NT Kernel, Windows Phone 7 series uses the 6.5 Windows CE kernel, at least, last that I've heard. It would then be both possible to bring Windows Mobile 6.5 DLLs over, but anything that calls GDI will not work. Solution? Make a mock GDI that uses the new render.
Click to expand...
Click to collapse
Well, I doubt things like comctl.dll and some other things like GWES will be that big of an issue once Platform Builder 7 is released and we can just generate these components ourselves. Hell, adding back GDI support (if those rumors aren't just lies) may be as easy as replacing the GWES with a less crippled one generated by Platform Builder. Maybe GDI support is still compiled in but just doesn't output directly to the screen using the default graphics driver implementation. That's how the Dreamcast implementation of Windows CE was. To even see apps like IE on the screen, you need to copy the contents of the standard WinCE GDI output to a DirectDraw surface.
What I'm more worried about is the hackability of the hardware/software. I'm really hoping it's not as insanely locked down to the point to being unhackable like every Zune.
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
RAMMANN said:
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
Click to expand...
Click to collapse
Platformbuilder is for the OS, which is Windows CE. There is still some debate as to what version the emulator is running, leaving alone the possibility that the actual version of the OS may be different at release.
If the CE6R3 camp is right, you can get platform builder for that right now, though you wont have telshell.exe (WP7 replacement for explorer.exe), and the WP7 specific apps. It would be an interesting exercise to see if they could be run on CE6R3. If no one beats me to the punch, I plan on trying this for myself when I am less swamped at work.
If the CE7 camp is right, you will have to wait till MS releases that version to the public. And they WILL release it because there are far too many embedded systems outside of phones that run on CE for them to neglect it.
No, I was talking about the generic Windows CE 7.0 Platform Builder and not the OEM specific OAK for WP7S. Unless MS plans to completely drop their generic Embedded Windows CE offerings, I see no reason why PB 7.0 will not be released and help with hacking WP7S (if it is even based on 7.0). You always needed to be a large ODM and sing an NDA to use a Platform Builder addon/OAK for the MS platforms like Pocket PC. Those almost never leak and I can't imagine this would be much different.
RAMMANN said:
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
Click to expand...
Click to collapse
Yes, platform builder was used to build leaked wp7 arm image.
d:\wm700_6176\platform\common\src
\soc\qcom_v1\oal\power\sleep.c
It is from from nk.exe
use dumpbin.exe to get all methods in dll/exe

Info about the Current state of Java and OpenGL on Windows RT (8/8.1)

Hello my name is Filiph Sandström but you can call me filfat. in this thread we are going to talk about the current state of Java and OpenGl on Windows RT(8/8.1),but before we start i just want to say thank you for clicking on this thread and if it helped you remember to click the "Thanks" Button! Alright with that cleared out, lets start! :laugh:
Updated: 2013-11-18
Java
Java is a programming langue that develops by Oracle with the idea of one similar langue for all electronics like a dishwasher or a Microwave.
Currently java does NOT exist on Windows RT, but there is a workaround available. The workaround is called Ikvm.
Ikvm is a Java emulator developed in .NET/C# to migrate an existing Java database application to .NET langue.
however to our advantage it can be used to run *almost* any Java application that doesn't require a 3rd-part library like "lwjgl" or similar.
I'm sure that there's a lot of guides out there on how to run application but i will give you a example anyways:
Run_Java.bat
Info:
Code:
This Example executes the jar file "helloworld.jar"
Code:
Code:
@ECHO OFF
ikvm -jar helloworld.jar
To Summarize: We now have basic Java application's running on our Windows RT device, but what if we want to play a game,
or do something that require OpenGL. well here is where the OpenGL section steps in.
OpenGL
OpenGL is a way of rendering not just 3D things but about everything, it is currently the most widespread 2D and 3D API(application programming interface).
It is used in many games and application. Sadly Windows RT do not have support for this as the desktop mode was never intended to use to other things then Office and well, maybe paint .
So what do we do in a situation like this, where most of the games and applications doesn't run because of OpenGL.
We write a OpenGL to DriectX Warpper*. so in short running games like Minecraft is possible BUT it require a OpenGL to DriectX Wrapper which currently does not exist. so you CANNOT run Minecraft or any other Game/Application that require OpenGL yet...
To Summarize: We do know a possible way to run OpenGL on Windows RT however no one as of yet have taken that mission and started working on a OpenGL to DriectX Wrapper. We would also need to modify Ikvm to be able to load external library's but that's a whole other story.
Ending
Thank you for reading, and as I said in the beginning of the post "if it helped you remember to click the "Thanks" Button!".
Also, i will be adding more info when I got time or when things gets release. See Ya! :laugh:
*When i say wrapper I mean a translator that translate OpenGL code to DirectX code for the CPU
Comming Soon...
Reserved
Sources
Sources
Java
Ikvm
OpenGL
A Word To A Moderator
if you think this thread is useful consider making it a sticky
I thought we already had an OpenGL wrapper for RT. At least that's what I believe is used to make Quake 1 and 3 run:
http://forum.xda-developers.com/showthread.php?t=2312019
http://forum.xda-developers.com/showpost.php?p=42338198&postcount=1
Yeah, there already is an OpenGL>DX wrapper. It wasn't used for quake 1 though, the quake 1 RT port is based on DirectQ which had its renderer rewritten for DirectX, was used in Quake 3 I think.
IKVM cannot load LWJGL or other similar libraries on x86. ARM isn't the limitation, OpenGL with the wrapper potentially wouldnt be the limitation either. IKVM itself is. Its an old project and if it was ever going to get native code execution it would have by now.
Although I think java applications on IKVM can make use of .NET extensions which in turn can make use of native code so one could potentially write an IKVM port of LWJGL which on the java side exposes the same API so minecraft etc couldnt tell the difference, but under the hood taps into .NET for rendering. That would probably result in a bit of a mess which may not actually run in the first place. The efforts put into making and debugging such a thing would be better put into porting the jvm itself.
Unless we got a native JVM on RT, I dont think we will see minecraft. Even if you could get LWJGL running, IKVM is just way too slow either way and as it is, the surface is quite a slow device, minecraft on a real JVM on ARM will still be laggy.
Just tossing this out there but what about compiling OpenJDK for arm? It's a pretty active project
http://openjdk.java.net/
I'm a software developer and will try and give this a shot over my Thanksgiving / Christmas downtime. I have an Asus VivoTab still on Win 8 while I wait for the 8.1 jailbreak. Guess Im starting to get bored and kind of ticked that the microsoft store sucks.
Edit:
Added info for reference later
Minecraft Ubuntu ARM
Edit 2:
Build Instructions
http://lwjgl.org/
Webos running guide
Thexfactor2011 said:
Just tossing this out there but what about compiling OpenJDK for arm? It's a pretty active project
http://openjdk.java.net/
I'm a software developer and will try and give this a shot over my Thanksgiving / Christmas downtime. I have an Asus VivoTab still on Win 8 while I wait for the 8.1 jailbreak. Guess Im starting to get bored and kind of ticked that the microsoft store sucks.
Click to expand...
Click to collapse
Then check developement forum and forget about it. There's no mingw/gcc targetting windows/arm. I think that this should be posted sticky on both RT forums.

[Q] Is that possible to compile .cpp on RT by TC++ in dosbox?

As we know, we have an arm edtion of dosbox, and there is Turbo C++ for dosbox. So, I wonder if it's possible to compile .cpp files on RT by TC++ in dosbox? I am with 8.1 now. Is there anyone who wants to try?
No jailbreak for 8.1 as far as now. On 8.0 should work if it's working on your desktop.
Just keep in mind whatever you get cannot run on Windows RT natively.
LolitaPlus said:
Just keep in mind whatever you get cannot run on Windows RT natively.
Click to expand...
Click to collapse
So there is no ide or any compiler for c at all? Quite strange Microsoft didn't made an afford for a tablet supposed to be for students....
alxr212 said:
So there is no ide or any compiler for c at all? Quite strange Microsoft didn't made an afford for a tablet supposed to be for students....
Click to expand...
Click to collapse
MSVC from visual studio can target win32 on THUMB_2. That does mean you can only cross compile from a full x86 windows machine though.
There is a C# compiler on the device already. There is a signed perl binary somewhere. The C# compiler requires a jailbroken device to run the final application though and I doubt you'll find any students using perl.
I think its obvious that microsoft dont push developer tools too heavily considering you need a jailbreak to run non microsoft desktop software in the first place.
On jailbroken devices you have IKVM (which is a java virtual machine, its slow and nowhere near 100% compatible, there is no java compiler on the device yet), python and ruby. There is also SharpDevelop for C#, otherwise you have to use the compiler from CMD. http://forum.xda-developers.com/showthread.php?t=2092348
SixSixSevenSeven said:
MSVC from visual studio can target win32 on THUMB_2. That does mean you can only cross compile from a full x86 windows machine though.
There is a C# compiler on the device already. There is a signed perl binary somewhere. The C# compiler requires a jailbroken device to run the final application though and I doubt you'll find any students using perl.
I think its obvious that microsoft dont push developer tools too heavily considering you need a jailbreak to run non microsoft desktop software in the first place.
On jailbroken devices you have IKVM (which is a java virtual machine, its slow and nowhere near 100% compatible, there is no java compiler on the device yet), python and ruby. There is also SharpDevelop for C#, otherwise you have to use the compiler from CMD. http://forum.xda-developers.com/showthread.php?t=2092348
Click to expand...
Click to collapse
Unfortunately jailbroken device is not an option with the 8.1 (at least for now), well I guess the only thing to do is to wait for one.....
alxr212 said:
Unfortunately jailbroken device is not an option with the 8.1 (at least for now), well I guess the only thing to do is to wait for one.....
Click to expand...
Click to collapse
I'm well aware that jailbreak isnt an option on 8.1. Myriachan is working on it

[Q] Tablet / Desktop/Phone app compatiblity

Hello:
This is my first posting here and I'll be getting a Surface RT tablet this thanks giving. I have a iMac 2013 running Windows 8.1 and Visual Studio 2013 Ultimate thru MSDN.
I would like to develop Windows Store desktop/tablet/phone apps (using C#, XAML) or Xojo that should run on Surface RT, Surface Pro, Windows Phone, Windows 8, Windows 7, Vista and XP (supporting both 32 bit and 64 bit). I wanted to know whether the desktop apps I'm developing would run on all of these environments or is it limted to run only on Surface variants. The intent of buying a Surface RT is to take it to college while at the same time test the apps on Surface RT and deploy to the Windows store. I'm confused on the ARM and Intel/AMD cpus and do I need to change anything in Visual Studio 2013 config to target these environments.
Please advise.
ARM vs x86 is simple enough to cover quickly. Computer processors always use a particular "instruction set" to tell them what to do. x86 is one instruction set, ARM is another instruction set, an ARM processor of course uses the ARM instruction set and an x86 processor uses the x86 instruction set.
Computer software is usually compiled from human readable source code into machine code which the processor then executes or they are interpreted where a piece of software which has already been compiled via the previous method then reads your source code and processes the output directly (as they rely on existing software, you cant write an operating system in an interpreted language, they are often referred to as scripting languages instead of programming languages but in terms of application software they are sometimes just as capable if just slightly slower). Then standing write in the middle you get the bytecode languages, you take human readable source code and compile it into bytecode, the bytecode essentially being an instruction set for a processor which doesn't exist in hardware, you then take a piece of software called a virtual machine which takes the bytecode and processes the output, sort of a half way between being fully compiled and fully interpreted.
Java compiles to java bytecode for the java virtual machine, as long as you have a functional java virtual machine you can run your java application on any platform (and java is indeed on most desktop operating systems and on multiple instruction sets). C# and Visual Basic .NET both compile to .NET Bytecode for the .NET virtual machine, again, with a functional .NET virtual machine you can run a C# application on any platform (unfortunately only windows (including RT) has microsofts official .NET virtual machine, but mono is compatible and runs on other platforms too). C or C++ are compiled, compiled languages must be compiled for a particular operating system and instruction set. Python, lua or batch are interpreted, as long as you have a functional interpreter they will run on any platform. One thing to take note of, in theory it is possible to take a particular programming language, lets say a compiled one, and then write an interpreter for it instead of a compiler (and there are indeed C interpreters) or an interpreted language and write a compiler for it (has been done too), but we are ignoring that.
Visual studio will build windows applications in C/C++ or it is the IDE of choice for C# or VB.net on .NET. No surface limitations, with plugins (or considering usage of mono on other operating systems) it can even do extra platforms and languages too (I personally use it for python and have used it for arduino microcontrollers). It supports both ARM and x86 for C/C++, I admit I have not tried C/C++ in visual studio for windows software so I dont know if it simply builds your software 2/3 times or if you need to manually select ARM but the drop down for it is in the build configuration manager either way so you can always take a look in there for yourself, for .NET it says Any CPU (it is possible to tell it to make an x86 or ARM only .NET application, I am yet to come across why with the exception of perhaps optimisations). Windows store apps generally have to be done in Visual studio and officially your only options for store apps are C++, C#, VB.net and Javascript.
Store apps in my opinion are *not* a good introduction to programming. Console applications are far better to start off with. Leaves you with an issue, windows RT cannot run any application except store apps without a digital signature attached to the executable, which is great but we have no way of obtaining those signatures ourselves, only microsoft do. End result is that you can compile your C project for ARM from visual studio or take a .NET application, but you cant run it on the RT (which is an ARM device). Useful huh? Someone wrote a jailbreak which removes this restriction, but its for RT 8.0 only, the 8.1 update breaks it.
Also windows store apps are different from windows phone apps. You wont be able to write an app for both. You would have to write 2 entirely seperate apps. Only windows 8, 8.1, RT and RT 8.1 can run store apps. Only windows phone can run windows phone apps. Officially only windows 8 (including 8.1) and below can run desktop. Your cross platform ambitions are just that, ambitions. For 1 beginner, they are unattainable.
Xojo is for web apps, aka glorified websites.

Windows 10 on RPi 2

I decided to start a new topic 'cause previous one was a complete mess.
So, finally I ran Windows 10 on my RPi 2 and was really excited by the job that MS did for this low cost computer. It was a really easy to run your UWP app on RPi with a little changes; now I'm trying to run my "DOSBox" app on this computer (but DOSBox isn't a simple and straight UWP app, some difficulties still exists).
I still have no idea about practical implementation of the RPi-based Windows 10 computer but, I believe so, it should exist (BTW, I do have very good sample of practical usage of RPi - my another one - it run self-moving web camera (former robot app ), it controlling my X10 lights and switches via web interface (yes, I do have Apache server running on this RPi), this RPi also serving my huge OPDS library.
By the way, it's a really cheap and exciting gadget (you can get it for about $22 on eBay), and the "Last of the Mohicans" UWP developers definitely should take a look to this gadget and platform! Fun guaranteed!
I.ll like to use this with cortana in the car, just for music and vocal commands.
JHey cortana, play voodoo people..... skip song, send message to Sensboston...good job buddy
Or.... https://9gag.com/gag/ad9LqQB
sensboston said:
I decided to start a new topic 'cause previous one was a complete mess.
So, finally I ran Windows 10 on my RPi 2 and was really excited by the job that MS did for this low cost computer. It was a really easy to run your UWP app on RPi with a little changes; now I'm trying to run my "DOSBox" app on this computer (but DOSBox isn't a simple and straight UWP app, some difficulties still exists).
I still have no idea about practical implementation of the RPi-based Windows 10 computer but, I believe so, it should exist (BTW, I do have very good sample of practical usage of RPi - my another one - it run self-moving web camera (former robot app ), it controlling my X10 lights and switches via web interface (yes, I do have Apache server running on this RPi), this RPi also serving my huge OPDS library.
By the way, it's a really cheap and exciting gadget (you can get it for about $22 on eBay), and the "Last of the Mohicans" UWP developers definitely should take a look to this gadget and platform! Fun guaranteed!
Click to expand...
Click to collapse
Great project i have about 50 low performance laptops and mini laptops its so good for them
I will try this in next year and I will tell you the result
can you port and install ppsspp on that and tell us the results ?
@augustinionut, yeah, Cortana is cool but you can do this on your handset (never tried but it should work, I believe so). I'm thinking about RPi specific scenario. Yes, I can make a blinking LEDs, it's fun but not very practical
@Ferrybigger, I can try. But I'm unsure about overall performance; it looks like RPi CPU is less powerful than L-950 (and has less memory).
P.S. I also ordered this LCD TFT touch screen on AliExpress, it will add more fun for development
sensboston said:
@augustinionut, yeah, Cortana is cool but you can do this on your handset
Click to expand...
Click to collapse
Only that hey cortana dont work on lumia 640xl, and my media bluetooth button dont have win+c command.
I need an app in the background to launch listening cortana.
I found something equivalent: snowwy.
Tried to rebuild and run ppsspp: no luck at all, always getting error 0x800402200 before app's code get execution.
I prefer using Linux for such devices. It's lightweight and flexible. It's easy to use: you can draw on any display with just Bitmap and FileStream. LOTS of drivers! LOTS of programs.
Win10 IOT is not on the same level yet. But it will be someday.
P.S. RPi hardware is garbage.
Yeah, Raspbian is pretty stable and with some configuration tricks (to reduce file I/O access on sd-card) it can work seamlessly for a years (as mine), even with Apache server running on it.
However here I'm talking from the UWP developer position: ability to run your existing UWP app on the extremity low cost (mine costs me $22), portable computer is cool, I believe so.
I can't compare development difficulties for UWP and Linux but some MS public APIs are still ... maybe, not unique but really good, such as map services, easy integration with Azure, speech API and many more. Of course you can find similar packages on Linux but with UWP you already have it out of the box.
P.S. I'm still thinking about "real life" implementation of RPi with W10 but can't find any...
Windows 10 iot core is the os that runs on the raspberry pi. It started out with windows on devices edition on the intel galileo (x86) (2013). The windows on devices edition was probably microsoft's smallest os since windows 95 (only 185mb). The windows iot os has come a long way since then as they have been refactoring the os to include more and more of the apis windows developers know. You can use gdi to paint windows on raspberry pi, and i think directdraw (but have not tried it myself). Porting apps to windows iot core is difficult, but using the remote debugger you can see apis that fail because they aren't included. Once you get around the missing apis issue, you can easily create apps that work directly with hardware, which is something thag's always been difficult with windows ( you used to have to buy a development board ). Using visual c++ to remotely debug drivers is really convenient, as windbg is too difficult.

Categories

Resources