emacscedet

How do I make ede-cpp-root-project work with Project.ede


It seems like Project.ede only accepts predefined project, which are Arduino Sketch, Android, Automake and Make. I pasted ede-cpp-root-project, but upon entering project root that has Project.ede, I encountered this error:

eieio-persistent-read: Corrupt object on disk: Unknown saved object

Here is the ede-cpp-root-project I pasted into:

(ede-cpp-root-project "Coloring"
                      :file "~/workspace/discrete_optimization/hw2/Project.ede"
                      :include-path '("/"
                                 "/include"
                                 "/include2"
                                 "/include3"))

I really want to create a file per project, not in a centralized file.


Solution

  • Use of a Project.ede file is only for a specific project type of Make or Automake. While you could type it in by hand, you should use ede-new for creating them. Also, only use that type of project if you want EDE to create your Makefiles for you. You are getting the the 'corrupt' message because Emacs will refuse to load the file if it finds anything other than one of the two support project types.

    If you would like to use ede-cpp-root-project, you can create any old file like "myproject.el" and put your ede-cpp-root-project config in it. Then do

    M-x load-file RET /path/to/myproject.el
    

    to load it up when needed.