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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:31:39+00:00 2026-05-30T10:31:39+00:00

I have been trying to set up an EDE project for C++ (emacs24 +

  • 0

I have been trying to set up an EDE project for C++ (emacs24 + builtin CEDET) and I’m starting to get desperate because I can’t seem to find the way I want the makefiles to be generated. I’m relatively new to Emacs.
I’ll try to describe what I’m doing:

I have a toy project set like so:

main.cpp
other/
  Utils.cpp 
  Utils.h
  CGrabBuffer.cpp
  CGrabBuffer.h

main.cpp includes both .h’s inside the “other/” directory. These are the steps I follow to set up an EDE project with this simple directory setup:

  • Open main.cpp in emacs and do M-x ede-new ; type: Make ; name: main-proj.
  • Open one of the files in the “other” directory and do M-x ede-new ; type: Make ; name: aux-proj.
  • Now it’s time to create the targets (which I believe are three in this case):
    • On the main.cpp buffer: M-x ede-new-target ; name: main ; type: program. When prompted, I add the main.cpp to this target.
    • I repeat the same for the other two targets (Utils which has Utils.cpp and Utils.h and CGrabBuffer which has CGrabBuffer.cpp and CGrabBuffer.h). Here I find the first problem. What type do these two targets have to be? I only want them to generate .o files.
  • Once this is done, I type M-x ede-customize-current-target to all three targets and I add some include paths, some libraries, etc.
  • After this, if I call M-x ede-compile-project it doesn’t compile because:
    • It tries to compile main.cpp first; I have no idea how to specify (using EDE) that both Utils.o and CGrabBuffer.o are needed before attempting to build main.cpp.
    • If I manually change the order (editing the Makefile), it’s not able to link main.cpp because it can’t find Utils.o and CGrabBuffer.o.

As you can see, I am in the middle of a great mess. Maybe I’m not even understanding what “target” means in EDE. I have also read about the existence of ede-cpp-root-project which has to be specified inside the .emacs file. I haven’t tried it because what I think it does is just help with the semantics. It doesn’t generate Makefiles, does it? Can I have (or do I need) an EDE project built with Project.el’s and the same thing using ede-cpp-root-project for the semantics? Or is it redundant?

Sorry If I misunderstood a lot of things but I’m very confused and being new to emacs makes things worse. Thanks for your patience!

EDIT: with some tinkering and the responses I received I have been able to figure out a lot of stuff, so thanks a lot. What I still don’t understand is the use of the ede-cpp-root-project which has to be specified inside the .emacs file. Is it just for c++ semantics? Is it redundant to have the project with Project.el’s AND also the elisp lines in .emacs?

  • 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-30T10:31:41+00:00Added an answer on May 30, 2026 at 10:31 am

    EDE is designed to handle many different kinds of projects, usually of a type where the build system was written outside of Emacs in some other tool.

    The EDE project type that creates Makefiles for you can do quite a few things, but you need to have some basic understanding of build systems for it to be helpful, and you really do need to customize the projects to get anything of any complexity working.

    I’ve recently added a section to the EDE manual to help with basic project setups that autogenerate Automake files. You can check out the tutorial here:

    http://www.randomsample.de/cedetdocs/ede/ede/Quick-Start.html

    The same steps will apply for projects that just use Make instead, but Make based projects often have trouble with shared libraries due to the extra complexity.

    Mike’s answer is quite good, but I think it is ok to just add .h files to the same target as your .cpp sources. It will keep track of them separately.

    Another useful trick is to use the whole project compile keystroke (C-c . C) which uses a capital C whenever you change something big. That will regenerate the Makefiles, rerun any needed Automake features, and start at the top.

    EDIT: You only need one EDE project for a give project area. The ede-cpp-root project is useful when no other automatic project type works. That’s when you create that in your .emacs file so that the other tools that need a project definition, like semantic’s smart completion, and tag lookup, will work.

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

Sidebar

Related Questions

I have been trying to get SqlCacheDependency working. I think I have everything set
I've been trying to get the CEDET working with a simple project for the
I have been trying to get a progressbar set to marquee to keep moving
I have been trying to find out how to get and set the colour
I have been trying to make a clock that the user can set. I
I have been trying to set up a staging machine to run project at
I have been trying to set the value of a hidden input by using
For while I have been trying to set the Page Scaling of Excel page
for around 5 consecutive days i have been trying to set up my computer
I have been trying out the MoreLikeThis Bundle to bring back a set of

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.