Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DavidInNH

macrumors newbie
Original poster
Oct 5, 2009
2
0
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

macrumors newbie
Original poster
Oct 5, 2009
2
0
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.
 

electroshock

macrumors 6502a
Sep 7, 2009
641
0
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.
 

Ti_Poussin

macrumors regular
May 6, 2005
210
0
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.
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
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).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.