Boost 1.58.0 windows process.h error

285 Views Asked by At

I am trying to port my application to use boost 1.58.0 from 1.53.0 Getting this error while compiling in windows

\include\boost/interprocess/detail/os_thread_functions.hpp(495): error C3861: '_beginthreadex': identifier not found

os_thread_functions.hpp includes <process.h> but my application also has a header file named process.h.

I guess os_thread_functions.hpp includes my application's process.h instead of Window's header and hence the error.

How do i force os_thread_functions.hpp to include the process.h from VS header files?

Thanks in advance

1

There are 1 best solutions below

0
On

os_thread_functions.hpp includes but my application also has a header file named process.h.

That should not have to be a problem as long as the include paths are well-managed.

In particular, you should

  • Not add your "current" directory to the include paths (the current directory is implicitly searched)
  • Include your header as "process.h", not <process.h>.

This comes down to #include <> being for "system" or "third party" include locations. See What is the difference between #include <filename> and #include "filename"?