Good afternoon, before completely switching to waf (1.7.5), I tried to create a simple project of this structure:
wafproject βββ application β βββ main.cpp β βββ wscript βββ library1 β βββ foo1.hpp β βββ foo2.hpp β βββ wscript βββ wscript
This is the root of wscript :
def options(opt) : opt.load('compiler_cxx') def configure(cnf) : cnf.load('compiler_cxx') def build(bld) : bld.recurse('library1') bld.recurse('application')
This is application wscript :
def build(bld) : bld( features = 'cxx cxxprogram' , target = 'application' , source = 'main.cpp' , use = ['library1'] )
This is library1 wscript
def build(bld) : bld( name = 'library1' , inludes = '../../' , export_inludes = '../../' )
(Note: I tried to use target instead of name for library1 , and I also tried to enable the cxx cxxshlib functions for library1 .)
This is main.cpp :
#include <wafproject/library1/foo1.hpp> #include <wafproject/library1/foo2.hpp> int main() { }
And this is the error I get:
Setting top to : /home/<path>/wafproject Setting out to : /home/<path>/wafproject/build Checking for 'g++' (c++ compiler) : /usr/bin/g++ 'configure' finished successfully (0.038s) Waf: Entering directory `/home/<path>/wafproject/build' [1/3] cxxshlib: -> build/library1/liblibrary1.so [2/3] cxx: application/main.cpp -> build/application/main.cpp.1.o ../application/main.cpp:1:40: fatal error: wafproject/library1/foo1.hpp: Directory or file does not exist. compilation terminated. Waf: Leaving directory `/home/<path>/wafproject/build' Build failed -> task in 'application' failed (exit status 1): {task 139729350901264: cxx main.cpp -> main.cpp.1.o} ['/usr/bin/g++', '../application/main.cpp', '-c', '-o', 'application/main.cpp.1.o']
I do not want to change the way headers are included, but for this I clearly need to change the way I create my project.
I would be happy for any input, thanks.
EDIT: Solved, it was just a typo ( inludes instead of includes and export_inludes instead of export_includes ).