From Chris Hinrichs:
- In order to run Eclipse on the department machines, you need to create
a new project in C++ - standard make imports a makefile, while managed make
creates one for the project. To create a project with your own libraries,
you have to right-click the project and go to properties, then click on
C/C++ Build. In there you can add -I include directories, (under GCC C++
Compiler,) and -L library directories, and -l libraries (under C/C++
- The real kicker is that at run-time, the environment variable
"LD_LIBRARY_PATH" must be set to include the -L library directory, otherwise
ld.so cannot find them to load them. To set this, click on the green arrow
(you have to click on it as far as you can to the right, so that a menu
comes down.) Then go to "Run..." with a green icon. In Environment, you can
add "LD_LIBRARY_PATH" and set the value to what you want it to be.
- The next problem is when you try to debug it. Here, gdb lets you set
environment variables, but they don't carry through to the underlying
program when launched from gdb. You have to set LD_LIBRARY_PATH in your
.cshrc.local file. I don't know if doing this means you don't have to set it
in Eclipse, but I do just to be safe.
- Eclipse is still not as good as it could be, I think, because it recompiles
every time you save a file, so if your file gets too large, the recompile
takes a long time...