Jump to content
  • Advertisement
Sign in to follow this  
CProgrammer

c++.net and c++ unmanaged

This topic is 4825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How similar are the two. Meaning if I write a program in c++.net and encapsule all my .net specific things(gui special objects) in a namespace is it sufficient to change this namespace to move the program to unmanged. Basically are there any differences in syntax? Another question: Are there syntactical differences in DX managed and unmanaged. with c++?

Share this post


Link to post
Share on other sites
Advertisement
Yes, there is a difference, both in syntax, and in the general way in which the software operates.

While moving between managed and unmanaged code is eaisest (and has the fewest syntatical differences) if you use managed/unmanaged C++, it is not, in itself, an easy task.


I have tried using .NET for all my GUI-type objects and unmanaged code for my actual "engine" type software. It was unpleasent and I decided to use all unmanaged code with wxWidgets instead.

The small ammount of difficulty of using wxWidgets (which has no WYSIWYG editor) was far outweighed by the huge ammount of difficulty in interoperating managed and unmanaged code.


Basically - if you want to use .NET stuff, it's really an all-or-nothing thing (unless you want to do it the "hard" way). Either your entire project is managed, or you drop .NET and make an entirely unmanaged project.

Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Russell
I have tried using .NET for all my GUI-type objects and unmanaged code for my actual "engine" type software. It was unpleasent and I decided to use all unmanaged code with wxWidgets instead.


Thats why MS have ditched Managed C++, came up with a new standardized language & language binding C++/CLI, as of this moment its still being finalized and the only compiler (currently) implements it is VS/C++ .NET 2005. It is much more pleasant [grin].

Share this post


Link to post
Share on other sites
Hmm, thats bad news and seriously unnecessary. I hope microsoft fixes this.
So c++/CLI will be interchangable?
I can get VS.net 2005 from my university. However I heard it isnt completely stable or compatible or something is this true?

-CProgrammer

Share this post


Link to post
Share on other sites
Well it's in beta so it does have some problems, however I've found it to be pretty stable and perfectly fine for normal use.

Share this post


Link to post
Share on other sites
Quote:
Original post by CProgrammer
Hmm, thats bad news and seriously unnecessary.


I take it as good news and it was necessary as Managed C++ was MS only and more like a complete hack, C++/CLI is ECMA standard soon to be ISO standardized (i think Joint ISO standard).

Quote:
Original post by CProgrammer
I hope microsoft fixes this.


Did you mean fix Managed C++? if so that wont happen, .NET 2005 will be backwards compatible with Managed C++ because of legacy code while developers move to C++/CLI but Mangaed C++ will fade away into a memory no one wants to remember [lol].

Quote:
Original post by CProgrammer
So c++/CLI will be interchangable?


interchangable with Managed C++ or standard C++?

if former i'm pretty sure you can mix Managed C++ & C++/CLI no problem.

if latter, C++/CLI is a pseudo superset of the current C++ standard (2003 TC1), if you use anything not in standard C++ its not portable to normal C++ compilers, but C++/CLI itself is portable and portable with other CLI languages, it will be easy to use with C#, J#, VB.NET etc and visa-versa. You can also quite easily mix unmanaged and managed code in C++/CLI.

Quote:
Original post by CProgrammer
I can get VS.net 2005 from my university. However I heard it isnt completely stable or compatible or something is this true?


VS and VC++ .NET 2005 are both in second beta quite stable but its still not final release.

Here is the most recent draft of the standard and if you goto MS's site you can find some video tutorials on C++/CLI.

[Edited by - snk_kid on June 2, 2005 6:18:29 AM]

Share this post


Link to post
Share on other sites
Well, it depends on what you mean, CProgrammer.

"Interchangable" - No. Not directly. You will have to make some modifications*.
"Interoperable" - Yes, but it's difficult.


* - A brief read of the C++/CLI document snk_kid linked shows that there will be less (perhaps no) changes necessaray for C++/CLI than for Managed C++. Also that interoperability may be eaiser too.

Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Russell
* - A brief read of the C++/CLI document snk_kid linked shows that there will be less (perhaps no) changes necessaray for C++/CLI than for Managed C++. Also that interoperability may be eaiser too.


You can certainly use the fundamental concepts learnt in Managed C++ to C++/CLI as most of it is the same but there are new things to learn.

It is bascially a new language you can think of it as C++ plus new keywords to allow C++ to gel well in managed environments, new components/libraries etc.

Generics + templates do kinda rock [smile], i'm still waiting to play with STL.NET.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
I take it as good news and it was necessary as Managed C++ was MS only and more like a complete hack, C++/CLI is ECMA standard soon to be ISO standardized (i think Joint ISO standard).
Not that it matters, because it will be a massive task to implement, and will only be useful to people looking to develop for Microsoft Windows.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
I take it as good news and it was necessary as Managed C++ was MS only and more like a complete hack, C++/CLI is ECMA standard soon to be ISO standardized (i think Joint ISO standard).
Not that it matters, because it will be a massive task to implement, and will only be useful to people looking to develop for Microsoft Windows.

http://mono-project.com/Main_Page

When will these people learn that "CLI/.NET" != "Windows only" ...

*sighs*

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!