Sponsored Content
Top Forums Programming cc -- Unsatisfied symbols -- on HP-UX 10.2 Post 302372240 by Dirk_ on Tuesday 17th of November 2009 11:25:50 AM
Old 11-17-2009
cc -- Unsatisfied symbols -- on HP-UX 10.2

Greetings,
I am slowly learning a few things but am far from being an expert. I am at the point now that I
would like to be able write some ANSI C code on HP-UX 10.2. Just a hobbie... I am just using cc,
which came with the HP-UX 10.2 ...
I don't have the manuals for the development environment...
Anyway, I have the following sample code that illustrates that I am missing a library file
when cc attempts to link??? That is the conclusion I have come to.
I have looked through man pow, and man math and have not found the information I am looking for.

I am not sure 1) which library file is missing and 2) the syntax I need to use to poperly compile
and link in the object files.
Following is sample code that illustrates the issue I am having with cc
Thanks in advance,
Dirk

Code:
$ uname -a
HP-UX green B.10.20 A 9000/782 2015827886 two-user license
=========
cat ex4_6.c
#include <stdio.h>
#include <math.h>
 
 
main ()
{
float polyresult;
polyresult = 3 * powf(2.55, 3) + 2 * powf(2.55, 2) + 6;
printf("the result is %f\n", polyresult );
 
}
 
 
$ cc ex4_6.c
/usr/ccs/bin/ld: Unsatisfied symbols:
powf (code)


Last edited by pludi; 11-18-2009 at 06:34 PM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

1. Programming

undefined symbols

i am trying to compile transcode on AIX v 4.3.3 with gcc 3.0.1 i am getting this error: gcc -shared -o .libs/libexport_null.so.0 export_null.o -lpthread -ldl -lc -Wl,-bnoentry -Wl,-bexport:.libs/libexport_null.exp ld: 0711-317 ERROR: Undefined symbol: capability_flag ld: 0711-317... (0 Replies)
Discussion started by: thalex
0 Replies

2. Shell Programming and Scripting

new lines symbols in sed?

I want to edit a huge script file using sed. How can I add the new lines symbols in the red colored places? sed -e "s/test -z "$x"/if test -z "$x" then echo -1; \n else \n/g" (1 Reply)
Discussion started by: gogogo
1 Replies

3. UNIX for Dummies Questions & Answers

static kernel symbols

Why kernel symbols should be declared static? Closed - homework (0 Replies)
Discussion started by: anupa
0 Replies

4. Shell Programming and Scripting

Filtering symbols from contents

Hi, Any one of you guys can you help me out to filter all "," (single comma) from the below attached contents in a file. sportiva:root:/home/users/thayata/test # cat sample2.csv Heading,Sub Heading,,Detail Server details,Deployment environment:,,Standard Datacentre DC1 ,Chassis... (2 Replies)
Discussion started by: ajilesh
2 Replies

5. AIX

Unresolved symbols

Hello experts , i have some strange problem, i wanted to create a shared object in AIX 5.3 for which i have compiled all my .cxx to .o which worked fine and then i created the .so from them , but when i do nm -Bo sample.so , i have many unresolved symbol, including printf... (0 Replies)
Discussion started by: vin_pll
0 Replies

6. Programming

/usr/ccs/bin/ld: Unsatisfied symbols:

