User forums > Using Code::Blocks

debugging a gui application on MAC

(1/1)

jojohead:
The background:

I have a small GUI application to so some analysis and Image segmentation. For GUI I use wxwidgets. My environment is mac 10.5 and codeblocks for mac.
As I compile the application and run in mac, the executable starts but no mouse or keyboard controls goes on the interface.
With the help from wxwidgets community I have learn't that, we need to place the executable inside a special folder called project1.app/Contents/MacOS and then run the project1.app

Problem
Now the problem is if I try to change the project settings so the executable is directly written to such a directory hierarchy overriding the usual /debug/bin, when i try to debug it, it doesn't work. the application  in this case still doesn't take mouse or keyboard inputs to the interface. Only when I am launching the application by double clicking on project1.app it is running as an usual GUI application.

Any help on how to setup debug environment in these cases is highly appreciated.

jojohead:
Sorry missed one more thing. If i try to write the executable directly to the directory hierarchy it fails citing that it cannot write. Eventhough I use the shell prompt to make all file access restriction to write on all sub directories

from build log:

-------------- Build: Debug in Project1 ---------------

Linking console executable: Project1.app/Contents/MacOS/
ld: can't open output file for writing: Project1.app/Contents/MacOS/
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 

afb:
It just seems to be missing the actual program name ?

--- Code: ---Linking console executable: Project1.app/Contents/MacOS/

--- End code ---

Usually that would instead be something like:

--- Code: ---Linking console executable: Project1.app/Contents/MacOS/Project1

--- End code ---

Navigation

[0] Message Index

Go to full version