By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

GCC output directory

P: n/a
Might b e a bit OT, but I know there's lots of you who can help
quickly.

Is there any way to let gcc/g++ output the .o files in a folder I can
specify?

Thank you for not flaming,

-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}


Apr 19 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Gernot Frisch wrote:
Might b e a bit OT, but I know there's lots of you who can help
quickly.

Is there any way to let gcc/g++ output the .o files in a folder I can
specify?
What's wrong with g++ followed by a cp?

Thank you for not flaming,

-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

Apr 19 '06 #2

P: n/a
Gernot Frisch wrote:
Might b e a bit OT, but I know there's lots of you who can help
quickly.

Is there any way to let gcc/g++ output the .o files in a folder I can
specify?

-o is a common compiler switch to specify the output file name.

--
Ian Collins.
Apr 19 '06 #3

P: n/a
Is there any way to let gcc/g++ output the .o files in a folder I
can
specify?


What's wrong with g++ followed by a cp?


in my case "mv". The files are generated in the directory of the
g++.exe. But the compiler directory might be read only to a normal
user, so it would be nice if I could tell it to use another one in the
first place...
Apr 19 '06 #4

P: n/a
On Wed, 19 Apr 2006 11:45:55 +0200, Gernot Frisch wrote:
Is there any way to let gcc/g++ output the .o files in a folder I
can
specify?


What's wrong with g++ followed by a cp?


in my case "mv". The files are generated in the directory of the
g++.exe. But the compiler directory might be read only to a normal
user, so it would be nice if I could tell it to use another one in the
first place...


I think you'll find they're placed in the current directory, not the
directory containing gcc.

Apr 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.