I'm on Kubuntu 12.04 running C::B nightly build svn 8248 (from jens Lody repository).
My application uses boost that I have compiled from source and installed in a non-standard location. If I try to run the application from the command line I get the following error message at startup
error while loading shared libraries: libboost_thread.so.1.51.0: cannot open shared object file: No such file or directory
This is all quite logical as I am using boost::thread and didn't include the directory where boost is installed in LD_LIBRARY_PATH.
But what is surprising, is that the application starts just fine from within Code::Blocks.
How does C::B find the boost shared object files, when I haven't really told it where to look?
Can someone test the patch on windows and paste the log from the "Build log" tab?
I'll try, but from what I can say personally: In a private project of mine I had the issue that wxSetEnv is unreliable for some reason. So what I did was the following:
bool mySetEnv(const wxString& name, const wxString& value)
{
// The WX-way...
bool success = wxSetEnv(name, value);
// The MinGW-way...
wxString putenv_var = name + wxT("=") + value;
#if wxUSE_UNICODE
std::string stl_putenv_var = (const char*)putenv_var.mb_str(wxConvLocal);
#else
std::string stl_putenv_var = putenv_var.c_str();
#endif
char buffer[stl_putenv_var.length()+1]; memset(buffer, 0x00, sizeof(buffer));
memcpy(buffer, stl_putenv_var.c_str(), stl_putenv_var.length());
success &= ( putenv(buffer)==0 ); // returns 0 on success
// success &= ( _putenv(stl_putenv_var.c_str())==0 );
return success;
}// mySetEnv
...then (and only then!), all my low-level code that relies on envvars being set worked properly. You may face a similar issue here.