Hello everyone,
I recently started writing a C++/CLI wrapper for a native c++ library. I'm now getting this compile warning
My c++/cli wrapper is set up for MTA in the linker's command line arguments, but I have no idea what file or project is trying to give the STA directive.
I did enough reading to get worried about .NET forcing libraries to become multi-threaded. I've read that this mostly affects my application's use of COM, but I am not really sure if or where my DLL uses COM. I use the interop services to marshal string data and am using 'msclr\auto_gcr oot.h' to point to managed classes from unmanaged ones. In the native c++ library that is being wrapped, I include the following headers:
Does anybody have any advice that could help me avoid painful experiences in the future, or should I just not worry about it?
By the way, thanks Andreas Wieberneit for posting the article http://www.codeguru.co m/cpp/cpp/cpp_...icle.php/c6867 that helped me get started on all this.
I recently started writing a C++/CLI wrapper for a native c++ library. I'm now getting this compile warning
Code:
"warning LNK4249: directive '/CLRTHREADATTRIBUTE:STA' conflicts with command line; ignored"
I did enough reading to get worried about .NET forcing libraries to become multi-threaded. I've read that this mostly affects my application's use of COM, but I am not really sure if or where my DLL uses COM. I use the interop services to marshal string data and am using 'msclr\auto_gcr oot.h' to point to managed classes from unmanaged ones. In the native c++ library that is being wrapped, I include the following headers:
Code:
#include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxmt.h> #include "Winsock2.h." #include <time.h>
By the way, thanks Andreas Wieberneit for posting the article http://www.codeguru.co m/cpp/cpp/cpp_...icle.php/c6867 that helped me get started on all this.