Yes, you're right. I've compiled that library source code file with -S and this is what the problem is: "push r2 dint calla #__umulsi3hw pop r2" appears on a single line. So it is a CR/LF problem. But everything else works fine. I did a google search on that, and the page was unavailable, but now I've seen that there is a cached version.
I'll try to do that binary mode mount thing, see if it helps. Oszkar Bevan Weiss <[email protected]> Sent by: [email protected] 07/18/2007 01:40 PM Please respond to "GCC for MSP430 - http://mspgcc.sf.net" <[email protected]> To "GCC for MSP430 - http://mspgcc.sf.net" <[email protected]> cc Subject Re: [Mspgcc-users] undefined reference to ... ? Is the error regarding r2dintcall something like as shown below? Error: unknown operand r2dintcall#__umulsi3hwpopr2 That seemed to be a compiler build problem... from the quick google search I did. Something about incorrect CR/LF settings in cygwin.. not sure entirely. It might pay to examine the map file to see whether sin and sqrt are actually present. I'm not sure if the linker is smart enough to exclude them if they're not actually reference, but it's worth a look anyway. Bevan > > I understand. Thank you. I didn't know that about printf. > > As for sin and sqrt, yes I've compiled with -lm, and included math.h. > That's why I can't see what the problem could be. > And I don't know what r2dintcall is. > > Thanks, > Oszkar > > > > > *Bevan Weiss <[email protected]>* > Sent by: [email protected] > > 07/18/2007 01:20 PM > Please respond to > "GCC for MSP430 - http://mspgcc.sf.net" > <[email protected]> > > > > To > "GCC for MSP430 - http://mspgcc.sf.net" > <[email protected]> > cc > > Subject > Re: [Mspgcc-users] undefined reference to ... ? > > > > > > > > > > I'll have a go at this, though I'm sure Grant or Steve will also throw > in on the matter with much more authoritative answers. > > printf relies on putchar to actually write the character string out to > the UART. printf doesn't know which UART you want it to be directed to, > so it just directly reference putchar and expects you to provide putchar > to output them. > If you've setup a simple polled serial port driver then it should be as > simple as having > void putchar(int c) > { uart_tx(c); > } > > or something like that. I can't remember if putchar is defined with an > int argument or just a char. Experimentation would tell you > > As for sqrt, are you linking in the math library? -lm > The same might apply to sin, though I might actually be wrong on both of > these. > > I believe the math functions also require you to compile against the > math header file math.h.. > > > Bevan > > > > > Hi, > > > > I keep getting these error messages: "undefined reference to ...." > > When I try to use printf, it's undefined reference to putchar. > > When I use sqrt, it's undefined reference to sqrt. > > When I use sin, it's undefined reference to r2dintcall (???). > > > > Is there a solution, or is this normal? (can't imagine it to be) > > > > > > Thanks, > > Oszkar > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Mspgcc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
