after upgrading from 10.1.x to 10.2 I have some problems compiling
OpenGL applications without using ProjectBuilder.
With 10.1.x adding
-framework OpenGL -framework glut -framework cocoa
to the linker command line was enough to generate a programm
that could be started from the terminal.
With 10.2, using this options generates a programm that could be
started, unfortunately the OpenGL application never gets the focus, thus
all terminal input goes to the terminal application.
Generating the OpenGL applications using ProjectBuilder gives
applcations that work perfectly.
As I have to support several platforms unsing ProjectBuilder would be a
major drawback, T prefer makefiles in such a situation.
Any help is appreciated
Peter
--
Fachhochschule Hof
Prof. Dr. Peter Stöhr Tel: 09281 - 409 485
Alfons-Goppel-Platz 1 Fax: 09281 - 409 400
95028 Hof / Germany
>Hi *,
>
>after upgrading from 10.1.x to 10.2 I have some problems compiling
>OpenGL applications without using ProjectBuilder.
I have the opposite; get vague errors (see build log, which just gives
an 'error' at the last point) when trying to link with PB. :)
>With 10.1.x adding
> -framework OpenGL -framework glut -framework cocoa
>to the linker command line was enough to generate a programm
>that could be started from the terminal.
Not here; I never got focus that way, although I could get it to work
using 'open myapp.app'. Running the exe directly (i.e. './myapp') did
get output to the terminal (printf()) but no focus.
I believe the problem is the resources (menu and such)... Haven't got
it working, except when I use 'open' (as if it was double-clicked).
Try using 'open'.
But let me understand this correctly; you can run your program as
'myapp' (not using 'open') and that gave focus to the app nevertheless
in 10.1.x? (never got that to work)
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
I ran into this with the later Jag releases. There's something that
prevents the app from getting updates & clicks if it lacks some
combination of an Info.plist, and I think the creator code or
extension. Sorry, but once I figured out that was it, I promptly
ignored it. Make sure you have a good plist, and try making the
executable openable in the Terminal in the Get Info. Once I made the
plist, and did one of those changes in the Get Info, I fixed it. If you
can't figure it out, email me and I'll try to reporduce it.
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>myapp</string> <--- replace "myapp" with the
exact name of your file in Contents/MacOS/
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.0.1d1</string>
</dict>
</plist>
Then you can launch the app by going into <myapp>.app/Contents/MacOS and
executing the file in there.
Jason A.
"Peter Stöhr" <peter....@fh-hof.de> wrote in message
news:alktvr$1qbjuq$1...@ID-54822.news.dfncis.de...
This is a joke right!
If one really needs to get up to this crap to create vanilla OpenGL
apps under OS-X then it's doomed.
> <?xml version="1.0" encoding="UTF-8"?>
> <plist version="1.0">
> <dict>
> <key>CFBundleDevelopmentRegion</key>
> <string>English</string>
> <key>CFBundleExecutable</key>
> <string>myapp</string> <--- replace "myapp" with the
> exact name of your file in Contents/MacOS/
> <key>CFBundleInfoDictionaryVersion</key>
> <string>6.0</string>
> <key>CFBundlePackageType</key>
> <string>APPL</string>
> <key>CFBundleSignature</key>
> <string>????</string>
> <key>CFBundleVersion</key>
> <string>0.0.1d1</string>
> </dict>
> </plist>
P a u l B o u r k e
Visualisation Research Fellow
mailto:pbo...@swin.edu.au
http://astronomy.swin.edu.au/~pbourke/
> But let me understand this correctly; you can run your program as
> 'myapp' (not using 'open') and that gave focus to the app nevertheless
> in 10.1.x? (never got that to work)
yes, it worked perfectely with 10.1.5 ...
Greetings from Hof
>> I just got this working by creating a <myapp>.app folder, then creating a
>> Contents folder inside this, then a MacOS folder inside this one. Then place
>> the compiled exe created by your makefile into <myapp>.app/Contents/MacOS.
>> Then you need to create a Info.plist file in <myapp>.app/Contents/ that
>> looks like this:
>
>This is a joke right!
>If one really needs to get up to this crap to create vanilla OpenGL
>apps under OS-X then it's doomed.
No joke. I couldn't get my window to be activated (receive keyboard
events) until I did this. The Finder shows these directories as one
icon. Just like packages (for installation) which are also really a
big .mpkg (or some other extension) directory.
It's not that bad, just wicked and prone for a lot of chaos as time
moves on! ;-) (the reason is to support multiple machine type
application executables within 1 .app dir, but I would suppose that
would never be used too much anyway).
Ruud van Gaal
Jason A.
"Paul Bourke" <pbo...@swin.edu.au> wrote in message
news:pbourke-1209...@1cust54.tnt7.mel1.da.uu.net...