How to include Apple 'frameworks' on Eclipse CDT

后端 未结 4 2032
一个人的身影
一个人的身影 2020-12-10 20:30

As a follow up to another question I recently asked, I realize my issue is that I don\'t know how to include Apple \'frameworks\' in the Eclipse CDT project properties so th

4条回答
  •  独厮守ぢ
    2020-12-10 21:01

    OK so I had to include like this:

    #include 
    

    Then add an include to the folder with the header file in Properties > C/C++ General > Paths and Symbols resulting in the following option for the compiler:

    -I/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers
    

    And, most notably, had to add the following options for libraries path and framework inclusion under Properties > C/C++ Build > Settings:

    -L/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries -framework OpenCL
    

    The above did the trick.

提交回复
热议问题