thank guys for your answers. a few things to clarify:
1. I'm running on Linux 7.1
2. I'm trying to update the variable LD_LIBRARY_PATH.
3. I'm using bash.
I even tried eventually just for the test, to export LD_LIBRARY_PATH using backticks, like this:
`export LD_LIBRARY_PATH=/usr/local/lib`
And it still doesn't work. if I do that from the shell prompt, and execute the C program from there too, it works.
Any Ideas?
Hotshot