boostorg / boostorg/asio

Macro BOOST_ASIO_HAS_FILE not defined

Ouverte
#409 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C++
Étoiles
1.6k
Forks
485
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I am trying to compile basic program:

```cpp

#include
#include

auto main() -> int { auto b = boost::asio::basic_stream_file{}; }
```
`g++ ./not_compiling.cpp -std=c++20 -lboost -o boost_testing`
I receive following compilation error
```
$ g++ ./not_compiling.cpp -std=c++20 -lboost -o boost_testing
./not_compiling.cpp: In function ‘int main()’:
./not_compiling.cpp:5:38: error: ‘boost::asio’ has not been declared
5 | auto main() -> int { auto b = boost::asio::basic_stream_file{}; }
```

I believe that it is an issue with undefined macro `BOOST_ASIO_HAS_FILE`.

I've tried installing boost from arch repo, compiling from source on `boost-1.81.0/1.80.0` branches with the same result.
```
extra/boost 1.81.0-3 [installed]
Free peer-reviewed portable C++ source libraries (development headers)
```

```
g++ --version
g++ (GCC) 12.2.1 20230201
```

Manually defining macro in `/usr/include/boost/asio/detail/config.hpp` did not help and generated another compilation errors.

Now, why is that macro not defined? How can I fix it?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.