Skip to content

Commit df96969

Browse files
Added pkg-config support info to GSG (#543) (#582)
Signed-off-by: Dylan Benito <[email protected]> (cherry picked from commit 527fbca) Co-authored-by: Dylan <[email protected]>
1 parent eba3695 commit df96969

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

documentation/library_guide/onedpl_gsg.rst

+26
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,32 @@ To use tested C++ standard APIs, you need to include the corresponding C++ stand
4343
and use the ``std`` namespace.
4444

4545

46+
pkg-config Support
47+
==================
48+
49+
The pkg-config program is used to retrieve information about your installed libraries, and
50+
to compile and link against one or more libraries.
51+
52+
Use pkg-config with |onedpl_short|
53+
----------------------------------
54+
55+
Use pkg-config with the ``--cflags`` flag to get the include path to the oneDPL directory:
56+
57+
.. code:: cpp
58+
59+
dpcpp test.cpp $(pkg-config --cflags dpl)
60+
61+
The ``--msvc-syntax`` flag is required when you use a Microsoft Visual C++* compiler.
62+
This flag converts your compiling and linking flags to the appropriate form:
63+
64+
.. code:: cpp
65+
66+
dpcpp test.cpp $(pkg-config --msvc-syntax --cflags dpl)
67+
68+
.. note::
69+
Use the pkg-config tool to get rid of large hard-coded paths and make compilation more portable.
70+
71+
4672
Usage Examples
4773
==============
4874

0 commit comments

Comments
 (0)