On Dienstag, 6. Februar 2007, Luit van Drongelen wrote:
> Allright, seems like I finally found my problem... somehow the compiler
> refuses to pass the linker the used/required libraries. Adding -l
> libm18f.lib to my linker options in piklab Fixes everything... Does anybody
> know why this doesn't happen automatically, or is this a problem caused by
> piklab, not sdcc?

Thats strange, does piklab have an way to display the command line options it 
uses to invoke sdcc?

Here's how I tested:

test.c:
----
#include "math.h"

int main() {
 float x;
 return sinf(x);
}
-----
compile using:
# sdcc -mpic16 -pp18f2550 test.c
test.c:5: warning 84: 'auto' variable 'x' may be used before initialization
test.c:5: warning 84: 'auto' variable 'x' may be used before initialization
message: using default linker script "/usr/share/gputils/lkr/18f2550.lkr"
-----
gives me a nice 19kb .HEX file, with the math functions for sin embedded.

Maybe also try to update gputils to a recent version?
# gplink -v
gplink-060819 alpha


> > I just added the 31 december snapshot (removes my ability to program to
> > PIC18F4431, which I added myself) and it still gives me the same error;

Thats easy to fix: Just post your changes to the developers, and the next 
snapshot might contain that device already ;)


/Ernst

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to