Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7508113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:37:20+00:00 2026-05-29T22:37:20+00:00

I have two c++ projects in Eclipse CDT main and shared . In shared

  • 0

I have two c++ projects in Eclipse CDT main and shared. In shared i have a header called calc.h. I want to use this header in main, so i did the following:

  • added #include "calc.h to the relevant files in main
  • In main‘s properties -> Project references i checked of shared

I hoped this would work, but I get a fatal error: calc.h: No such file or directory when compiling, so the project reference somehow doesn’t work.

I can get it to work by manually adding shared‘s source folder in main‘s properties->C/C++ Build->Setting->GCC C++Compiler->Includes, but my i have a bad feeling that this will become cumbersome on larger projects more complex dependencies. I’ll therefore hoped that Eclipse could handle this via project references.

Am I missing something or is manually the only way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:37:21+00:00Added an answer on May 29, 2026 at 10:37 pm

    You are right, that is the way to do it!

    I use Eclipse CDT on large projects, but I don’t use the Eclipse compiler settings. There are some drawbacks to using the CDT compiler’s settings:

    • As you said, on large projects, it is cumbersome.
    • If you want to compile your project on a platform which doesn’t have Eclipse (when you deploy your application), it is not straightforward.

    I use CMake to manage my Eclipse projects. When I start a new project, I do the following steps:

    1. In a terminal, create a folder for your new project.
    2. With your favorite text editor (vim, emacs, Text edit, kate, etc…) create the CMakeLists.txt file for your project. You don’t have to create an exhaustive CMakeLists, just a small CMakeLists for your first files is enough.
    3. Then, ask cmake to generate the Eclipse project like this:
      cmake -G "Eclipse CDT41. Unix Makefiles"
      
    4. Open Eclipse, click on File –> Import, and choose "General/Existing project into workspace". Choose the folder created in the first step, and your project is ready to use in eclipse.

    CMake is THE compiler configuration tool to manage projects… If you don’t know this I encourage you to discover it.

    Cheers!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now, I have two Eclipse projects - they both use Maven 2 for
i have two projects in eclipse and i want to copy some files from
I am new with the Maven. I have two projects. I want this kind
I have two projects, Main and Core . I have a package called com.package.Sample
I have several projects open in an Eclipse workspace. Like so: com.harbl.project.one com.harbl.project.two com.harbl.project.three
i have two projects in Eclipse: service and UI client. In onCreate in UI
I have two eclipse projects on an SVN repository that I feel should be
I have here two applications in two different projects in eclipse. One application (A)
I have two CVS projects, which I maintain in Eclipse. I check out first
I'm using eclipse, and I have two android projects which have different topics. And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.