DJX
DJX

Reputation: 3

Matrix operation scheme in C++Builder 6

I have downloaded Boost 1.81.0, put the boost folder under the Include folder of C++Builder 6, and built a Console Wizard project.

In pointer_traits.hpp and allocator_access.h, there are multiple expression syntax errors, undefined symbol types, and the use of invalid template keywords. What about handling?

The main purpose is to realize matrix operations in C++Builder 6. I try to use open source libraries with good maintenance. We have other solutions.

image

image

image

How to use the Boost library correctly in C++Builder 6? I think it may be the way I'm using Boost is not correct.

Upvotes: -3

Views: 117

Answers (2)

Remy Lebeau
Remy Lebeau

Reputation: 596206

Boost requires at least C++11 (as evident by the E2209 Unable to open include file 'type_traits' error). The <type_traits> header was first introduced in C++11, but the C++ compiler in C++Builder 6 does not support C++11 at all, only C++98.

C++Builder 6 was released in 2002. Support for C++11 (in the form of a whole new compiler) wasn't added until C++Builder XE4 in 2013 (though the "classic" C++98 compiler has had a select few C++11 features added in the years since).

Upvotes: 2

Cryptolis
Cryptolis

Reputation: 94

Add #define BOOST_THREAD_USE_LIB before including thread.hpp.

Example:

#define BOOST_THREAD_USE_LIB
#include <boost/thread.hpp>

Then set 'Link with Dynamic RTL' and 'Link with Runtime Packages'.

Upvotes: -1

Related Questions