google / google/EarlGrey

Linker command failed issue, using Carthage built EarlGrey framework in the app

Open
#817 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
5.7k
Forks
737
Avg merge
1d 20h
Merged PRs (30d)
5

Description

Hi, I was able to build the project using carthage from second try and then I just dragged the .framework file to my main project. I don't use carthage folder in my main project. On the build phase I got:
Using XCode10.2.

Undefined symbols for architecture x86_64:
"_HC_greaterThan", referenced from:
+[GREYMatchers matcherForGreaterThan:] in EarlGrey(GREYMatchers.o)
"_OBJC_CLASS_$_HCStringDescription", referenced from:
objc-class-ref in EarlGrey(GREYHCMatcher.o)
"_HC_lessThan", referenced from:
+[GREYMatchers matcherForLessThan:] in EarlGrey(GREYMatchers.o)
"_IOHIDEventCreateDigitizerFingerEvent", referenced from:
-[GREYTouchInjector grey_injectTouches:] in EarlGrey(GREYTouchInjector.o)
"_HC_anything", referenced from:
+[GREYMatchers matcherForAnything] in EarlGrey(GREYMatchers.o)
"_HC_equalTo", referenced from:
+[GREYMatchers matcherForEqualTo:] in EarlGrey(GREYMatchers.o)
"_HC_closeTo", referenced from:
+[GREYMatchers matcherForCloseTo:delta:] in EarlGrey(GREYMatchers.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

That doesn't happen if I drag the whole EarlGrey project as a sub-project and follow all instructions.

Is there something missing for carthage installation?

Thanks in advance.

Contributor guide

Open the contributing guide

Research direction

Start with the Carthage installation and framework-linking instructions, then compare them with the app's build phases and the undefined symbols in the linker output. Verify the required EarlGrey dependencies are included so the app links successfully when using the built framework rather than the project as a sub-project.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
mobile, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.