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

  • Home
  • SEARCH
  • 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 8050325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:03:54+00:00 2026-06-05T07:03:54+00:00

I have a Qt project and would like to use an external library that

  • 0

I have a Qt project and would like to use an external library that includes “afxstr.h”.
Problem is that whenever I compile after linking to the lib and including their header, I get an error:

#error afxstr.h can only be used in MFC projects.  Use atlstr.h

Of course, my project is not an MFC project and I can’t use atlstr.h instead because it’s not my library.

I’m looking for a quick solution!

I’m using VS2010.

The lib in question is the Interactive Brokers API.

  • 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-06-05T07:03:55+00:00Added an answer on June 5, 2026 at 7:03 am

    The respective setting is Configuration Properties/ General, Use of MFC.

    The compiler option implied from that is /D “_AFXDLL” when using MFC in a DLL.
    As for linker options, curiously the explicit linking of windows import libraries (such as kernel32.lib) get removed.

    Visual Studio seems to find the respective libraries automatically. However, the “Use of MFC” option is stored with the project file, so I can’t say how it would translates to a custom build script.

    The first include must be

    #include <afx.h>
    

    and you cannot include windows.h before that. Typically, that’s the first include in stdafx.h if you use precompiled headers. Other than that, other MFC headers can be included freely as needed.

    I doubt that this is the end of the story, getting MFC to play with anything is painful, and sometimes it’s easier to give up 🙂 A quick google reveals that there are solutions, but they involve additional code and are rather old.

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

Sidebar

Related Questions

I would like to use the libical library in my project, but I have
In my project I would like to have compile time checks on my existing
I have an MVC project that I would like to write in .NET 4.0
So in my project i would like have a nice treeview that has images.
I have a rails project that I would like to set up email notifications
I have a project that has components in several different directories and would like
I have a project A that is a Git repository. I would like to
We have a project (Web/PHP) where we would like users to access their files,
i have a code generator project i would like to offer like open source,
I have a project written in C and I would like to know if

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.