简体   繁体   中英

How do i call the header files that are inside folders in my library folder if i added search path like this $(SRCROOT)/Library?

I have a hierarchy like this in my project

  • Library
    • xfolder
      • xh
      • xc
    • yfolder
      • yh
      • yc
  • sample
  • sampleTests
  • Frameworks
  • Products

I added a $(SRCROOT)/Library in my Header search paths so i can call my headers inside the library folder. My question is do i still add a directory for it? like if xc wants to include yh do i place #include yh or #include yfolder/yh ?

I'd really appreciate answers, I'm still new to this and i want to add headers from ffmpeg source and it's really a lot of headers. Thanks

您可以使用相对路径,如下所示:#include“ ../yfolder/yh”

I can think of the following ways of #include ing yh in xc .

  1. Use path relative to $(SRCROOT)/Library

     #include <yfolder/yh> 
  2. Use path relative to xc

     #include "../yfolder/yh" 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM