Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

_OBJC_CLASS_$_MGLMapView #1862

Closed
halset opened this issue Jul 9, 2015 · 5 comments
Closed

_OBJC_CLASS_$_MGLMapView #1862

halset opened this issue Jul 9, 2015 · 5 comments

Comments

@halset
Copy link
Contributor

halset commented Jul 9, 2015

Just started a new swift project in Xcode 7 beta 3 and followed the steps on https://www.mapbox.com/guides/first-steps-gl-ios/

The build fail with the following error

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_MGLMapView", referenced from:
      type metadata accessor for ObjectiveC.MGLMapView in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is how my Podfile looks. Is this how is should be?

use_frameworks!
pod 'MapboxGL'

target 'MyApp' do

end

target 'MyAppTests' do

end

target 'MyAppUITests' do

end
@friedbunny
Copy link
Contributor

@halset Which version of CocoaPods are you using?

This could be CocoaPods weirdness, or it may be related to #1859.

@friedbunny
Copy link
Contributor

Or it could be that we just don't support Xcode 7 or Swift 2 yet — @1ec5?

@friedbunny
Copy link
Contributor

Actually, this looks like a dupe of #1847/#1849@halset could you follow the instructions in #1847 (comment) and report back?

@halset
Copy link
Contributor Author

halset commented Jul 9, 2015

Thank you very much. It is working now. And sorry for not finding the duplicate.

I am on CocoaPods 0.38.0.beta.2.

In fact, I only had to add "-ObjC" in one place. On Pods->Targets->MapboxGL->Other Linker Flags. Perhaps "-ObjC" could be added to ${MAPBOXGL_OTHER_LDFLAGS}?

screen shot 2015-07-09 at 16 36 28

@friedbunny
Copy link
Contributor

Glad you got this to work! We'll work on fixing this in #1849.

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

No branches or pull requests

2 participants