tags:

views:

257

answers:

6

Are there any tools converting vb.net source to C++ eg gnu C++. I know that Mono can transfer the projects to different platforms but i would rather prefer to convert the source. Since all we know that .net uses its own binary libs not available to other complilers is there any tool at least converting vb.net to C++ .net?

Thanks in advance

A: 

Hey there,

Check out http://www.developerfusion.com/tools/convert/vb-to-csharp/ if you want to do it in a semi manual way. This will allow you to copy code and get the converted results.

I prefer this approach because I can see the conflicts with each block of code as I go and then resolve them instead of just converting the entire project.

But I am sure there are many other tools out there as well.

JustMe2

JustMe
Thanks for your answer.All similar questions refer from vb to c#.I would rather prefer strictly to C++.I'll check out your linkThanks again
Novemberland
There's a very good reason for that. VB.Net and C# are designed to run on the same platform. They are so similar in their underlying mechanics that some utilities allow you to copy code from one language and paste it into the other. There is no way you can accomplish this in the general case between two arbitrary programming languages that operate in entirely different environments.
Cogwheel - Matthew Orlando
I really cannot understand why .Net stuff don't care that much for C++.NET.. If it is a common task to convert from vb to C# should not be that easy for VB.NET to C++.NET too?
Novemberland
C# (like Java) is loosly based on C++. So if you converted your code to C#, you would at least have some basic code in place. But I think a re-write that would be designed with C++ in mind from the getgo would be a better choice. I am sure that the Apple folks will object to anything that might have once been related to MS or be remotely cross platform.... Have you considered Android?
JustMe
My intention is not to use other than Apple APIs, just not writting from scratch
Novemberland
+4  A: 

There is no tool that is going to convert a VB .net app to an iPhone app. You get to start over from scratch.

jeffamaphone
From vb.net to C++.Net would be much more convenient than from scratch I consider or I am wrong?Thanks for your answer
Novemberland
I have added a link why to find alternatives than strating from scratch, Joel has been advising on that all the time.I might be wrong but what if convert to C++ and then refactoring on myown?
Novemberland
@Novemberland: Your C++.Net is "Managed C++" aka "C++ CLI", and as such still has numerous .Net features (garbage collection, etc). iOS has no garbage collection (beyond the Objective C explicit ref counting). The port would be near impossible for automated tools to do, and the output would be "write only" code.
Yann Ramin
Firstly is there any tool from VB.NET to C++ CLI? after that ok, i take the chanllenge..
Novemberland
I know of no tool that converts from VB .net to managed C++. However, even if such a tool did exist, I would argue that it really isn't worth it. You're going to spend so much time untangling it from the .net runtime that I don't think it saves you anything at all.
jeffamaphone
And I think you're missing the point of Joel's post. Joel isn't talking about taking something that is written in Language A and running on Runtime R and converting it to Language B (which has no common ancestor with Language A) on native system N. Joel is talking about code hygiene, you're talking about code porting. You've learned the wrong lesson.
jeffamaphone
Why not to expand Joel's Fire and Motion advice which concerns different native systems with his belief in refactoring? I've studied Joel more deeply that you believe...
Novemberland
Um, because it doesn't have anything to do with the current topic? Look man, I'm not gonna argue with you. My professional opinion has been given, and I am no longer interested. I hope you can prove me wrong. Good luck.
jeffamaphone
A: 

You could compile down to machine code and then disassemble it with the "wrong" disassembler... the code would be a horrific mess, of course, an abomination in the eyes of God and man, but it would technically do what you asked.

Beyond that? No, I don't think so. It's not really the kind of thing you can do by machine, without doing something like compiling/decompiling the crap out of it, as above.

Your answer concerns VB.NET to C++.NET, too?Thanks for your answer
Novemberland
A: 

There's no such thing as C++.NET.

You might be referring to C++CLI - but that won't run on an iPhone as it requires the .NET framework, like any other .NET language.

Joe Gauterin
Thanks for your answer
Novemberland
A: 

C, C++, or Objective-C are a totally different family of languages to VB.NET. In addition, C++/CLI (what you've called C++.NET) will never run on an iPhone in the new language obligations. I think you'd need to start from scratch.

DeadMG
+1  A: 

Even if there was such a tool, Steve Jobs has banned the use of any tools in the TOS.
Source: http://www.engadget.com/2010/04/08/apples-iphone-lockdown-apps-must-be-written-in-one-of-three-la/

This is why you aren't allowed to use Adobe's iPhone compiler - even though it probably converts your Flash code to Objective-C, the verbage of the TOS disallows it.

You must write your application from scratch, or don't develop for the iPhone.

Nathan Adams
I will try to convert C++ClI results to what iOS4 SDK allows me to compile. But from VB.NET to C++ClI how to convert?Thanks for your answer
Novemberland
@Novemberland I don't think you read my post. Any tool like that is NOT ALLOWED per the TOS. If you don't like the policy, then find another platform to develop for.
Nathan Adams