Where is the STL.NET?

R

rodrigostrauss

I'm using Visual Studio 2005 Professional, and I didn't find the
STL.NET. This code:

#include "stdafx.h"
#include <vector>

using namespace System;
using namespace std;

int main(array<System::String ^> ^args)
{
vector<String^> v;
// don't work either
//vector<String^>^ v = gcnew vector<String^>();

v.push_back("sdfsdfsd");

return 0;
}

just gives me this:

------ Build started: Project: cppcli1, Configuration: Debug Win32
------
Compiling...
cppcli1.cpp
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(2752) :
error C4439: 'std::fill' : function definition with a managed type in
the signature must have a __clrcall calling convention
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1187) : see reference to function template
instantiation 'void std::fill<System::String^*,_Ty>(_FwdIt,_FwdIt,const
_Ty &)' being compiled
with
[
_Ty=System::String ^,
_FwdIt=System::String ^*
]
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1117) : while compiling class template member
function 'void
std::vector<_Ty>::_Insert_n(std::_Vector_iterator<_Ty,_Alloc>,unsigned
int,const _Ty &)'
with
[
_Ty=System::String ^,
_Alloc=std::allocator<System::String ^>
]
.\cppcli1.cpp(11) : see reference to class template
instantiation 'std::vector<_Ty>' being compiled
with
[
_Ty=System::String ^
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(3021) :
error C4439: 'stdext::_Unchecked_move_backward' : function definition
with a managed type in the signature must have a __clrcall calling
convention
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1200) : see reference to function template
instantiation '_BidIt2
stdext::_Unchecked_move_backward<System::String^*,System::String^*>(_BidIt1,_BidIt1,_BidIt2)'
being compiled
with
[
_BidIt2=System::String ^*,
_BidIt1=System::String ^*
]
Build Time 0:03
Build log was saved at
"file://c:\temp\code\cppcli1\cppcli1\Debug\BuildLog.htm"
cppcli1 - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

There's a C:\Program Files\Microsoft Visual Studio 8\VC\include\msclr
folder, but it has only few header, like auto_gcroot.h.
I've found some __CLRCALL_OR_CDECL macros before STL functions, and it
resolves to __clrcall if you're using /clr. But I didn't get it to work
even with just /clr (no pure or safe). Any ideas?

Rodrigo Strauss
 
C

Carl Daniel [VC++ MVP]

I'm using Visual Studio 2005 Professional, and I didn't find the
STL.NET. This code:

#include "stdafx.h"
#include <vector>

using namespace System;
using namespace std;

int main(array<System::String ^> ^args)
{
vector<String^> v;
// don't work either
//vector<String^>^ v = gcnew vector<String^>();

v.push_back("sdfsdfsd");

return 0;
}

It hasn't been released yet. It should be released as a web download some
time soon (how soon? I don't know).

When it's released, you'll have to make a few changes to your code to use it
(classes in stdcli:: namespace for one, header naming differences for
another).

-cd
 
N

nikolad

Actually, you are not using STL.Net, just plain STL, which does not work with managed types.

STL.Net has been postponed to after VS2005. It is in development right now. We are working on ensuring good performance and correctness in all scenarios. You may see some information about upcoming release of STL/CLR soon on either mine or Martyn's blogs.

Thanks,
Nikola

--------------------------------------------------------------
Nikola Dudar
Visual C + Team
This posting is provided 'AS IS' with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
Suggestions? Bugs? Please report them on http://lab.msdn.microsoft.com/productfeedback/



-----Original Message-----
From: (e-mail address removed)
Posted At: Tuesday, November 15, 2005 5:24 PM
Posted To: microsoft.public.dotnet.languages.vc
Conversation: Where is the STL.NET?
Subject: Where is the STL.NET?


I'm using Visual Studio 2005 Professional, and I didn't find the
STL.NET. This code:

#include "stdafx.h"
#include <vector>

using namespace System;
using namespace std;

int main(array<System::String ^> ^args)
{
vector<String^> v;
// don't work either
//vector<String^>^ v = gcnew vector<String^>();

v.push_back("sdfsdfsd");

return 0;
}

just gives me this:

------ Build started: Project: cppcli1, Configuration: Debug Win32
------
Compiling...
cppcli1.cpp
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(2752) :
error C4439: 'std::fill' : function definition with a managed type in
the signature must have a __clrcall calling convention
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1187) : see reference to function template
instantiation 'void std::fill<System::String^*,_Ty>(_FwdIt,_FwdIt,const
_Ty &)' being compiled
with
[
_Ty=System::String ^,
_FwdIt=System::String ^*
]
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1117) : while compiling class template member
function 'void
std::vector<_Ty>::_Insert_n(std::_Vector_iterator<_Ty,_Alloc>,unsigned
int,const _Ty &)'
with
[
_Ty=System::String ^,
_Alloc=std::allocator<System::String ^>
]
.\cppcli1.cpp(11) : see reference to class template
instantiation 'std::vector<_Ty>' being compiled
with
[
_Ty=System::String ^
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(3021) :
error C4439: 'stdext::_Unchecked_move_backward' : function definition
with a managed type in the signature must have a __clrcall calling
convention
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1200) : see reference to function template
instantiation '_BidIt2
stdext::_Unchecked_move_backward<System::String^*,System::String^*>(_BidIt1,_BidIt1,_BidIt2)'
being compiled
with
[
_BidIt2=System::String ^*,
_BidIt1=System::String ^*
]
Build Time 0:03
Build log was saved at
"file://c:\temp\code\cppcli1\cppcli1\Debug\BuildLog.htm"
cppcli1 - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

There's a C:\Program Files\Microsoft Visual Studio 8\VC\include\msclr
folder, but it has only few header, like auto_gcroot.h.
I've found some __CLRCALL_OR_CDECL macros before STL functions, and it
resolves to __clrcall if you're using /clr. But I didn't get it to work
even with just /clr (no pure or safe). Any ideas?

Rodrigo Strauss
 
R

rodrigostrauss

Ok, thanks for the info.

But is there any reason to the __CLRCALL_OR_CDECLs before some STL
functions?

Rodrigo Strauss
 
N

nikolad

Yes, Nish got the idea. This is to ensure that STL can be used in applications compiled /clr and /clr:pure.

Nikola


-----Original Message-----
From: Nishant Sivakumar
Posted At: Wednesday, November 16, 2005 8:42 AM
Posted To: microsoft.public.dotnet.languages.vc
Conversation: Where is the STL.NET?
Subject: Re: Where is the STL.NET?


See http://blog.voidnish.com/?p=94
 
N

Nishant Sivakumar

Actually, in the final release of VC++ 2005, STL.NET has been totally
removed; and as far as I know, it was left in Beta 2 as an accident (someone
forgot to remove it). So, irrespective of what edition of VS 2005 you have -
you are not going to have the STL.NET bits.

I believe it will be available as a separate download (beta) in a month or
two.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top