开发者

Help! My wxMac app does not accept mouse or keyboard input

I have followed the wxWidgets "hello world" tutorial here: http://www.wxwidgets.org/docs/tutorials/hello.htm

Everything seems fine, the program compiles and starts, but the app is totally unresponsiv开发者_运维技巧e. I can't click the window to front or move it. What could be wrong?

I am using wxMac on Snow Leopard.


You must create a bundle for Carbon and Cocoa apps on OS X.

If your binary is named "foo" then this works for testing purposes (don't ship like this):

 mkdir -p foo.app/Contents/MacOS
 mv foo foo.app/Contents/MacOS

When you get things working you can eventually tweak your build system to make the bundle before the final link step and pass -o foo.app/Contents/MacOS/foo to the linker rather than plain -o foo.

For a Makefile that automates this, see the wxWidgets web forum.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