How do I set a path for the includes for g++ compiler?

Hello,

I'm new in the world of apple. I used to program with linux. There to include something like extra_library.h that it wasn't in the same folder where I compile my cpp program I used to write in the terminal while being in the cpp archive folder: g++ -c program.cpp -I/Documents/includes

Because I had the archives to include in my program in the Documents/includes directory. But now, doing exactly the same in my mac, it gives me the error that the archive to include wasn't foud.


I don't know if the -I command is invalid for the macs or the path is incorrect. Maybe There is a mother folder that I need to specify in the path like -I/moter_folder/Documents/includes.


I don't know if I expressed the lideas in a good way. If you can help me I'd be very gratefull.


Thank you.

Posted on Feb 15, 2013 11:38 AM

Reply
4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I set a path for the includes for g++ compiler?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.