Setting up an emacs EDE-project with libraries

懵懂的女人 提交于 2019-12-05 11:20:39

So,

i think I solved it. I'm answering the question myself, in case someone stumbles on the same difficulties.

Basically I needed to define a subproject in the directory "lib/" which compiles and archives the library.

I now have the following files

include/
    matrix.h
lib/
    Project.ede
    matrix.cpp
Project.ede
num.cpp

the config-file lib/Project.ede is the subproject responsible for the library and it looks like this:

;; Object matrix
;; EDE project file.
(ede-proj-project "matrix"
  :name "matrix"
  :file "Project.ede"
  :targets (list 
   (ede-proj-target-makefile-archive "matrix"
    :name "matrix"
    :path ""
    :source '("matrix.cpp")
    :configuration-variables '(("debug" ("CPPFLAGS" . "-I../include -std=c++0x -g"))    ("release" ("CPPFLAGS" . "-I../include -std=c++0x")))
    )
   )
  )

The main file ./Project.ede looks like this:

;; Object num
;; EDE project file.
(ede-proj-project "num"
  :name "num"
  :file "Project.ede"
  :targets (list 
   (ede-proj-target-makefile-program "num"
    :name "num"
    :path ""
    :source '("num.cpp")
    :configuration-variables '(("debug" ("CPPFLAGS" . "-std=c++0x -Iinclude")) ("release" ("CPPFLAGS" . "-std=c++0x -Iinclude")))
    :ldflags '("-Llib")
    :ldlibs '("matrix")
    )
   )
  )
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!