dealing with object files

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2007
Posts: 61
Reputation: squinx22 is an unknown quantity at this point 
Solved Threads: 0
squinx22 squinx22 is offline Offline
Junior Poster in Training

dealing with object files

 
0
  #1
May 2nd, 2007
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....
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: dealing with object files

 
0
  #2
May 2nd, 2007
Yes. Just use the -o option of gcc.

g++ -c function.cpp -o <PATH_OF_FOLDER>/OBJECTNAME.o
バルサミコ酢やっぱいらへんで
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 795 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC