osx

[macosx]does dlopen call open and read functions?

Hello, I've intercepted(interposed) dlopen function under MacOS X and some other functions. I see how my applications calls dlopen in the log, but don't find anything related to open/read functions after dynamic library was dlopened. How does the system accesses and reads the dynamic library file? I've looked at the source code of dyld,...

Revert to Leopard

Hi, Ia develop with Xcode C++ programs, before in Leopard and now in Snow Leopard. I am experiencing in SL a lot of new and stupuid problems. You can find a lot of them in SO just looking for "snow leopard". I am considering reverting to Leopard wich worked just fine. I ask you about how many of you would do the same in order to avoid t...

Selecting OSX SDK version in Eclipse and Makefiles

I have a development Mac running 10.5. This causes my apps to not work in 10.4 (Google "_nsdefaultrunloopmode tiger"). I read the solution is to install the 10.4 SDK and compile against that. I have it installed (at least I have /Developer/SDKs/MacOSX10.4u.sdk) Now I can't find a way to actually use that - I'm doing two things: 1) Comp...

How to create click events by ruby.

Hi. I wanna to create mouse click events by ruby. left-click, right-click is there some library to do this? thanks for your concerns. ...

How can I easily install arm-elf-gcc on OS X?

Please let me know if this should be on Server Fault... I've got some code I want to compile which requires arm-elf-gcc. I'm not an embedded programmer, so all this is new to me. My development machine is a Mac and I use fink pretty often, so I'd love to be able to install it that way. However, fink doesn't know of any package with that...

Finder-style UI for NSURL bookmarkData resolution with missing file?

I am using the new NSURL bookmark data API introduced in OS X 10.6 to store an "alias" to a file system resource. When I use +[NSURL URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:] to resolve the bookmark data, I get nil if the file no longer exists. Since I am not passing NSURLBookmarkResolutionWithoutUI...

login from cygwin to Mac OS X using xterm problem

open cygwin shell run ssh -Y user@MACOSXSERVER "No xauth data using fake authentication data for X11 forwarding" <-- Warning login MACOSXSERVER OK set DISPLAY=CYGWINIP:0.0 xterm & And I get the following error Xlib: connection to "CYGWINIP:0.0" refused by server Xlib: No protocol specified What went wrong? ...

C++ using getline() prints: pointer being freed was not allocated in XCode

I'm trying to use std:getline() but getting a strange runtime error: malloc: * error for object 0x10000a720: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug This is the code that produces this error: //main.cpp #include <iostream> #include <sstream> int main (int argc, char * const argv[]...

String.getBytes("ISO-8859-1") gives me 16-bit characters on OS X

Using Java 6 to get 8-bit characters from a String: System.out.println(Arrays.toString("öä".getBytes("ISO-8859-1"))); gives me, on Linux: [-10, 28] but OS X I get: [63, 63, 63, -89] I seem get the same result when using the fancy new nio CharSetEncoder class. What am I doing wrong? Or is it Apple's fault? :) ...

Compiling C++ for MacOSX 10.5 and 10.6

I have a reasonably simple C++ program that I can successfully compile on OSX 10.6 using: g++ -O3 -funroll-loops -I /usr/local/include/boost-1_39/ myfile.cpp -o build/myfile However, a user on OSX 10.5 gets the error: dyld: unknown required load command A support forum post suggests adding -isysroot /Developer/SDKs/MacOSX10.5.sdk ...

How to get mp3 files to play in iPhone Safari web browser?

How can I get an MP3 audio file to play in iPhone Safari (OS 3.1)? Currently, I am generating HTML e.g. <a href="file.mp3"><img src="sound.png" alt="Play audio"/></a> to play the file on clicking on the nested image. This works on Safari on OSX, but not on the iPhone. There, the content of the file is shown as text, but it does not a...

Unmounting removable drive in AIR 2 beta

Hello, I ran into a huge problem with my AIR project today (I'm using new AIR 2 beta SDK). Is it possible at all to unmount a flash drive from inside the AIR app on Mac OS X? I can't find any solutions. Thanks! ...

Mach-O Executable: How to obtain pointers into the __StaticInit segment?

I am writing a program that heavily modifies the basic structure of an executable in order to obfuscate it, making disassembly and reverse-engineering tougher. I have a question about the __StaticInit segment. I know that inside an ordinary Mach-O file this segment contains code to initialize static variables. I also know that this code ...

xcode location (installation path) help

Hi, I am new to mac os. I started to deveople Iphone appliactions and it was strange to me cause I had to look in finder everytime to open xcode so I moved it in applications folder. But is not working anymore and I dont know where was the prevoius location in order to move there again. Where should i put? Plzz help ...

[MacOSX] Question on NSObjectFileImage

Hello, Having NSObjectFileImage object, is it possible to execute bundled application? I'm trying to load a application bundle from the memory. Using NSCreateObjectFileImageFromMemory on simple GUI application, I loaded the bundle from the memory, and then tried to NSLinkModule. Then, did the NSLookupSymbolInModule on _main function an...

Debugging and killing apps on Mac OS X?

Hey all, I'm in the process of debugging a C++ app on mac os 10.5. Occasionally, I'll do something bad and cause a segfault or an otherwise illegal operation. This results in the app hanging for a while, and eventually a system dialog notifying me of the crash. The wait time between the "hang" and the dialog is significant; a few minutes...

Race condition when calling FSDeleteObject

I have implemented a "safe save" operation that goes something like this: Save some data to temporary file A Copy contents of A to final destination B Delete A I have a race condition at step 3 where Mac OS X will occasionally come back with error -47 (fBsyErr) when trying to delete the file using FSDeleteObject. I am completely conf...

catch system information using macruby or ruby cocoa

Hi, Could you tell me plz - how to catch system information like os version, installed apps versions, hardware details using macruby or ruby cocoa? ...

How do I test ASP pages locally on Mac/OSX?

Is it possible to test ASP websites locally on a Mac? ...

Taking decision on command line parameters in a cocoa applications

Hi there I have my Cocoa Application, which will be called with or without parameters in the command line. I would like to take decisions over the parameters received on the application, ie, if a special parameter is received I would like to trigger an action on it. Is there anyway for doing this?? Cheers ...