User forums > Using Code::Blocks

Console app run/debugging for MacOSX

(1/5) > >>

bnilsson:
How is the progress on run/debug a console apps from CB on MacOSX?
The xterm launch is not, as we all know, working here.
It would be very handy for number crunching programs that wants input without GUI.
Will it be difficult to fix?

I guess it needs to be interfaced to the regular Terminal program.
Or is there any other solution?

afb:

--- Quote from: bnilsson on November 29, 2006, 09:45:44 pm ---Will it be difficult to fix?

--- End quote ---

It's done, just not fully tested/integrated yet.
http://developer.berlios.de/bugs/?func=detailbug&bug_id=8987&group_id=5358


--- Quote ---I guess it needs to be interfaced to the regular Terminal program.

--- End quote ---

For a preview of it, here is the patch to apply:
http://developer.berlios.de/patch/?func=detailpatch&patch_id=1667&group_id=5358

And yes, it sends an AppleScript to Terminal.app

afb:

--- Quote from: bnilsson on November 29, 2006, 09:45:44 pm ---The xterm launch is not, as we all know, working here.
--- End quote ---

BTW: xterm launch should be working on Mac OS X, but it does assume you
have X11.app running and that /usr/X11R6/bin/xterm is in your PATH...

The code I did will use Terminal.app for wxMac and X11.app/xterm for wxGTK.

bnilsson:
xterm is not working from CB for me.
Trying to "run" a console app called "dxfcnv" with X11 running and the path to xterm in my normal environment:


--- Quote ---Checking for existence: /Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/dxfcnv
Executing: xterm -T 'dxfcnv' -e 'LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH "/Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/dxfcnv" ' (in /Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/.)
Process terminated with status 255 (0 minutes, 0 seconds)
--- End quote ---

I also tried adding "/usr/X11R6/bin" to Compiler and.. Settings -> Programs -> Additional Paths and there was a difference:
(I need to have "/opt/local/bin" there, otherwise wx-config don't run. Strange, but true.)

--- Quote ---Checking for existence: /Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/dxfcnv
Executing: xterm -T 'dxfcnv' -e 'LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH "/Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/dxfcnv" ' (in /Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/.)
Process terminated with status 1 (0 minutes, 0 seconds)
--- End quote ---

I do not know the difference between 255 and 1 in this case. Anyway, no activity was seen in the running X11 application.

I will try the Terminal patch and see what's happens.

afb:
You need to have three things:

* /usr/X11R6/bin in your $PATH
* :0.0 in your $DISPLAY
* X11.app up and running


With that, you should be able to do:

--- Code: ---xterm -e 'read'
--- End code ---
and it should open an X11 xterm ?

Note: you might want to get xterm going by itself, before trying to use it from within Code::Blocks ? (i.e. the xterm commands that C::B is executing should be working if you run them in a Terminal)

Navigation

[0] Message Index

[#] Next page

Go to full version