0

I wrote some tool, based on libclang, which get some file and create translation unit from it and parse ast tree, but the tool needs compile flags, so I must specify all needed flags for compilation the file. So, here is a small problem: I can not specify relative path to incude directories, because for create translation unit the tool create temporary file and copy all input file in it (this is needed, because tool also can work in interactive mode). So paths for temporary file and source file are different. I means that I should set absolute paths in -I flags of manually parse input flags and check it: is that relative or not? Can I specify some prefix for all relative include directories? Or set current directory for compiler?

0 Answers0