C++/CLI std::wstring behaving VERY strangely in release build

Started by
13 comments, last by Raeldor 17 years, 6 months ago
Quote:Original post by Emmanuel Deloget
@Anonymous Poster: if writing new code in C++/CLI is a Bad Idea, how do you migrate the code you wrote in unmanaged C++ to your managed code base? You discard it and rewrite it in C#, trying to keep your customer happy while you are wasting his money?


Hi. I think you should read the post again, since you obviosly missed the point of it. "New code" isn't old code you are moving to .NET, new code is... NEW CODE. If you read the post again, you will notice that I said the only thing it's good for is migrating existing C++ code to .NET.
Advertisement
Quote:Original post by Anonymous Poster
Quote:Original post by Emmanuel Deloget
@Anonymous Poster: if writing new code in C++/CLI is a Bad Idea, how do you migrate the code you wrote in unmanaged C++ to your managed code base? You discard it and rewrite it in C#, trying to keep your customer happy while you are wasting his money?


Hi. I think you should read the post again, since you obviosly missed the point of it. "New code" isn't old code you are moving to .NET, new code is... NEW CODE. If you read the post again, you will notice that I said the only thing it's good for is migrating existing C++ code to .NET.


You'll typically leave your C++ codebase intact, meaning that you'll have to write the glue between your C++ components and your C# components. What kind magic of truely amazing magic do you use if you achieve to do this without writing new code?

The situation is the same when you just bought a C++ DLL and want to create a managed interface for this DLL. In this case, it is even more clear, as you didn't wrote the code of the DLL - thus, you still end up by writing new code.

Another situation that can arise is that you want to stress the last bits of your computer and you don't trust the CLI. You need "teh fastar" C++ (maybe with mixed asm), but you'll provide some glue to mix you code withing your managed application.

Whenever you have to create some software between a C++ code base and a managed software, you need to write new code - and C++/CLI perfectly fit the bill, as it has a foot in both worlds. You are perfectly free to ignore that. But don't tell us that C++/CLI is a dead beast - or if you do, provide sources. Without them, it is just another absurd AP claim.

Regards,
Quote:Original post by Emmanuel Deloget
But don't tell us that C++/CLI is a dead beast - or if you do, provide sources. Without them, it is just another absurd AP claim.


But you agree yourself that it's of limited use. If it's of limited use already now, it won't exactly become more useful with time. By your own admission it is dying. And you can't deny that it is one of the ugliest languages ever, syntax wise. That isn't helping its case either.

I know you like to troll APs, but tone it down a little. It becomes a little too obvious when you mention them by name.


Quote:Original post by Anonymous Poster
Quote:Original post by Emmanuel Deloget
But don't tell us that C++/CLI is a dead beast - or if you do, provide sources. Without them, it is just another absurd AP claim.


But you agree yourself that it's of limited use. If it's of limited use already now, it won't exactly become more useful with time. By your own admission it is dying. And you can't deny that it is one of the ugliest languages ever, syntax wise. That isn't helping its case either.

I know you like to troll APs, but tone it down a little. It becomes a little too obvious when you mention them by name.


Sorry, but it's patently obvious that you're the one trolling here, and while it may be that I have been trolled, I certainly have not lost. (Not to mention, what "mention by name" do you infer from "just another absurd AP claim"?)

If you actually are interested in making a rational argument, then (a) why not register? and (b) please do make such an argument.
Yikes, I didn't mean to start WWIII here. :S

I found the problem... I am a moron. I copy+pasted the library directories from debug to release so it was using the debug versions of the libraries, which I guess doesn't work too well when you try and pass across wstring(s) created with the non-debug version.

As far as C++/CLI goes, I am not using C++/CLI for anything other than wrapping my unmanaged code. C++ unmanaged is is great for game programming, but c# is better for UI programming (so tools are nice as a blend of managed/unmanaged). C++/CLI seems to not be good at either, but is a great glue tool, which is probably what MS intended it for.

Just my 2c.

This topic is closed to new replies.

Advertisement