0

I am using Eclipse Helios (version 3.6.1, Build id: M20100909-0800) on RHEL 6.9 and created several projects within a workspace that I specified as empty static libraries. After trying to compile each of the projects I got an error stating that it could find main.

I tried the suggestion at Changing Project Type from “Executable” to “Static Library” in Eclipse CDT but my Build Artifacts Artifact Type only included Executable and Shared Library. Unfortunately I can't used a shared library on some of my libraries because they end up loading more shared libraries (depending on installation location).

My problem is that I don't have an option for Static Library as an Artifact Type. Could this be some kind of configuration issue with Eclipse? Unfortunately, I don't have the ability to upgrade (easily - if at all), but I may be able to get someone to fix the installation if that is indeed the issue.

DesertBroncoFan
  • 65
  • 1
  • 12
  • If you try to create a new project, do you see the option to create it as static library? For me it works, I can switch from executable to static library in Eclipse Mars (RHEL 7). – EmDroid Jun 15 '17 at 15:47
  • Note that even though you might not be able to upgrade the system-wide Eclipse, you can download a newer Eclipse version and unpack to a location accessible to you (e.g. $HOME) to "install" it privately just for your user. And then you can have complete control over it. – EmDroid Jun 15 '17 at 15:50
  • axalis - In most circumstances that may be right but I'm on a tightly controlled system and messing with it could mean discipline up to and including termination, so I'd rather not. – DesertBroncoFan Jun 15 '17 at 22:20
  • When I originally created the projects(s) I specified that they should be a static library but when I built them they failed during linking because it was trying to build an executable. I tried setting the Artifact Type under Properties->C++ Build->Settings->Build Artifacts but the only options were executable and shared library. – DesertBroncoFan Jun 15 '17 at 22:26

1 Answers1

0

For those coming to this question after a recent install of RHEL 8 (in 2022) the solution is the same, upgrade Eclipse. I had the same problem which was solved when Eclipse was upgraded to 2021-12. This has to be done manually since the upgrade function in the Eclipse disto that comes with RHEL 8 doesn't work.

Dhelisw
  • 65
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 03 '22 at 08:01