Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6637523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:19:33+00:00 2026-05-25T23:19:33+00:00

I recently started writing a C++/CLI wrapper for a native c++ library. I’m now

  • 0

I recently started writing a C++/CLI wrapper for a native c++ library. I’m now getting this compile warning

“warning LNK4249: directive ‘/CLRTHREADATTRIBUTE:STA’ conflicts with command line; ignored”

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_gcroot.h’ to point to managed classes from unmanaged ones. In the native c++ library that is being wrapped, I include the following headers:

#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxmt.h>
#include "Winsock2.h."
#include <time.h>

Does anybody have any advice that could help me avoid painful experiences in the future, or should I just not worry about it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:19:34+00:00Added an answer on May 25, 2026 at 11:19 pm

    So far so good. I haven’t seen any real problems with this; I think it is just because MFC is a single threaded library, so it wants to compile that way. So, for my case, I think as long as I treat all MFC objects and such as not thread-safe I’ll be okay.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently started tinkering with ASP.NET MVC, but this question should apply to classic
I'v been playing with java applets recently. In the one im writing now I
I have recently started looking into using Azure but I'm having some issues getting
I recently started playing around with writing Perl (v5.8.8) extensions using XS. One of
This is my first post, and I've only recently started programming for Android and
I've been a web developer for some time now, and have recently started learning
I've been writing programs using OpenGL. Recently, I started learning OpenGL Shading Language. I'm
I downloaded Flash Builder from here : Download I recently started writing some small
I'm writing an iPhone application using Monotouch and recently the app has started crashing
I recently started using R language and now i am using R for most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.