简体   繁体   中英

C++ Including Visual Studio header files in Qt project. <xstring> include error

I have found a library to generate barcodes ( libbarpp ). I would like to use this library in my Qt project.

Doing a svn checkout of the source: http://libbarpp.googlecode.com/svn/trunk/ reveals a nice VS example in the src folder. I opened the project in VS and found the included header files. I have included these header files in my Qt project, however i encountered a problem when several of the files required a system header file

#include <xstring>

In VS i can see the this file is located in (on my system):

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xstring 

However the files does not have any extension and i don't really know what to do with it.

Do i need to include something in my Qt project file in order to use this VS file?

I tried including

CONFIG += stl

to my Qt project file, but with no luck.

Any help or comments is greatly appreciated.

EDIT : I'm using Qt 5.2.1 with MinGW compiler

xstring is a Microsoft specific header that contains implementation of std::basic_string and some related specializations.

It shouldn't be included directly in the first place and unless the code you are talking about is using something implementation specific from that file you should be fine replacing it with just:

#include <string>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM