question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generated Xcode project with prebuilt_cxx_library can't find library headers

See original GitHub issue

I have a simple buck project for a static iOS library and some tests that use OCMock (https://github.com/ProfessaA/BuckWithPrebuiltStaticLib).

The way I have this setup is with OCMock’s headers and fat static library in a folder being built using the prebuilt_cxx_library build rule. The tests for the static library depend on the OCMock target, and import <OCMock/OCMock.h>. Tests run fine from the command line, but when I try to run tests on the project generated with buck, I get an error that <OCMock/OCMock.h> cannot be found.

Is there a way to get the generated Xcode project to know about the library headers so that I can edit my code in Xcode? Is there some other way more compatible with buck for including third party libs?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Conekocommented, Jan 12, 2017

You can use prefix_header to specify the prefix header. I guess it’s not documented either.

0reactions
alevinesccommented, Jan 12, 2017

perfect that’s what I needed, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode can't find header file - Stack Overflow
I opened my project and added framework Build Phases>Link Binary With Libraries. I m able to import header file of framework like #import...
Read more >
Helping Xcode Find Library Headers - Cocoanetics
If Xcode complains that it cannot find a header then you should make sure that it is indeed in a place where it...
Read more >
Static libraries into XCFramework | Apple Developer Forums
I have number of static libraries, all of them build as a fat library (arm64, ... be pre-built into an XCFramework using the...
Read more >
Why does Xcode require an unsafeFlag to find certain ...
Different header search behavior: swift build; swift run can compile and run the Package without unsafe flags. Xcode needs the unsafe flags to ......
Read more >
AppCode can't find header files for library sub project in ...
AppCode can't find header files for library sub project in Workspace. · 1. Uncompress the attached AppCodeBug.zip · 2. Open the MyWorkspace.xcworkspace file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found