picolog sdk library linking error

Forum for discussing PicoLog
Post Reply
sahil
Newbie
Posts: 0
Joined: Thu May 03, 2018 9:43 pm

picolog sdk library linking error

Post by sahil » Thu May 03, 2018 10:07 pm

Hi,

I giving try to the picolog sdk c example as mentioned here
https://github.com/picotech/picosdk-c-e ... l1000con.c

when I compile via command prompt console i.e.
gcc -o logger.exe logger.c

and I am getting these errors;

Code: Select all

undefined reference to `_imp__pl1000SetTrigger@36'
undefined reference to `_imp__pl1000SetInterval@20'
undefined reference to `fopen_s'
undefined reference to `_imp__pl1000Run@12'
and so on...
Please see attached snapshot of the errors;
Seems like a library linking issue.

I have included the pl100.lib and all required drivers in my main folder.
I have tried various combination of gcc linking e.g.

Code: Select all

gcc -o logger.exe logger.c
gcc -o logger.exe logger.c -L. -lpl1000
gcc -L logger.c pl1000.lib -o logger.exe
but getting the same errors.

I am using notepade for the logger.c file and then using command prompt for compilation.
My operating system is windows 10 64bit.

Thanks
Attachments
snapshot1.png

Hitesh
Site Admin
Site Admin
Posts: 2845
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: picolog sdk library linking error

Post by Hitesh » Tue May 08, 2018 8:32 am

Hi sahil,

Which version of the PicoSDK have you installed? Is it the 32-bit or 64-bit version?

If you do not have the correct PicoSDK installed for the target platform, it could be missing the corresponding lib file.

If you are building a 32-bit application, please ensure that the 32-bit PicoSDK has been installed, otherwise use the 64-bit PicoSDK.
Hitesh

Technical Support Engineer

Post Reply