delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/03/11/10:58:16

To: djgpp AT sun DOT soe DOT clarkson DOT edu
From: Mike Piff <M DOT Piff AT sheffield DOT ac DOT uk>
Date: 11 Mar 94 12:02:51
Subject: Simple problems
Reply-To: Mike Piff <M DOT Piff AT sheffield DOT ac DOT uk>

Why will the following not work? (My first use of maths with C and my second
ever use of C!)  The linker says there is an unresolved reference to sqrt??


#include <math.h>

int x;

main(){
  x=sqrt(2.0);
}

(OK, I know x should be float!)

Also, how do I send output to a VGA graphics screen? I have only found t05.c
that uses graphics.h, but it just seems to send spaced-out dots to my screen,
no really dense graphics. A program that works perfectly well in Pascal just
produces a screen of full stops in GNU C.

Thanks in advance for any help,

Mike Piff

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Dr M J Piff, School of Mathematics and Statistics, University of %%
%% Sheffield, UK.                    e-mail: M DOT Piff AT sheffield DOT ac DOT uk %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019