osx

How do I get the GCC __attribute__ ((constructor)) to work under OSX?

extern void MyInitFunc(void) __attribute__ ((constructor)); extern void MyTermFunc(void) __attribute__ ((destructor)); void MyInitFunc(void) { printf("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n"); } void MyTermFunc(void) { } I put this in a .c file which is present in the main application (not a library or framework). It doesn't get ...

Pylucene in Python 2.6 + MacOs Snow Leopard

Greetings, I'm trying to install Pylucene on my 32-bit python running on Snow Leopard. I compiled JCC with success. But I get warnings while making pylucene: ld: warning: in build/temp.macosx-10.6-i386-2.6/build/_lucene/__init__.o, file is not of required architecture ld: warning: in build/temp.macosx-10.6-i386-2.6/build/_lucene/__wrap0...

? login p list for mac os x

what is a login window plist ...

What C preprocessor conditional should I use for OS X specific code?

What C preprocessor conditional should I use for OS X specific code? I need to include a specific library if I am compiling for OS X or a different header if I am compiling for Linux. I know there is __APPLE__ but I don't know if that is a current conditional for OS X 10.x. ...

how to create new file using python

how can i create new file in /var/log directory using python language in OSX leopard? i tried to do it using os.open function but i get "permission denied" thanks in advance ...

How do I change the foreground or background colour of a Tkinter button on Max OS X 10.6 with Python 2.6.1?

I've been working through the Tkinter chapters in Programming Python and encountered a problem where the foreground and background colours of a button will not change. I am working on a Mac OS X 10.6 system with Python 2.6.1. The colours of a label will change, but not the colours of a button. For example: from Tkinter import * Label(N...

developing a osx deamon that runs before user login using xcode.

Hi I am trying to develop a daemon using objective-C/xcode. I am new to mac world and can I get an idea of what project template to choose in xcode and how to do it. Can I get a simple and basic daemon sample source code ? ...

How to view git objects and index without using git

Using the OS X terminal, How an you view the contents of these files as plain text? ...

Can I stop applications from grabbing focus in OS X?

Applications stealing focus is on of my biggest UI pet peeves. There's rarely a good reason for an application that I'm not using to interrupt what I'm doing. Is there a way to disable focus-grabbing globally in OS X? ...

Turbogears: Can not start paster after updateing to mac osx 10.6

After updateing to mac osx 10.6 I had to switch back to python 2.5 in order to make virtual env work. But still I can not start my turbogears project. Paster is giving this : Traceback (most recent call last): File ".../tg2env/bin/paster", line 5, in <module> from pkg_resources import load_entry_point File ".../tg2env/lib/python...

When was <input type=search> introduced in Safari

When was <input type=search.> (and type=range etc.) introduced in Safari? And can you find the blog-post to this item? I can't seem to find it. ...

x84_64 compatibility with 10.5.8

I would like to build an app with a universal binary containing: ppc, i386 and x86-64. The problem I have is that on 10.5.8 it tries to launch the x86-64 version and fails. Is there some configuration that will make 10.5.8 launch with the i386 code? ...

How to transform Python 3 script to Mac OS application bundle?

Is there currently a way to create an application bundle from Py3k script? py2app uses Carbon package and therefore, as far as I understand, cannot be ported to py3k - Carbon development was terminated. ...

How do I make Boost build for i386 on OS X 10.6?

I've been battling with Boost to make it compile as only 32 bit on 10.6, rather than 64 bit. Is there an easy edit I can make to the darwin-specific bjam config file? Thanks, Jon ...

How to emulate an ARM architecture under OSX 10.6 ("Snow Leopard")?

Hi everyone; I wish to emulate an ARM architecture (I wish to compile software for my DNS-323 NAS drive, to be more precise) and I'm having a hard time. First I tried installing Q, which is an OSX port of QEMU. It freezes when I try to launch it. Then I tried to download the source code for QEMU and apply a patch someone had written to...

Core Location in OS X 10.6 Snow Leopard

Is there a way to utilize this? 10.6 uses it to determine the time zone; it can be disabled in Security.prefPane. ...

Unix command used through Make file

hi i want to know if i create a make file of xcode application then we used UNIX command through application on real device.Is this possible? Thanks ...

Capture Screen Image in C++ on OSX

Is there a way to programatically take a screenshot (or somehow get access to an image) of the current screen display on a mac? Preferably, in C++, not Objective-C. ...

tokyo cabinet perl api libtokyocabinet.dylib, file is not of required architecture

Helle there, compiling the perl api for tokyo cabinet is diving me crazy ! i've always this error message : ld: warning: in /usr/local/lib/libtokyocabinet.dylib, file is not of required architecture i've tried de rebuild tokyop cabinet en 64bit with -arch x86_64 but nothing changes .. i'm using mac os x 10.6 (snow leop...

Getting type encodings for method signatures in Cocoa/Objective-C?

I need to construct an arbitrary NSMethodSignature with "signatureWithObjCTypes:" in Cocoa without having an object that I can ask for a signature with "methodSignatureForSelector:". For this, I need the method encoding, which e.g. is c12@0:4@8 for (BOOL) isEqual: (id) object I tried @encode(...) to obtain a type encoding, but th...