944,120 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 1034
  • C RSS
May 2nd, 2007
0

dealing with object files

Expand Post »
is it possible that when I do this:

g++ -c function.cpp

the function.o will be generated in the other directory?

say for example i have FUNC folder

FUNC/function.cpp

I want to generate a function.o that is outside the FUNC folder.

thanx in advance....
Similar Threads
Reputation Points: 7
Solved Threads: 1
Junior Poster in Training
squinx22 is offline Offline
68 posts
since Mar 2007
May 2nd, 2007
0

Re: dealing with object files

Yes. Just use the -o option of gcc.

g++ -c function.cpp -o <PATH_OF_FOLDER>/OBJECTNAME.o
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Text file parser in C
Next Thread in C Forum Timeline: Counting Alphabet Characters, Words, and String Length!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC