Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTCoreText.h file not found #910

Closed
cboe opened this issue Sep 15, 2015 · 23 comments
Closed

DTCoreText.h file not found #910

cboe opened this issue Sep 15, 2015 · 23 comments

Comments

@cboe
Copy link

cboe commented Sep 15, 2015

For some reason I can't compile my app anymore and I can't for the live of me figure out why - it used to work once. How is it DTCoreText can't find its own header?

projectroot/Externals/DTCoreText/Core/Source/DTCoreTextFontDescriptor.h:9:9: 'DTCoreText/DTCoreText.h' file not found

I've set up a fresh submodule:

//.gitmodules
[submodule "Externals/DTCoreText"]
        path = Externals/DTCoreText
        url = https://github.com/Cocoanetics/DTCoreText.git

added it as a subproject

screen shot 2015-09-15 at 21 18 41

set header paths

screen shot 2015-09-15 at 21 18 59

(I've tried many variations here, though I don't think this is the source of the error?)

added library to link

screen shot 2015-09-15 at 21 18 26

any suggestions?

@cboe
Copy link
Author

cboe commented Sep 15, 2015

PS: I didn't forget

git submodule update --init --recursive

and the other linker flags: -ObjC

@schmidp
Copy link
Contributor

schmidp commented Sep 15, 2015

I have the same problem when using DTCoreText as a sub-project. It looks like imports within the the DTCoreText project should continue using:

#import "DTCoreText.h"

instead of

#import <DTCoreText/DTCoreText.h>

I guess the last release was only tested with frameworks (but those are only supported on iOS8 and later) and not as sub-projects.

@schmidp
Copy link
Contributor

schmidp commented Sep 15, 2015

This commit fixes it for me: openresearch@7de746e

@schmidp
Copy link
Contributor

schmidp commented Sep 16, 2015

Using ${TARGET_BUILD_DIR} as shown in the screenshot in the comments here:
openresearch@7de746e

solves the issue.

@cboe
Copy link
Author

cboe commented Sep 16, 2015

Thanks everyone, if you encounter this issue, please check the above thread for solutions!

@cboe cboe closed this as completed Sep 16, 2015
@odrobnik
Copy link
Collaborator

@schmidp @cboe would any of you mind sending me a pull request with the working changes... i.e. update the programming guide and/or project-wide settings?

@cboe
Copy link
Author

cboe commented Sep 16, 2015

for some reason it's not working anymore after i cleaned, getting

#include <DTCoreText/DTCoreText.h> file not found...

@cboe
Copy link
Author

cboe commented Sep 16, 2015

Correction:

The app runs, but when I archive it for multiple architectures, I get the above error. here are my header settings again:

screen shot 2015-09-16 at 15 48 52

@cboe
Copy link
Author

cboe commented Sep 16, 2015

Tried this xcode 6.4 and the new GM, same results, any idea to what's going on there?

@cboe cboe reopened this Sep 16, 2015
@cboe
Copy link
Author

cboe commented Sep 16, 2015

@schmidp @Cocoanetics have you tried creating an archive? Does it work for you?

@schmidp
Copy link
Contributor

schmidp commented Sep 23, 2015

I tried again now. I'm on the "develop" branch and cleared my "Derived Data" and it compiles now.
screen shot 2015-09-23 at 10 45 27
screen shot 2015-09-23 at 10 45 15

@cboe
Copy link
Author

cboe commented Sep 23, 2015

Still doesn't work for me - are you still including it as a sub-project? Shouldn't the import statement there be with "" instead of <>?

These are the header search paths, not user header search paths right? Anything in the user search paths? What is the toolchain include for?

@schmidp
Copy link
Contributor

schmidp commented Sep 23, 2015

Yes I'm using it as a sub-project.

This is the ${TARGET_BUILD_DIR}:

screen shot 2015-09-23 at 14 05 05

Notice the folders DTCoreText and DTFoundation. DTCoreText.h is in the Subfolder DTCoreText, not directly in ${TARGET_BUILD_DIR}, so you need to use <DTCoreText/DTCoreText.h>

The toolchain include is not related to DTCoreText as far as I remember.

@cboe
Copy link
Author

cboe commented Sep 23, 2015

Yes I have the same when I RUN it on simulator and it works. My problem is that it won't archive for deployment for a device - have you tried that?

@schmidp
Copy link
Contributor

schmidp commented Sep 23, 2015

Yes, I cleaned and even deleted the derived data directory. So basically a fresh setup.
I also just archived and released an app to the app store.

@cboe
Copy link
Author

cboe commented Sep 23, 2015

Must have something else wrong... That image above however can't be the build folder for that can it? That one's for the simulator, can you show me your build folder for the archive? That one seems to be somewhere completely different for me.

@cboe
Copy link
Author

cboe commented Sep 24, 2015

I've tried including it as a subproject in a completely fresh project and I get the same error as above when trying to create an archive.

I've also tried including the project as a framework, and now, when trying to run it, I get

/.../Externals/DTCoreText/Core/Source/DTHTMLAttributedStringBuilder.h:9:9: fatal error: 'DTFoundation/DTHTMLParser.h' file not found

I've then tried adding DTFoundation as a framework too with no difference.

am I the only one with these problems? It used to work before I updated the library and now it seems I can't get it to work with any of the options (can't use pods because I've made some local changes).

@schmidp
Copy link
Contributor

schmidp commented Sep 25, 2015

Can you add a screenshot of the TARGET_BUILD_DIRs content?
Can you also post the commit id of DTCoreText you are using?

@cboe
Copy link
Author

cboe commented Sep 27, 2015

Commit id is f855d6f

I'm a bit confused about the build path, but I assume this is the right folder - there are no headers there. In your example above you've only showed the iphonesimulator path, how does your archive path look?

screen shot 2015-09-27 at 22 08 54

screen shot 2015-09-27 at 22 03 58

@Dladu45
Copy link

Dladu45 commented Oct 5, 2015

I am also experiencing the same issue as cboe above on xCode 7. I have submitted 36+ builds using xCode 6 but I can not longer archive on xCode7. ${TARGET_BUILD_DIR} allowed me to build and use the simulator and I have tried deleting derived data. My build folder and header search paths look very similar to what is above.

@rickymc
Copy link

rickymc commented Dec 5, 2015

Still same thing here... was so desperate that I tried a lot of weird settings picking almost related stuff on stack overflow.
I don't know why, I don't care why, I don't even understand but here is what magically WORKED for me :

==> added this entry to Header Search Path entry (recursive) $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)

@odrobnik
Copy link
Collaborator

Since there has not being any activity on this issue in several months we are closing it for now. If you are interested in providing a fix or solution you are encouraged to provide a pull request.

Please read the release notes for the latest 1.6.20 release. If you still require assistance, you can hire me to work on your issues for a reasonable fee.

@onnoweb
Copy link

onnoweb commented Oct 11, 2018

I'm suddenly running into this same problem: <DTCoreText/DTCoreText.h> not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants