-
October 13th, 2019, 10:02 AM
#16
Re: How to learn c++/cli?
Did you install c++/cli support when you installed VS (it's separate from c++)? If not, you'll need to install this from VS Installer.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 13th, 2019, 11:28 AM
#17
Re: How to learn c++/cli?
Thanks 2kaud - I just installed the option for C++/CLI and I'm now seeing C++/CLI support for v142 build tools (14.2.3) listed among my installed options. However... I still don't see any way to create a C++/CLI project. I do see an option to create a CLR Empty Project but I'm not sure if that's the same thing (and in any case, I think that one was already there previously)
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
October 13th, 2019, 12:19 PM
#18
Re: How to learn c++/cli?
For project templates, you should have CLR Empty project, CLR Console App, CLR Class Library. That's what I get with my VS2019 installation.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 13th, 2019, 12:36 PM
#19
Re: How to learn c++/cli?
Thanks 2kaud - so if I wanted to start with a simple "Hello World" app (i.e. using a GUI window) there isn't an option that'll start me off with the basic code?
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
October 13th, 2019, 01:56 PM
#20
Re: How to learn c++/cli?
John, what's the goal here? Is it to learn .net programming? If so, I wouldn't recommend going the C++/CLI route, because this language isn't kept current as the other languages are. For example, 2kaud mentioned the 3 new project types for C++/CLI. For comparison, C# has about 50 different new project types.
-
October 14th, 2019, 01:29 AM
#21
Re: How to learn c++/cli?
Hi Arjay - I work on a large software project that's written in C++. When I first started with it (10 years ago) we were building with Visual C++. But the vendor needed to go cross-platform so I've had to move to gcc. For me, the problem with gcc is its debugger which isn't a patch on Visual C++'s debugger. So I just wondered if there's some quirk I could use to get Visual Studio back into the picture somehow.
Some of Microsoft's other languages have made great strides in targetting other platforms but VC++ seems to be staunchly stuck in the stone age. It's a huge shame IMHO. VC++ is a great development tool but the fact that it'll only target Windows makes it very difficult to justify any more for serious development....
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
October 14th, 2019, 02:32 AM
#22
Re: How to learn c++/cli?
.Net Core is cross platform and with C# you have the option of building many different types of apps that aren't available in C++/CLI.
-
October 14th, 2019, 02:42 AM
#23
Re: How to learn c++/cli?
The project's way too big to convert everything to C#
My memory's a bit hazy on all this but when I last looked into this a few years ago, C# could incorporate modules written in something called "Managed C++". But AFAIK Managed C++ is obsolete now (replace by C++/CLI?). I don't think C# could incorporate ordinary (unmanaged) C++ though.
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
October 14th, 2019, 04:19 AM
#24
Re: How to learn c++/cli?
Think of c++/cli as Managed C++ v2. Managed C++ was MS first attempt at enabling C++ to use .net. After it was released and started to be used from the feedback received MS came out with C++/cli which replaced Managed C++ but with the same objective of allowing C++ to use .net.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 14th, 2019, 04:21 AM
#25
Re: How to learn c++/cli?
Originally Posted by John E
Thanks 2kaud - so if I wanted to start with a simple "Hello World" app (i.e. using a GUI window) there isn't an option that'll start me off with the basic code?
Search www.codeproject.com for c++/cli. There are various examples of learning and using c++/cli.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 14th, 2019, 04:24 AM
#26
Re: How to learn c++/cli?
Note that AFAIK converting a pure c++ program to c++/cli that uses .net isn't straight forward. One of the issues is that .net uses managed memory and c++ doesn't. That's why in c++/cli code you see ^ (boxing) applied to variables to indicate that these are .net managed variables etc etc etc.
Have a read of http://www.gotw.ca/publications/C++CLIRationale.pdf by Herb Sutter (designer of the language).
Last edited by 2kaud; October 14th, 2019 at 04:33 AM.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 14th, 2019, 06:19 AM
#27
Re: How to learn c++/cli?
Originally Posted by 2kaud
Search www.codeproject.com for c++/cli. There are various examples of learning and using c++/cli.
Thanks 2kaud - I ended up downloading this sample project (the one called Hello C++/CLI project)
When I build the downloaded project it all builds fine - but if I copy its source files into the empty project I created yesterday I see compiler errors like these) :-
Code:
name followed by '::' must be a class or namespace name
'Windows': is not a member of 'System'
'Forms': is not a member of 'System'
'MessageBox': is not a member of 'System'
[Edit...] I fixed it. I needed to add a couple of References to my project (System and System.Windows.Forms)
Last edited by John E; October 14th, 2019 at 07:46 AM.
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
October 14th, 2019, 10:08 AM
#28
Re: How to learn c++/cli?
It pains me to see you starting to learn nearly 20 year old technology, i.e., System.Windows.Forms.
-
October 14th, 2019, 10:27 AM
#29
Re: How to learn c++/cli?
Yeah, I'm beginning to realise this is all a bit pointless...
The only real solution is for Microsoft to bring out a cross-platform version of VC++ (gcc managed it more than a decade ago so I'm surprised that MS can't)
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
October 14th, 2019, 10:34 AM
#30
Re: How to learn c++/cli?
Originally Posted by John E
Yeah, I'm beginning to realise this is all a bit pointless...
The only real solution is for Microsoft to bring out a cross-platform version of VC++ (gcc managed it more than a decade ago so I'm surprised that MS can't)
Technically, MS of course could. Marketing/Politically is a different issue!
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|