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

CocoaLumberjack not available #456

Closed
goodcyg opened this issue Feb 14, 2015 · 13 comments
Closed

CocoaLumberjack not available #456

goodcyg opened this issue Feb 14, 2015 · 13 comments

Comments

@goodcyg
Copy link

goodcyg commented Feb 14, 2015

  1. Add the lumberjack files to your project.
    2.Configure the framework.
    2.1 Write in the test.pch files
    #import "./CocoaLumberjack/Classes/CocoaLumberjack.h"
    #import "./CocoaLumberjack/Classes/DDLegacyMacros.h"

ifdef DEBUG

static const int ddLogLevel =LOG_LEVEL_VERBOSE;

else

static const int ddLogLevel = LOG_LEVEL_OFF;

endif

2.2 YGAppDelegate.m

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    [DDLog addLogger:[DDASLLogger sharedInstance]];
    [DDLog addLogger:[DDTTYLogger sharedInstance]];

    return YES;
    }

  • (void)applicationWillResignActive:(UIApplication *)application
    {
    DDLogError(@"ok");
    }
    Compile the project .Report an error

Ld /Users/Jackson/Library/Developer/Xcode/DerivedData/testlog-ahnjaufjbbzpuicykofoftfdpque/Build/Products/Debug-iphonesimulator/testlog.app/testlog normal x86_64
cd /Users/Jackson/Desktop/oc/testlog
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/Jackson/Library/Developer/Xcode/DerivedData/testlog-ahnjaufjbbzpuicykofoftfdpque/Build/Products/Debug-iphonesimulator -L/Users/Jackson/Desktop/oc/testlog/testlog/CocoaLumberjack/Framework/Mobile/build/Debug-iphoneos -L/Users/Jackson/Desktop/oc/testlog -L/Users/Jackson/Desktop/oc/testlog/testlog/CocoaLumberjack/Framework/Mobile/Build/Debug-iphoneos -F/Users/Jackson/Library/Developer/Xcode/DerivedData/testlog-ahnjaufjbbzpuicykofoftfdpque/Build/Products/Debug-iphonesimulator -F/Users/Jackson/Desktop/oc/testlog/testlog/CocoaLumberjack/Framework/Desktop/build/Debug -F/Users/Jackson/Library/Developer/Xcode/DerivedData/Lumberjack-hagiutaowmyznjdswctloqoaktgh/Build/Products/Release -F/Users/Jackson/Library/Developer/Xcode/DerivedData/Lumberjack-dknsbwmeyhqxyugzaxspmmklmamb/Build/Products/Release -F/Users/Jackson/Desktop/oc/testlog/testlog/CocoaLumberjack/Framework/Desktop/Build/Debug -filelist /Users/Jackson/Library/Developer/Xcode/DerivedData/testlog-ahnjaufjbbzpuicykofoftfdpque/Build/Intermediates/testlog.build/Debug-iphonesimulator/testlog.build/Objects-normal/x86_64/testlog.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -Xlinker -dependency_info -Xlinker /Users/Jackson/Library/Developer/Xcode/DerivedData/testlog-ahnjaufjbbzpuicykofoftfdpque/Build/Intermediates/testlog.build/Debug-iphonesimulator/testlog.build/Objects-normal/x86_64/testlog_dependency_info.dat -o /Users/Jackson/Library/Developer/Xcode/DerivedData/testlog-ahnjaufjbbzpuicykofoftfdpque/Build/Products/Debug-iphonesimulator/testlog.app/testlog

ld: warning: directory not found for option '-L/Users/Jackson/Desktop/oc/testlog/testlog/CocoaLumberjack/Framework/Mobile/build/Debug-iphoneos'
ld: warning: directory not found for option '-L/Users/Jackson/Desktop/oc/testlog/testlog/CocoaLumberjack/Framework/Mobile/Build/Debug-iphoneos'
ld: warning: directory not found for option '-F/Users/Jackson/Library/Developer/Xcode/DerivedData/Lumberjack-hagiutaowmyznjdswctloqoaktgh/Build/Products/Release'
ld: warning: directory not found for option '-F/Users/Jackson/Library/Developer/Xcode/DerivedData/Lumberjack-dknsbwmeyhqxyugzaxspmmklmamb/Build/Products/Release'
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_DDASLLogger", referenced from:
objc-class-ref in YGAppDelegate.o
"OBJC_CLASS$_DDLog", referenced from:
objc-class-ref in YGAppDelegate.o
"OBJC_CLASS$_DDTTYLogger", referenced from:
objc-class-ref in YGAppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

help me!!!

@goodcyg
Copy link
Author

goodcyg commented Feb 14, 2015

my system is Xcode 6.1,help me...

@DD-P
Copy link
Contributor

DD-P commented Feb 15, 2015

I would first search StackOverflow for the error "ld: symbol(s) not found for architecture x86_64" when building for iPhone / simulator. GitHub project issues tend to focus on specific project bugs / feature requests. (I'm not experienced on mobile, but I would expect x86_64 to be for MacOS X builds, so it may be that an Xcode project setting is incorrect).

@goodcyg
Copy link
Author

goodcyg commented Feb 15, 2015

I guess where settings are not correct, try many times will not work, so I posted to ask?
Embedded dylibs/frameworks are only supported on iOS 8.0 and later for architecture x86_64
I compiled here the old error? Xcode6 how to set up? Can give a detailed explanation?

@goodcyg
Copy link
Author

goodcyg commented Feb 15, 2015

help,help...

@goodcyg goodcyg closed this as completed Feb 15, 2015
@goodcyg
Copy link
Author

goodcyg commented Feb 16, 2015

Still errors . why?why?
Embedded dylibs/frameworks are only supported on iOS 8.0 and later for architecture x86_64

@goodcyg goodcyg reopened this Feb 16, 2015
@rivera-ernesto
Copy link
Member

So this is when not using CocoaPods right?

@goodcyg
Copy link
Author

goodcyg commented Feb 16, 2015

CocoaPods Already installed right.

@rivera-ernesto
Copy link
Member

CocoaPods may be installed but I think you're adding the files manually or using the Lumberjack project.

Can you try using a Podfile with pod 'CocoaLumberjack' in it?

Also as suggested by @DD-P, you may be better asking support questions in StackOverflow.

@robpearson
Copy link

👍 I hit this as well. I've been using CocoaLumberjack for ages w/ Cocoapods and v2.0 rc2 broke my build. I haven't investigated it much though. I'll add any additional details I can find.

@rivera-ernesto
Copy link
Member

Was it working with the previous rc?
Cleaning the project before building may also help.

@robpearson
Copy link

Resolved my issue tonight. I thought it was similar to this issue but it was completely different. I accidentally opened the xcode project instead of the workspace so it was a very easy fix.

@rivera-ernesto
Copy link
Member

Good to know! Does it solve your problem @goodcyg ?

@bpoplauschi
Copy link
Member

Closing, it should be fine now, since we also have the Manual install section doc

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

5 participants