Hi, I am new to msp430-gcc. I am working on the msp430f148 microcontroller, and I have installed BSL on fedora 2
I want to find the square root of a number, and I have written the following code: #include <msp430x14x.h> #include <math.h> int main(void) { float number = 16.0; float root; root = sqrt(number); return 0; } However, this does not work and gives me the following error: msp430-gcc -mmcu=msp430x148 -o elf_file -O main.c /tmp/ccIhjeE2.o: In function `main': main.c:(.text+0x112): undefined reference to `sqrt' make: *** [elf_file] Error 1 I have tried converting float to double, but it still does not work. Someone please help out asap. I need to fix this bug at the earliest. Also, I am new to msp430-gcc, so please provide step by step solutions. Thanks Parikshit -- View this message in context: http://www.nabble.com/problem-using-sqrt%28-%29-t1419103.html#a3825202 Sent from the MSP430 gcc - Users forum at Nabble.com.