Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
| Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 15th, 2005, 01:57 PM
Registered User
 
Join Date: Jun 2005
Location: Kishinev, , Moldova.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default JIT compiler from MSIL

How should I compile from MSIL to native language? I need the program to run under any Windows OS, whether it has the .NET framework installed on not.
Maybe I have the program but just don't know about it... How is it named or where to get it?

  #2 (permalink)  
Old July 16th, 2005, 09:48 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

.NET is .NET. You can't run .NET applications on any operating that doesn't have a .NET framework installed.

-Peter
  #3 (permalink)  
Old July 16th, 2005, 01:54 PM
Registered User
 
Join Date: Jun 2005
Location: Kishinev, , Moldova.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It can't be, I don't believe it. There MUST be a way... Why bother working, building programs that only run on PC's with the .NET framework installed? it doesn't make any sence.
I read in "Beginning Visual C#" book that there is a JIT compiler (Just in time) that can be used to compile to native language of a specific platform. That's about all I managed to find out. Now this is very important to me. If I can't compile it like I want it, I will be forced to learn another language and transfer an enormous ammount of code... Just thinking of it makes me pale.

  #4 (permalink)  
Old July 16th, 2005, 03:13 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am afraid Peter is right, so you'll have to get used to the idea.

.NET applications run on the .NET Framework which *is* a requirement for any .NET application. Consider something simple like this:

Console.WriteLine("Hello World");

For you, this is a simple statement to write Hello World to the console. However, under the hood, this single line triggers quite some code that is responsible for displaying the text on the console. This code is hosted in the .NET Framework that abstracts and hides all the complexity of something as simple as writing to the console for you.

The same principle applies to other .NET technologies like Win Forms, ASP.NET applications, Windows Services etc. They all require the .NET Framework.

It's the same with Java applications. You cannot run a Java application without the Java virtual machine / run-time environment. The only difference with .NET is that the Java VM is available for many different OS'es.

If you want to go cross-platform take a look at Project Mono. It's an open source implementation of .NET. It isn't finished yet but it looks like an interesting opportunity. However, even Mono requires some sort of Mono .NET framework on the client's machine.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: You Think I Ain't Worth A Dollar, But I Feel Like A Millionaire by Queens of the Stone Age (Track 2 from the album: Songs For The Deaf) What's This?
  #5 (permalink)  
Old July 17th, 2005, 02:47 AM
Registered User
 
Join Date: Jun 2005
Location: Kishinev, , Moldova.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay. I guess I don't have much of a choice.
Again I go back to Delphi. I was used to programming in that language, I built applications that just run, without the need for something else to be installed. Happy users just copied them from the Internet, launched them and Woila! instant results.
I still think it would be a better ideea to make a compiler like all the others, that saves the commends sent to the OS in a file that would be the finished project. I don't think it's that hard to achieve, considering the number of programmers using VS.NET and the number of users that don't have the .NET framework, have a low-speed internet connection.
Anyway, thank you, Imar, planoie, you did save me a lot of time I would spend searching for the answer that doesn't exist.

  #6 (permalink)  
Old July 19th, 2005, 01:25 AM
Authorized User
 
Join Date: Jul 2005
Location: new delhi, Delhi, India.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to kumar_raj13
Default

Hello Friend,
For Compilation, U should have .Net Frmework.


Similar Threads
Thread Thread Starter Forum Replies Last Post
JIT Error ajindal General .NET 1 March 6th, 2008 11:40 AM
JIT debugging jayanp General .NET 5 April 18th, 2007 06:44 PM
Does we can copying MSIL code to other platform? fuehrer General .NET 1 June 13th, 2005 12:07 PM
where the MSIL resides ? nupur_ani .NET Framework 2.0 1 March 17th, 2005 12:22 PM
Difference between MSIL and IL sumsin General .NET 2 March 14th, 2005 08:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.