Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » 701-dev1 / 2007.1beta on Mac OSX
Re: 701-dev1 / 2007.1beta on Mac OSX [message #7978 is a reply to message #7932] Fri, 02 February 2007 04:11 Go to previous messageGo to previous message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
There used to be a Core on exit bug, but we did fix it. Where does gdb say it died? If you run the program as

# ./myapp -args
use
# gdb ./myapp
gdb> run -args

and use "bt" to get the backtrace once it cores.




Universal build:

In Build Environment I add Compiler flags "-arch i386 -arch ppc" to the method I want, or all of them. (debug, size, speed). If you on a ppc mac you also need to add
"-isysroot /Developer/SDKs/MacOSX10.4u.sdk"

You need the same options when linking, but alas, there is no way to set Link options with U++ based on the platform, or triggered based on your current Building method.

I get around that by using Package Organiser / Add Link Options / WHEN "OSX11" with flags:
"-arch i386 -arch ppc"
again, on PPC, you additionally need to make it:
"-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386"


Finally, "ar" on OsX is the Gnu "ar" (as in, untouched) and can not handle fat files. You can change the ide sources to use "libtool" instead of ar, by editing CppBuilder.cpp and GccBuilder.cpp.

Or, replace "ar" with a script (temporarily) if you want (or, place it elsewhere, and fiddle with your PATH, there isn't just one way to fix things in Unix).

My "ar" script looks like:

#!/bin/bash

# It is valid to say "ar rc libfoo files.o"
shift

# Skip all arguments
done=0
while [ $done == 0 ]
do
case "$1" 
  in
    -*)        shift
               ;;
    *)         done=1
               ;;
esac
done

# Get output name
out=$1
shift

echo libtool $* -o $out
exec /usr/bin/libtool $* -o $out



Alas, you need all support libraries to also be Universal, ide that means libpng at least. You can compile it yourself using the nice ./configure line, or, fight with "port" to do it for you. If you are doing Universal of your own App, you'll have to work out your own dependencies.

Configure line that works on many things:

env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc"   ./configure --disable-dependency-tracking



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MacOS X woes
Next Topic: MacOS ide make problem
Goto Forum:
  


Current Time: Sun May 05 11:44:39 CEST 2024

Total time taken to generate the page: 0.02911 seconds