[quoted text, click to view] "Bruno van Dooren [MVP VC++]" wrote:
> >I asked about this a few days ago, and not found an aswer yet, but I have
> > tracked down further info. I am getting the problems occrrung with the
> > stl,
> > under thses sorts of circumstances:
> >
> > #include "LibraryHeader.h"
> > #include <list>
> >
> > namespace MyNamespace {
> > public ref MyClass {
> > public:
> > MyMethod() {
> > list<LibraryNamespace::LibraryObject> myList;
> > ....
> > }
> > };
> > }
> >
> > What occurs is I end up with a link 2001 error, trying to reference the
> > list<LibraryNamespace::LibraryObject> constructor. Note that the Library
> > is
> > unmanaged code.
>
> Could you please post the complete compiler error message?
>
> --
>
> Kind regards,
> Bruno van Dooren
> bruno_nos_pam_van_dooren@hotmail.com
> Remove only "_nos_pam"
>
ok: I am trying to wrap the ImageMagick library at the moment: Here is a
paste of the message (with the real function names)
error LNK2001: unresolved external symbol "public: void __thiscall
std::list<class Magick::Coordinate,class std::allocator<class
Magick::Coordinate> >::push_back(class Magick::Coordinate const &)"
(?push_back@?$list@VCoordinate@Magick@@V?$allocator@VCoordinate@Magick@@@std@@@std@@$$FQAEXABVCoordinate@Magick@@@Z) NETMagick.obj
error LNK2001: unresolved external symbol "public: __thiscall
std::list<class Magick::Coordinate,class std::allocator<class
Magick::Coordinate> >::list<class Magick::Coordinate,class
std::allocator<class Magick::Coordinate> >(void)"
(??0?$list@VCoordinate@Magick@@V?$allocator@VCoordinate@Magick@@@std@@@std@@$$FQAE@XZ) NETMagick.obj
and the code causing it....
public ref class IMDrawableBezier : public
IMDrawable<Magick::DrawableBezier> {
public:
IMDrawableBezier(System::Collections::Generic::IList<IMCoordinate^>%
coordinateList) {
std::list<Magick::Coordinate> lst;
for each (IMCoordinate^ point in coordinateList) {
lst.push_back(::Magick::Coordinate(point->X, point->Y));
}
pDraw = new CLASS(lst);
}
};