User forums > Using Code::Blocks

Console app run/debugging for MacOSX

<< < (4/5) > >>

bnilsson:
Oh dear..
I started with this at home yesterday, applying the patch.
Today I continued at some spare time at work, forgetting that the patch was not applied here. Sorry!
Now "run" works fine with Terminal, but not debug. Maybe debug/Terminal is not working yet?

afb:
There is a debug/Terminal ?  :-o OK, will add that too then :-)

bnilsson:
Checking the "run" function at home, and the test was not successful:

--- Quote ---[Tiger:~] bnilsson% DYLD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH "/Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/dxfcnv"
tcsh: DYLD_LIBRARY_PATH=.:/Users/bnilsson/lib: Command not found.

--- End quote ---
The only difference being that here I use /bin/tcsh and at work I use /bin/bash as shell in my user setup. After changing ny shell to /bin/bash it worked.

Seems it is sensitive to the shell used.
I tried different shells in the "Environment" setting "Shell to run commands in", but there was no difference.
Is it not active?

afb:

--- Quote from: bnilsson on December 02, 2006, 04:34:12 pm ---The only difference being that here I use /bin/tcsh and at work I use /bin/bash as shell in my user setup. After changing ny shell to /bin/bash it worked. Seems it is sensitive to the shell used.
--- End quote ---

Tcsh/csh is not supported at the moment. (I wouldn't recommend it to anyone, either)
However, if you supply the syntax it can be made into an Terminal syntax option or so ?


--- Code: (My guess...) ---setenv DYLD_LIBRARY_PATH ".:$DYLD_LIBRARY_PATH";
"/Users/bnilsson/Documents/Programming/Active/CB_projects/dxfcnv/dxfcnv"
--- End code ---


--- Quote ---I tried different shells in the "Environment" setting "Shell to run commands in", but there was no difference.
Is it not active?

--- End quote ---

I believe the current "shell" setting is only used in variable expansion, running tools, etc.

afb:
Would this (new) code work for you:

--- Code: ---#if defined(__APPLE__) && defined(__MACH__)
    #define LIBRARY_ENVVAR "DYLD_LIBRARY_PATH"
#else
    #define LIBRARY_ENVVAR "LD_LIBRARY_PATH"
#endif
        wxString shell;
        wxGetEnv(_T("SHELL"), &shell);
        if (shell.Contains(_T("csh")))
            command << _T("'") << _T("setenv " LIBRARY_ENVVAR " .:$" LIBRARY_ENVVAR " &&") << _T(" ");
        else
            command << _T("'") << _T("" LIBRARY_ENVVAR "=.:$" LIBRARY_ENVVAR) << _T(" ");

--- End code ---

It should use setenv for csh and tcsh.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version