Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

unistd.h is included inside the reactor namespace making the functions only available inside that namespace #1214

Closed
erlingrj opened this issue Jun 3, 2022 · 2 comments
Labels
cpp Related to C++ target

Comments

@erlingrj
Copy link
Collaborator

erlingrj commented Jun 3, 2022

If I try to use functions from unistd.h to do some simple file I/O with the C++ target I get an error and suggestion to use e.g. reactor::close and reactor::read. This is because unistd.h is already included in assert.hh, but the include statement is inside the reactor namespace. When I try to include unistd.h again it is caught by the include guards.

Due to this, I cannot include e.g. Boost into my LF Cpp program because it relies on some types and functions from unistd. I guess it is an easy fix and just move the include statement out of the reactor namespace?

@erlingrj erlingrj added the cpp Related to C++ target label Jun 3, 2022
@erlingrj
Copy link
Collaborator Author

erlingrj commented Jun 3, 2022

A proposed fix is here

@cmnrd
Copy link
Collaborator

cmnrd commented Jun 22, 2022

Closing this as lf-lang/reactor-cpp#14 was merged and the ref for reactor-cpp was updated on master.

@cmnrd cmnrd closed this as completed Jun 22, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cpp Related to C++ target
Projects
None yet
Development

No branches or pull requests

2 participants