Pages

Sunday, February 17, 2013

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.


View the original article here

0 comments:

Post a Comment