• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Where is sqrtf?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where is sqrtf?


  • Subject: Where is sqrtf?
  • From: Robert Purves <email@hidden>
  • Date: Sun, 9 Jan 2005 16:18:02 +1300

At the command line, gcc has no problem with this tiny program:

/* test.c */
#include <math.h>
#include <stdio.h>
int main( void )
{
	float x = sqrtf( 2.0f );
	printf( "%f\n", x );
	return 0;
}

% gcc -lmx -o test test.c
%

Note: -lmx is required for C99 float functions such as sqrtf, in math.h


When I try the same in Xcode (with -lmx specified in Other C Flags), I get an error:
gcc-3.3: -lmx: linker input file unused because linking not done
ld: Undefined symbols: _sqrtf


How can I persuade Xcode that sqrtf exists?


Robert P.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Where is sqrtf?
      • From: Shaun Wexler <email@hidden>
    • Re: Where is sqrtf?
      • From: Eric Albert <email@hidden>
    • Re: Where is sqrtf?
      • From: Mike Lazear <email@hidden>
  • Prev by Date: Xcode 1.5 install: man3 curses files not found?
  • Next by Date: Re: Where is sqrtf?
  • Previous by thread: Xcode 1.5 install: man3 curses files not found?
  • Next by thread: Re: Where is sqrtf?
  • Index(es):
    • Date
    • Thread