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 6068871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:45:41+00:00 2026-05-23T09:45:41+00:00

My problem is similar with this: http://www.eclipse.org/forums/index.php/m/649323/ I created a cmake project, and used

  • 0

My problem is similar with this: http://www.eclipse.org/forums/index.php/m/649323/

I created a cmake project, and used

cmake .. -G "Eclipse CDT4 - Unix Makefiles"

to create a Eclipse CDT4 project.

But in the CDT IDE, the standard include paths are not listed, and all STL or system build-in header files include directives are marked as “cannot be resolved”, so the “Open Declaration” or other a lot of operation cannot be done.

However, I could compile it without any problems.

My co-worker also has a cmake project, but it’s very complicated. The CDT project generated from his cmake project DOES have the system includes. But his cmake is way too complicated, and he told me that he didn’t do anything special to include the system paths.

Can anyone help me out? Thanks.

My Main CMakeLists.txt:

CMake_Minimum_Required(VERSION 2.8)

# Some settings
Set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
CMake_Policy(SET CMP0015 NEW)

#Include(CMakeProcedures.cmake)
#CheckEnvironment()

# Set the compiler and its version if needed

# Create the project
Project(MyProjectName CXX)

# Set the compiler
Set(CMAKE_CXX_COMPILER /usr/bin/g++)

# Detect whether we are in-source
If (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
    Message(FATAL_ERROR "In-source building is not allowed! Please create a 'build' folder and then do 'cd build; cmake ..'")
EndIf()

# Set the output dirs
Set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
Set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

# Add source subdirs to the build
Add_Subdirectory(src)
# Add_Subdirectory(test EXCLUDE_FROM_ALL)

Peter

One workaround is to manually add these to the CDT IDE:

/usr/include/c++/4.5
/usr/include/c++/4.5/backward
/usr/include/c++/4.5/i686-linux-gnu
/usr/include/i386-linux-gnu
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed
/usr/local/include

But it’s not the solution.

  • 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-23T09:45:41+00:00Added an answer on May 23, 2026 at 9:45 am

    I finally figured out that this line is causing the problem:

    Project(MyProjectName CXX)
    

    If we remove the optional paramter CXX, life is good.

    Can anyone tell me why?

    Peter

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

Sidebar

Related Questions

I have a pom file that looks similar to this <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
I am simply trying to create this string $post_string ='<?xml version=1.0 ?> <AmazonEnvelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
Im trying to set up a system similar to this web site http://www.appmakr.com/ My
I have this form for multiple images here: http://www.comehike.com/account/upload_hike_photos.php?hike_id=58 And when I try to
I work on a hexagon map based browser game. I have this: http://www.dark-project.cz/wesnoth/map-view/1 and
I'm trying to create a similar functionality to this one: http://www.datatables.net/release-datatables/examples/api/row_details.html . The only
I have a similar problem to this post . I need to display up
This problem is similar to when creating alternate colour table-rows, only we are dealing
This is a similar problem: Link Which was solved by calling GetAsyncKeyState(). While all
Similar to this question: link However I have already mastered that. My problem is

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.