If I run a program from within Code::Blocks:
Executing: xterm -T OsgVertexProgramTest -e /usr/bin/cb_console_runner /home/dunrau/src/dev/OsgVertexProgramTest/bin/Debug/OsgVertexProgramTest  (in /home/dunrau/src/dev/OsgVertexProgramTest/.)
LD_LIBRARY_PATH is not set, although other environment variables I define are.  Why is this happening?  More details below:
I'm running Code::Blocks 8.02 on ubuntu 8.10.  I have a console app that needs some directories in LD_LIBRARY_PATH so that the required libraries can be found at run time.  When I run the program from code::blocks, the libraries cannot be found.  When I debug from within Code::Blocks, or run from a shell outside of Code::Blocks, the program runs fine.  This is irrespective of whether I define LD_LIBRARY_PATH in my .bashrc, in Code::Blocks environment variables, or add the directories to the project->Build Options->Search directories->Linker area.
With this test program:
#include <iostream>
#include <cstdlib>
using namespace std;
void printEnv(const char* pName)
{
    char* pValue = getenv(pName);
    if (pValue)
    {
        cout << pName << "=" << pValue << endl;
    }
    else
    {
        cout << pName << " not set" << endl;
    }
}
int main()
{
    char input[256];
    cout << "Hello world!" << endl;
    printEnv("PATH");
    printEnv("DU_TEST");
    printEnv("LD_LIBRARY_PATH");
    printEnv("OSG_FILE_PATH");
    cin >> input;
    return 0;
}
I can see that LD_LIBRARY_PATH values that I set are fine every way I run the program except if I run it from the Code::Blocks run icon.  When I run the program this way, LD_LIBRARY_PATH is not set.
Any ideas why this is happening?

  It seems  this topic is the same problem: 
http://forums.codeblocks.org/index.php/topic,9197.0.html, but no solutions are listed....