"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::LibraryObjectmyList;
....
}
};
}
What occurs is I end up with a link 2001 error, trying to reference the
list<LibraryNamespace::LibraryObjectconstructor. Note that the Library
is
unmanaged code.
Could you please post the complete compiler error message?
--
Kind regards,
Bruno van Dooren
br**********************@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?$allocato r@VCoordinate@Magick@@@std@@@std@@$$FQAEXABVCoordi nate@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@VCoord inate@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::ILi st<IMCoordinate^>%
coordinateList) {
std::list<Magick::Coordinatelst;
for each (IMCoordinate^ point in coordinateList) {
lst.push_back(::Magick::Coordinate(point->X, point->Y));
}
pDraw = new CLASS(lst);
}
};