Hi Carlos,
You did it the hard way!
It's much easier to install Eclipse during Fedora installation, by enabling the "Personalize now" option. Anyway you should have everything you need to work on C++ projects with Eclipse.
Can't get Eclipse to open any of the makefile files and get a meaningful project.
Because you can't do that. Follow these steps to create an Eclipse project from existing code:
- Put all your source files (*cpp, *h) on one directory. Eclipse projects are tied to a directory.
- Open Eclipse and select the C++ perspective if you don't have it selected by default.
- Select File > New > C++ Project
- On the C++ Project dialog, enter the Project name for your project. Enter also the directory where you have your project.
- On Project Type, select Shared Library > Empty Project
- Click Next
- To be able to debug your project, be sure to have the Debug item checked. In general, you don't want to generate release builds with Eclipse. The correct way to generate release builds is from the command line using the makefiles automatically generated with the MakefileGenerator script in PixInsight.
- Click Finish
Now you'll see your project listed in the Project Explorer window (if you don't see it, select Window > Show View > Project Explorer). You should right-click your project now and select Properties.
In the following I assume you have the required environment variables defined.
On the Properties dialog, select the Debug configuration.
Now select the C/C++ Build > Settings item. On the Tool Settings tab, you must define the following:
- GCC C++ Compiler section:
* Preprocessor: define the required macros: __PCL_LINUX and _REENTRANT
* Directories: $(PCLINCDIR)
* Optimization: For a debug build, select None (-O0). For release builds you should use the makefiles generated with the MakefileGenerator script in PixInsight and build from the command line, instead of Eclipse.
* Debugging: Maximum (-g3)
* Warnings: All warnings (-Wall)
* Miscellaneous: -m32 -fPIC -c -fmessage-length=0 -Wno-parentheses
(for a 64-bit build, replace -m32 with -m64)
- GCC C++ Linker section:
* Libraries: PCL-pxi
(in addition, you may need lcms-pxi if you use the ICCProfile PCL class in your code)
* Library search paths: $(PCLLIBDIR32) $(PCLBINDIR32)
(for a 64-bit build, replace 32 with 64)
* Shared library settings: enable Shared (-shared)
- Build Steps:
This is optional. I personally put the following in the Post-build command:
cp *-pxm.so $(PCLBINDIR32)
where you must replace 32 with 64 for a 64-bit build. This command copies your just-compiled module to your bin installation directory automatically.
- Build artifact:
Artifact type: Shared library
Artifact name: <your-module-name>-pxm
Artifact extension: so
Now you should be able to build your module. Let me know if you have further problems.
Performing a debug session of a PixInsight module with Eclipse involves some not-so-obvious steps that deserve a separate post. Let's see if you manage to build your module for now.