Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 6, 2009, 07:45 PM   #1
DavidInNH
macrumors newbie
 
Join Date: Oct 2009
How to configure gcc for command line use?

Hi all and sorry if this is too basic a question for this group. I've programmed for many (too many?) years but now find myself doing some command line programming of an SDK under OSX. I've successfully built the SDK on Linux and on a borrowed MacBook Pro. I now have a new MacBook Pro and can't get the code to build.

The code is not built with Xcode but gcc from a terminal window after running autogen.sh and configure to set up the environment. These files built properly under the same toolset on two other MacBooks but they'd previously been used by other programmers to do Xcode work.

Is there a tool to configure how autogen and configure generate makefiles? Is there somewhere to point me to such documentation as will make this work clear to me? Thanks to all in advance.
DavidInNH is offline   0 Reply With Quote
Old Oct 6, 2009, 09:59 PM   #2
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
You need to install Xcode to get all the developer tools.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote
Old Oct 7, 2009, 07:51 PM   #3
DavidInNH
Thread Starter
macrumors newbie
 
Join Date: Oct 2009
Quote:
Originally Posted by Cromulent View Post
You need to install Xcode to get all the developer tools.
I understand that. I've installed all the tools but I don't see how to configure gcc to (for example,) not treat warnings as errors.

Do you have insight into how to do this for command line use or where I could find such information? Thanks.
DavidInNH is offline   0 Reply With Quote
Old Oct 7, 2009, 08:10 PM   #4
electroshock
macrumors 6502a
 
electroshock's Avatar
 
Join Date: Sep 2009
Quote:
Originally Posted by DavidInNH View Post
I understand that. I've installed all the tools but I don't see how to configure gcc to (for example,) not treat warnings as errors.

Do you have insight into how to do this for command line use or where I could find such information? Thanks.
That's kind of strange because by default, gcc only stops on errors and treats warnings as, well, warnings. Can you paste a compile session (for at least the cc/gcc invocation and any subsequent messages) showing gcc treating a warning as an error?

P.S. 'man gcc' for info on all the available gcc command line options. On MacOS X, it has some additional MacOS X-specific arguments along with the stock stuff.

Last edited by electroshock; Oct 7, 2009 at 08:16 PM.
electroshock is offline   0 Reply With Quote
Old Oct 7, 2009, 09:06 PM   #5
Ti_Poussin
macrumors regular
 
Join Date: May 2005
Ensure that the version of gcc is the same on both machine. Maybe some "warning" you get have been change to error with a newer version of gcc (gcc 3 was way too permissive with bad code). Next verify that the flags use when compiling, treating warning with error is the -pedantic and -Wall or stuff like.

But you want my advice, nearly all error reported by gcc is a real code problem hidden somehow, you should fix those. We use pedantic and report warning as errors at my current job, medical software and in the end it's totally worth it.

N.B.: Check you're not compiling universal binary or for multiple platform or 32-64 bits.

N.B.: Maybe remove the -O3 to an -O2 if you have bad code may be badly optimize.

May help more if you give the command that failed and the context of error you get.
__________________
iMac Core2D 2.16 GHz 20", 250Go SATA/Firewire HD, iPhone 3G, Logitech Z-680 speaker set, MS mouse 5 bouttons
Ti_Poussin is offline   0 Reply With Quote
Old Oct 7, 2009, 11:44 PM   #6
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Quote:
Originally Posted by DavidInNH View Post
I understand that. I've installed all the tools but I don't see how to configure gcc to (for example,) not treat warnings as errors.

Do you have insight into how to do this for command line use or where I could find such information? Thanks.
Ah, your terminology confused me.

See the gcc man page for all the information you need regarding command line switches (and quite a bit more besides).
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How to convinc my parents to let me buy a 17" MacBook pro Ulf1103 Buying Tips and Advice 55 Feb 20, 2012 08:11 AM
Does anybody know how to get TweetTask? xmelissaxmayhem Jailbreaks and iOS Hacks 3 Jul 3, 2011 01:21 AM
[HOW TO] DIY iPhone 4 Swivel Car Mount QuarterSwede iPhone Accessories 13 Mar 8, 2011 02:51 PM
How to get location for an address using MKMapKit framework? sspbond007 iPhone/iPad Programming 1 Jul 21, 2009 09:38 AM
How to configure Mail for different .Mac email addresses? ascender Mac Applications and Mac App Store 2 Oct 22, 2007 03:31 AM


All times are GMT -5. The time now is 05:33 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC