Sponsored Content
Top Forums Programming C Library reference error using sqrt() - will not compile. Post 302469614 by jim mcnamara on Sunday 7th of November 2010 07:34:04 AM
Old 11-07-2010
Code:
gcc a.c -lm

link in the math library
This User Gave Thanks to jim mcnamara For This Post:
 

8 More Discussions You Might Find Interesting

1. Programming

sqrt

Hi! when i'm trying to compile this lite example on my linux machine I'll get errors and i don't know why.. #include <stdio.h> #include <math.h> /* needed by sqrt() */ int main() { printf("%f", sqrt(10.0)); return (0); } this is the error: /tmp/cc33hNVHK.o: In function... (1 Reply)
Discussion started by: CreamHarry
1 Replies

2. Programming

How compile a library on solaris(like dll in windows)

Hi all, how do i compile a c program into a library on solaris Thanks in advance Zing (3 Replies)
Discussion started by: zing
3 Replies

3. Programming

sqrt is not find???

I was writing a simple program in linux, which includes sqrt function of c. I included the math.h. But when I use gcc to compile it, it gave an error message: /home/murat/tmp/ccOv9upo.o(.text+0x4b): In function `main': : undefined reference to `sqrt' collect2: ld returned 1 exit status I... (2 Replies)
Discussion started by: murataht
2 Replies

4. Solaris

DBI with MySQL client library compile on Solaris

how dow you complie perl module DBI with mysql from /usr/local/mysql/bin keeps going to mysql client for /usr/sfw/bin is it the LD_PATH ???...:confused: error is # perl login.cgi DBI connect('customers;mysql_socket=/tmp/mysql.sock:localhost','root',...) failed: Client does not... (1 Reply)
Discussion started by: photon
1 Replies

5. OS X (Apple)

Canot find library on compile - fixing PKG_CONFIG_PATH isn't working

I am using bash on OSX Leopard. When I attempt ./configure I get this error: checking for OPENSSL... configure: error: Package requirements (openssl) were not met: No package 'openssl' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a... (2 Replies)
Discussion started by: reasonstoprefer
2 Replies

6. UNIX for Dummies Questions & Answers

sqrt in bash

Hi, i have a the following script: #!/bin/bash a=3 b=9 let "c= b*a" let "d=sqrt $c " echo $d But when i execute the code, it gives me the an error saying: line 5: let: d=sqrt 27 : syntax error in expression (error token is "27 ") Can any body tell me what I'm doing wrong? (5 Replies)
Discussion started by: limadario
5 Replies

7. Shell Programming and Scripting

Perl de-reference code reference variable

Guys, May i know how can we de reference the code reference variable.? my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";}; print $a->(4,5); How can we print the whole function ? Please suggest me regarding this. Thanks for your time :) Cheers, Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies

8. Programming

Specifying dynamic library path to linker at compile time

I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great. But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies
NCURSES_COLOR_CONTENT(3)						 1						  NCURSES_COLOR_CONTENT(3)

ncurses_color_content - Retrieves RGB components of a color

SYNOPSIS
int ncurses_color_content (int $color, int &$r, int &$g, int &$b) DESCRIPTION
Retrieves the red, green, and blue components for the given color definition. Terminal color capabilities must be initialized with ncurses_start_color(3) prior to calling this function. PARAMETERS
o $color - The number of the color to retrieve information for. May be one of the pre-defined color constants. o $r - A reference to which to return the red component of the color. The value returned to the reference will be between 0 and 1000. o $g - A reference to which to return the green component of the color. The value returned to the reference will be between 0 and 1000. o $b - A reference to which to return the blue component of the color. The value returned to the reference will be between 0 and 1000. RETURN VALUES
Returns -1 if the function was successful, and 0 if ncurses or terminal color capabilities have not been initialized. SEE ALSO
ncurses_init_color(3), ncurses_start_color(3). PHP Documentation Group NCURSES_COLOR_CONTENT(3)
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy