SlickEdit Community
SlickEdit Product Discussion => SlickEdit® => Topic started by: lusu2004 on April 09, 2017, 05:50:42 AM
-
Hi Expert,
I have below project/directory with multiple sub directory for source code and corresponding make file
my_code
| --- package_1
|--- a.c
|--- b.c
|--- a.h
|-- Makefile
| -- package_2
| -- x.c
| -- y.c
| -- Makefile
| -- include
package_1 will copy a.h to include directory, package_2/x.c will refer to a.h
and also for package_1, I have option for compiler , g++ -D PACKAGE=1
for package_2, I have g++ -D PACKAGE=2
my question is how to create a project/workspace for it? (especially how to configure the -D option for projects?)
Thanks
Lusu
-
I would do one workspace with two projects.
For project_1: Project > New... > C/C++ > GNU C/C++ ..., Check (x) Create new workspace
For project_2: Project > New... > C/C++ > GNU C/C++ ..., Check (x) Add to current workspace
Project > Project Properties... > Compile/Link to define symbols in each package.
For project_2: Project > Project Properties... > Dependencies... make it depend on project_1
Include a.h from the package_1 directory in the set of files, since the one in the Include directory is just a mirror copy, you don't want to be editing that (even if that is the *actual* file that package_2 uses).