maDeveloper
maDeveloper

Reputation: 104

How Can I Add An Include Path in GCC C++

I can add include paths in Visual Studio easily but I couldn't find a way to do it in GCC? Any helps please?

Upvotes: 0

Views: 3399

Answers (3)

0___________
0___________

Reputation: 68034

There are many options related to the search of the include files. The most common used is -Ipath

enter image description here

Upvotes: 1

pion
pion

Reputation: 190

Use the -I command-line argument:

gcc -Ipath

Upvotes: 4

Robert
Robert

Reputation: 2812

gcc is a command-line program, the flag for includes is -I

gcc -IC:\AdditionalIncludeDirectory <other-flags>

Upvotes: 4

Related Questions