[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] math.h linker fejl



Sune Fischer <sslug@sslug> writes:
> > Ja, det mener jeg. Alle de matematiske funktioner er i libm, så det skal
> > linkeren lige ha' at vide.
> Tak, det virkede.  Det har de bare sådan lavet om uden at skrive det
> i man-pages?  Lidt mystisk, men ok ;)

Så vidt jeg kan høre opfører Red Hat sig anderledes end min
debian. Hvis jeg ikke har misforstået dig, vil du gerne kunne skrive
sådan her (Det kan jeg):

emmy:~/ctest> cat header.h
#include <math.h>
#include <stream.h>
float f(float x);

emmy:~/ctest> cat del.C
#include "header.h"
float f(float x) {return sin(x);};

emmy:~/ctest> cat program.C
#include "header.h"
int main(){cout << f(0.1)<<endl;};

emmy:~/ctest> g++ -c -o del.o del.C
emmy:~/ctest> g++ -c -o program.o program.C
emmy:~/ctest> g++   -o program program.o del.o
emmy:~/ctest> program
0.0998334
emmy:~/ctest>

-- 
Niels L Ellegaard  http://dirac.ruc.dk/~gnalle/
SPECIAL OFFER! I proofread unsolicited commercial email sent to this
address at a rate of US $500.00 per incident!  Include billing address
in your message and save US $500.00 per hour off ordinary address
resolution and tracking charge!


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *