Jump to content
tom 2007

Unresolved External Function:'strncpy16...'

Recommended Posts

Hello,

 

For my project I need to be able to use large arrays (512 bytes). So i'm trying to compile it with -idx 2 option but i always get 2 unresolved external functions:

 

"D:\program files\SourceBoost\boostlink_pic.exe"  -idx 2  /ld "D:\program files\SourceBoost\lib\large" libc.pic18.lib
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external symbol, function:strncpy16
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external symbol, function:strncmp16
1> 1> BoostLink Optimizing Linker Version 7.04

 

I'm compiling from the IDE and have checked 'memory model: large' in settings->options menu.

Share this post


Link to post
Share on other sites

Looking further, I am not convinced that any of the strnxxx() functions exist in the large library !

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

yes i've included string.h

 

Does it mean that i have to create strncpy function myself if it isn't in the library? How can you check which functions are in a .lib file?

Share this post


Link to post
Share on other sites

Hi Tom,

 

I tried all the strnxxx functions and they all came up unresolved.

 

I think Dave and Pavel will have to give us a clue here.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

tom 2007,

 

Hello,

 

For my project I need to be able to use large arrays (512 bytes). So i'm trying to compile it with -idx 2 option but i always get 2 unresolved external functions:

 

"D:\program files\SourceBoost\boostlink_pic.exe"  -idx 2  /ld "D:\program files\SourceBoost\lib\large" libc.pic18.lib
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external symbol, function:strncpy16
Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
Error: Unresolved external symbol, function:strncmp16
1> 1> BoostLink Optimizing Linker Version 7.04

 

I'm compiling from the IDE and have checked 'memory model: large' in settings->options menu.

This one had me scratching my head for a while. The problem is in the string.h header file, size_type was not used in a few places it should have been.

Attached is a corrected version of this file.

 

Regards

Dave

string.zip

Share this post


Link to post
Share on other sites

that explains why the 3th argument is unsigned char and not unsigned int ;)

 

Error seems to be fixed now, thanks dave

Edited by tom 2007

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×