Author Topic: wxWidgets app won't run from IDE  (Read 5552 times)

bforrester

  • Guest
wxWidgets app won't run from IDE
« on: February 24, 2007, 03:06:19 am »
Hi all,

I recently installed the nightly build from Feb21 on Ubuntu 6.10..  I installed wxGTK 2.8.0, and tried the wxWidgets app wizard.  The default code compiled an linked fine, but when I went to run from the IDE, I get a message:

exit status 127..  Which is essentially "Command not found" as far as I can tell from Linux docs ( I'm a relative newb when it comes to Linux ).  The odd thing about this is if I go into my terminal and locate the executable image that I just built, it runs fine...  What's more, most of the other wizards run perfectly fine out of the IDE (I built a console app, and an OpenGL app).  I'm a little confused as to why I can't get the wx-application to run from the IDE..  Any ideas?

BTW.. I have an LD_LIBRARY_PATH=\user\local\lib that I had to set to get the wx-application to run at all.  I tried putting this in the Codeblocks environment variables, but it didn't help.  I still get the exit status 127 message and no running application.

Any help is greatly appreciated!

Offline matrem

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxWidgets app won't run from IDE
« Reply #1 on: March 20, 2008, 10:33:08 am »
Hello,

I'm under kubuntu 7.10 and I have the same sort of problem.

My C::B worspace is composed of four projects :
- 1 shared library;
- 2 plugins (.so) that are dynamically loaded  by the shared library at execution time.
- 1 executable linked with the shared library;

The problem is, when executing the exec project with C::B, the dynamic loading can't work, because LD_LIBRARY_PATH is'nt set to point in the bin plugins directory.
For now, I have wrote a script I run out of C::B :

Code
export LD_LIBRARY_PATH=../virtrev_gl_plugin_image_png/bin/Debug/:../virtrev_gl_plugin_mesh_3ds/bin/Debug/
bin/Debug/mario_project

But how could I configure project to run directly in C::B?

thanks  :P

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxWidgets app won't run from IDE
« Reply #2 on: March 20, 2008, 11:46:33 am »
Environment variables? Settings -> Environment [Environment variables].

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: wxWidgets app won't run from IDE
« Reply #3 on: March 20, 2008, 01:06:08 pm »
But how could I configure project to run directly in C::B?

C::B adjusts LD_LIBRARY_PATH automatically if you run in debugging mode (F8). For "normal" run mode (F9), it doesn't work because the spawned terminal doesn't inherit some specific environment variables (like LD_LIBRARY_PATH, LD_PRELOAD, etc). Haven't found a way around it yet...
Be patient!
This bug will be fixed soon...

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxWidgets app won't run from IDE
« Reply #4 on: March 20, 2008, 01:15:17 pm »
But how could I configure project to run directly in C::B?

C::B adjusts LD_LIBRARY_PATH automatically if you run in debugging mode (F8). For "normal" run mode (F9), it doesn't work because the spawned terminal doesn't inherit some specific environment variables (like LD_LIBRARY_PATH, LD_PRELOAD, etc). Haven't found a way around it yet...

What about running the program in the terminal like this:

Code
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:foo:bar executable

That should work.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: wxWidgets app won't run from IDE
« Reply #5 on: March 20, 2008, 03:22:06 pm »
But how could I configure project to run directly in C::B?

Manually (i.e. outside C::B), yes it works.

C::B adjusts LD_LIBRARY_PATH automatically if you run in debugging mode (F8). For "normal" run mode (F9), it doesn't work because the spawned terminal doesn't inherit some specific environment variables (like LD_LIBRARY_PATH, LD_PRELOAD, etc). Haven't found a way around it yet...

What about running the program in the terminal like this:

Code
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:foo:bar executable

That should work.

Manually (outside C::B), yes it works.
Be patient!
This bug will be fixed soon...

Offline matrem

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxWidgets app won't run from IDE
« Reply #6 on: March 20, 2008, 07:09:02 pm »
The environment variables way, work in Debug lauch.
Perhaps in future version, that will works in release lauch. An it should be pretty cool if  it can be configured in the project options with relative path. ;)

thanks for you help