Am 17.09.2012 01:35, schrieb Robert Wessels: > The following compiles just fine. > > #include <msp430.h> > #include <math.h> > > unsigned int foo = 0; > int main() > { > double var = log(1024); > var++; > }
As this is just a constant, the compiler is calculating the value. it will not call "log" > This piece of code however gives: [...cut example with "log(foo)"...] > main.o: In function `main': > /Users/rwessels/tmp/log_bug/main.c:9: undefined reference to `log' you probably did not link the math library. try adding "-lm" when you're linking. chris ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users