Hi, I am getting the following error while compiling my C++ program using GCC compiler. /usr/ccs/bin/ld: Unsatisfied symbols: display (first referenced in /var/tmp//cclSYScd.o) (code) collect2: ld returned 1 exit status Can anybody help me out? Thanks in advance..!! (1 Reply)
Discussion started by: Kattoor
1 Replies

7. Shell Programming and Scripting

how to remove weird symbols

Hi my file is suffering from some weird text symbols like a question mark inside of a square. I don't know how to remove these. I tried to remove UTF accents with command sed -e 's/^*Width:*//' -e 's/*$//'` but no use . Could u guyz plz help me. (4 Replies)
Discussion started by: repinementer
4 Replies

8. Shell Programming and Scripting

redirecting symbols

Can anyone please tell me what the following do 1. < 2. << Thanks Calypso (1 Reply)
Discussion started by: Calypso
1 Replies

9. UNIX for Dummies Questions & Answers

Help with understanding the symbols '~#' and '~$'

I noticed that sometimes there is "~#" or "~$" in the terminal. What is that? I can't make any research in google because I don't know what are they called. I even tried reading pdf's or books but unfortunately, I wasn't lucky to find out. Maybe I was not persistent enough but I am really... (3 Replies)
Discussion started by: chams
3 Replies

10. AIX

Errno.h symbols

Hi, I need to look at a recent copy of /usr/include/errno.h from AIX 7.2 to check some symbols. In particular, I'm curious if it defines EOWNERDEAD and ENOTRECOVERABLE. Can someone who has access to 7.2 please check for me? Thanks! (1 Reply)
Discussion started by: topcat
1 Replies
pow(3M) 						  Mathematical Library Functions						   pow(3M)

NAME
pow, powf, powl - power function SYNOPSIS
cc [ flag... ] file... -lm [ library... ] #include <math.h> double pow(double x, double y); float powf(float x, float y); long double powl(long double x, long double y); DESCRIPTION
These functions compute the value of x raised to the power y, x**y. If x is negative, y must be an integer value. RETURN VALUES
Upon successful completion, these functions return the value of x raised to the power y. For finite values of x < 0, and finite non-integer values of y, a domain error occurs and either a NaN (if representable), or an implemen- tation-defined value shall be returned. If the correct value would cause overflow, a range error occurs and pow(), powf(), and powl() return HUGE_VAL, HUGE_VALF, and HUGE_VALL, respectively. If x or y is a NaN, a NaN is returned unless: o For any finite value of y, if x is +1 and y is either +-Inf or NaN and the application is SUSv3-conforming (see standards(5)), 1.0 is returned. o For any value of x (including NaN), if y is +-0, 1.0 is returned. For any odd integer value of y > 0, if x is +-0, +-0 is returned. For y > 0 and not an odd integer, if x is +-0, +0 is returned. If x is -1, and y is +-Inf, 1.0 is returned. For |x| < 1, if y is -Inf, +Inf is returned. For |x| > 1, if y is -Inf, +0 is returned. For |x| < 1, if y is +Inf, +0 is returned. For |x| > 1, if y is +Inf, +Inf is returned. For y an odd integer < 0, if x is -Inf, -0 is returned. For y < 0 and not an odd integer, if x is -Inf, +0 is returned. For y an odd integer > 0, if x is -Inf, -Inf is returned. For y > 0 and not an odd integer, if x is -Inf, +Inf is returned. For y < 0, if x is +Inf, +0 is returned. For y > 0, if x is +Inf, +Inf is returned. For y an odd integer < 0, if x is +-0, a pole error occurs and +-HUGE_VAL, +-HUGE_VALF, and +-HUGE_VALL are returned for pow(), powf(), and powl(), respectively. For y < 0 and not an odd integer, if x is +-0, a pole error occurs and HUGE_VAL, HUGE_VALF, and HUGE_VALL are returned for pow(), powf(), and powl(), respectively. For exceptional cases, matherr(3M) tabulates the values to be returned by pow() as specified by SVID3 and XPG3. ERRORS
These functions will fail if: Domain Error The value of x is negative and y is a finite non-integer. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, the invalid floating-point exception is raised. The pow() function sets errno to EDOM if the value of x is negative and y is non-integral. Pole Error The value of x is 0 and y is negative. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, the divide-by-zero floating-point exception is raised. Range Error The result overflows. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, the overflow floating-point exception is raised. The pow() function sets errno to EDOM if the value to be returned would cause overflow. USAGE
An application wanting to check for exceptions should call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an exception has been raised. An application should either examine the return value or check the floating point exception flags to detect exceptions. An application can also set errno to 0 before calling pow(). On return, if errno is non-zero, an error has occurred. The powf() and powl() functions do not set errno. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
exp(3M), feclearexcept(3M), fetestexcept(3M), isnan(3M), math.h(3HEAD), matherr(3M), attributes(5), standards(5) NOTES
Prior to Solaris 2.6, there was a conflict between the pow function in this library and the pow function in the libmp library. This con- flict was resolved by prepending mp_ to all functions in the libmp library. See mp(3MP) for details. SunOS 5.10 1 Nov 2003 pow(3M)
All times are GMT -4. The time now is 07:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy