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

Undeclared or undefined identifiers while trying to compile project #1383

Closed
alexmocanu opened this issue Aug 31, 2016 · 5 comments
Closed

Comments

@alexmocanu
Copy link

alexmocanu commented Aug 31, 2016

I'm trying to integrate this library into my Swift OSX project but every time I try to compile it I get errors like these:

Renderers/ChartYAxisRenderer.swift:272:111: Use of undeclared type 'NSTextAlignment'
Renderers/ChartYAxisRenderer.swift:299:105: Use of unresolved identifier 'NSFontAttributeName'
Renderers/ChartYAxisRenderer.swift:480:38: Use of unresolved identifier 'NSFontAttributeName'
Renderers/ChartYAxisRenderer.swift:470:72: Use of unresolved identifier 'NSForegroundColorAttributeName'
Charts/PieRadarChartViewBase.swift:558:41: Use of unresolved identifier 'CACurrentMediaTime'

There seems to be some missing imports in some classes. In the end, as a quick fix, I ended up adding the imports bellow to all files with these issues:

import QuartzCore
import AppKit
import Cocoa

Charts 2.2.5
OSX 10.11
Xcode 7.3.1

@alexmocanu alexmocanu changed the title Errors while trying to compile project Undeclared or undefined identifiers while trying to compile project Aug 31, 2016
@liuxuan30
Copy link
Member

liuxuan30 commented Sep 1, 2016

Have you run the OSX ChartsDemo project? It should be working.

@danielgindi
Copy link
Collaborator

I guess he dragged the code files, instead of dragging the Charts.xcodeproj to his project.

@thierryH91200
Copy link
Contributor

I see the same issue as well.

in places where there are errors
"Import Cocoa"
and it works

you can follow this link : https://github.com/thierryH91200/Charts-Mac

#1197

@liuxuan30
Copy link
Member

liuxuan30 commented Sep 2, 2016

can be closed now?

@alexmocanu
Copy link
Author

The issue was on my side. I dragged the code files themselves instead of the xcodeproj file.

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

4 participants