Convert VB.net to C++ Native?

I want to convert VB.net code to C++ Native
Is there any program that works?
Yes ik ima get all these comments saying "Learn how to code in C++"
i already do but i have this vb test file and im seeing if i can convert it to C++
and i want it to convert it so i can use Code::Blocks to compile it _._
Is there any program that works?


No.

Aside from being an entirely different language with different features, VB.net is garbage collected and C++ isn't, so the way the program manages memory would have to change.

Also, VB.net uses the .net framework which is a ginormous lib not available in C++, so you'd have to change the code to use similar C++ libs... if any exist.


Besides... computer generated code is almost always impossible to read/follow. You'd be better off just sticking with the VB.net source.
VB.net uses .net
and i want users to not have to download the .net
but do you know a way to make them install .net with the install?
Yes, just direct them to Microsoft website from your installer. Or make your installer download and install .NET for you if not already installed.

However windows 7 / 8 came with recent versions of .net by default (.net 3.5 in case of windows 7, 4.0 for windows 8)
How do i make a intaller install the .net?
do i just have it install the program files to the correct dir

EDIT: yes windows 7 / 8 came with .net already but my programs run .net 4.0
so windows 7 and under can not run them w/ out intaller
You might have better luck asking this on a forum specific to whatever installer you're using. The only installer software I can really think of off the top of my head is InstallShield -- but I don't know if that's free. It may have some option where dependencies like .net are downloaded by the installer.
NSIS and InnoSetup both are free installers widely used and both both supports downloading external files before/after installing main program.

If I were you, just keep the things simpler and direct the user to Microsoft website download page.
The question of auto-converting code from one programming language to another is somewhat controversial. I've personally worked on this some myself.

Realize that when Microsoft created .NET about 12 years ago they weren't even able to produce a converter between their native code Visual Basic 6 and their new VB.NET that worked all that good. Yes, it worked some. But far from perfect. That's actually the thing about all these converter attempts. Its not too hard to get something that translates 70%, 80%, maybe even 90 to 95% of the code. But you can never get it perfect.

And realize that you want to convert code between two languages that are about as radically different as two languages can get!

I translate all the time between C++ and PowerBASIC. I use both these languages in exactly the same way. I just do it by hand.
Last edited on
Topic archived. No new replies allowed.