remove include scores to point local folder

Asked

Viewed 14 times

1

Well there is a way to remove double punctuation to point the file to a folder ? I’ve seen this in some projects, plus my include error if not using

Example of how it is

#include "../utils/bps.hpp"

How do I want to leave

#include "utils/bps.hpp"

1 answer

0

In the compilation line you must pass the option "-I..". If it is Visual Studio, use "/I..". (Actually the Visual Studio compiler also accepts options initiated by "-" but usually "/" is used instead of "-".

Linux example with gcc:

$ cc -o teste -I.. teste.cpp

Example with Visual Studio:

c:\xxx> cl /I.. teste.cpp

Browser other questions tagged

You are not signed in. Login or sign up in order to post.