Re: Leave NSLog()s in Final Product?
Re: Leave NSLog()s in Final Product?
- Subject: Re: Leave NSLog()s in Final Product?
- From: Jerry Krinock <email@hidden>
- Date: Mon, 15 Mar 2004 19:15:33 -0800
on 04/03/15 14:40, Timothy Carl Buchheim at email@hidden wrote:
>
Test it with a simple test application. It works for me:
>
Timothy, thanks for showing me how to do this. It looks like the problem is
with my system and not with CodeWarrior:
ENG1-0020:~ jk$ mkdir test.app
ENG1-0020:~ jk$ mkdir test.app/Contents
ENG1-0020:~ jk$ mkdir test.app/Contents/MacOS
ENG1-0020:~ jk$ cat > test.m
#import <Foundation/Foundation.h>
main () {
NSLog(@"Hello, World");
}
// Here I did some poking around with ls, "man cat" and "less" to
// learn what it was I had just created. Then,
ENG1-0020:~ jk$ gcc -o test.app/Contents/MacOS/test test.m -framework
Foundation
// This took a few seconds, did not issue any errors or warnings.
// So now, I "open" it.
ENG1-0020:~ jk$ open test.app
ENG1-0020:~ jk$ tail -1 /Library/Logs/Console/jk/console.log
2004-03-12 06:13:20 -0800
ENG1-0020:~ jk$
The third line there should have said, "Hello, World". So it did not work.
Also, nothing showed up in Console's /Library/Logs/Console/jk/console.log
either.
To verify that I built the test app correctly, I ran the executable from
Terminal...
ENG1-0020:~ jk$ cd test.app/Contents/MacOS
ENG1-0020:~/test.app/Contents/MacOS jk$ ./test
2004-03-15 19:09:33.868 test[26276] Hello, World
ENG1-0020:~/test.app/Contents/MacOS jk$
and as you can see it worked fine.
Thanks again,
Jerry
>
Test it with a simple test application. It works for me:
>
>
>
gouda:/tmp tim$ mkdir test.app
>
gouda:/tmp tim$ mkdir test.app/Contents
>
gouda:/tmp tim$ mkdir test.app/Contents/MacOS
>
gouda:/tmp tim$ cat > test.m
>
#import <Foundation/Foundation.h>
>
main() {
>
NSLog(@"Hello, World");
>
}
>
gouda:/tmp tim$ gcc -o test.app/Contents/MacOS/test test.m -framework
>
Foundation
>
gouda:/tmp tim$ open test.app
>
gouda:/tmp tim$ tail -1 /Library/Logs/Console/tim/console.log
>
2004-03-15 14:38:44.293 test[3553] Hello, World
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.