osx

How to install gnu ld on mac os x 10.6 ?

Hi, I'm having a lot of trouble compiling the otherwise excellent Contiki OS on my macbook pro (with mac os x 10.6). Contiki actually uses a lot of GNU-specific features and options of GCC, AR, LD, and so on. So I installed those utilities via macports, but it looks like "port install binutils" does not install GNU ld, does it ? So, th...

osx php script throwing segmentation fault

I have a php script running on OSX snow leopard. When I run it from the command line it throws 'Segmentation Fault'. If I put an exit() at the end of the file, it doesn't throw the error. Why is the exit needed? ...

Does anyone know if there is a performance benefit to fullscreen opengl vs windowed opengl in OSX?

The client for the MMO I work on uses two contexts, one for a window view and one fullscreen. I'm wondering if I just use a window sized to the display I can simply resize it if the user wants a smaller window so they can access their desktop. Is their a performance penalty for running opengl in a window vs fullscreen assuming the same ...

unnecessary (?) Xcode warning

I'm running Xcode in OS X 10.6 on a Core 2 Duo. Here's a short program: #include <stdio.h> int main () { long a = 8589934592L; printf("a = %li\n", a); return 0; } When I compile this from the command line (gcc -pedantic) I get no errors or warning. When I compile this in Xcode in debug configuration, I get no errors or ...

How do you enforce the minimum OS requirements in a Cocoa app?

My app needs to run on 10.4 or later. If I launch it on 10.3 it just fails to launch or crashes. How do you tactfully enforce minimum system requirements? Can you customize the message it shows? ...

Time of shutdown on Mac OS X

Possible Duplicate: Receiving power notifications (especially shutdown) on Mac OSX Hi Guys, I'd like to be able to log the times that my mac is switched on and off during the day (keeping track of my hours jacked-in). Switched on is easy: I just have a tiny script that writes the time to a logfile when the user logs on, but I c...

How do you create an alias in Cocoa? Is a symlink good enough?

I couldn't find a convenient way to create an alias, so I went with a symlink. I'm worried that that might not be good enough. Maybe the icon doesn't show on some versions of OS X or something like that. [[NSFileManager defaultManager] createSymbolicLinkAtPath:aliasPath withDestinationPath:destPath error:nil]; Is this sort of thing th...

iTunes Connect API

Does iTunes Connect has an API? How do some applications download financial and sale reports to computer? Are there some C/Objective-C API wrappers? Thanks in advance. ...

What's the best way to find if the processor type is PPC or Intel in Cocoa? (Do I have to use Carbon?)

I need to get it as a string to use elsewhere in the program, I'm not worried about compiler settings. I found HowToGetHardwareAndNetworkInfo on CocoaDev, but it seemed a little intense when all I wanted to know is PPC vs. Intel. ...

Distributing source files with an open source app

I have written an open source (GPL) application for Linux and OSX and now wish to distribute it. Is it normal to distribute the source code along with the binaries by default, or just provide a link to where it can be obtained? If I include the source files, where is the normal location for writing them on the users system for Linux an...

Setup Google Test (gtest) with Eclipse on OS X

What is the procedure to setup Google Test to work under Eclipse on Mac OS X? I followed the instruction in README to compile and install gtest as framework from XCode. Now I want to use gtest with Eclipse. Currently, it compiles fine but fails during build. I suppose Eclipse does not use framework concept as XCode does and need a diff...

JMenuItem accelerator not working after showing two non-modal JDialogs? (Mac only?)

I have the problem that the accelerators of JMenuItems aren't working anymore after showing two JDialogs directly after one another. Please take a look at this small example that reproduces the problem: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class DialogBug { public static void main(String[] args)...

On-screen keyboard for touchscreen app

I am developing a kiosk-style application that is going to be used with a touchscreen. Are there any simple, well-written on-screen keyboards for Cocoa? Note that this is not for an iPhone app, but rather targetting OS X 10.5/10.6. Thanks. ...

pecl:command not found.

I'm trying to run the following command in terminal on my macbook pro cd /tmp; pecl download memcached but im getting pecl:command not found. after a days googling I cant find out whats up. Does anyone have a solution? ...

Starting programming Mac OS X

I'm starting a Mac OS X app that will connect to a small website I'm currently developing. The idea is that the app will store a number of snippets on a local database and then sync with the website whenever it can. So my questions are: Carbon or Cocoa? SQLite for local storage / another solution? Is there any decent free text-edito...

Retrieving the memory map of its own process in OS X 10.5/10.6

In Linux, the easiest way to look at a process' memory map is looking at /proc/PID/maps, giving something like this: 08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm 08056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm 08058000-0805b000 rwxp 00000000 00:00 0 40000000-40013000 r-xp 00000000 03:0c 4165 /lib/...

Getting large file and folder icons on a Mac

This article says: At this time, there is no public API for getting larger file and folder icons from Java on a Mac. That was on Dec 2008 and for Java 1.5 Is there a way to access larger file folders from Java on a Mac in the latest release? ...

How to read/convert classic MAC app file on MAC OSX

Hi All, I am new to MAC environment. Is there any way that I can convert classic MAC app file so that it can be read on MAC OS X? Also, is there any good tutorial for how to write .app file for a JAVA application. Thanks ...

How to set VM for a java application in MAC OS X

I am setting my VM for my java application in windows using a batch file with following command: java -jar -Xmx800m "App.jar" Now I wanna do the same thing for MAC OS X? Any suggestions? ...

locale.getlocale() problems on OSX

I need to get the system locale to do a number of things, ultimately I want to translate my app using gettext. I am going to distribute it on both Linux and OSX, but I ran into problems on OSX Snow Leopard: $ python Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" f...