Test and Measurement Forum

Compiler not finding CM3 C function definitions

Post your C and C++ discussions here

Compiler not finding CM3 C function definitions

Postby Martin Chisnall » Tue Dec 06, 2016 10:08 pm

I am trying to write my own application in C for PLCM3, and learning C at the same time!
I am using your sample C console code using Code Blocks IDE and GCC compiler.
the compiler complains that all the references to the PLCM3 functions are undefined, for example:
undefined reference to `_imp__PLCM3OpenUnit@8
The code has the following include line at the top:
#include "C:\program Files\Pico Technology\SDK\inc\PLCM3Api.h"
and the compiler linker includes paths to PicoStatus.h and PLCM3Api.h
What am I doing wrong / missing please?
(what, if anything, do I do with the PLCM3.dll?)
I am on a windows 10 64bit machine.
thank you.
Martin Chisnall
Newbie
 
Posts: 0
Joined: Tue Dec 06, 2016 9:53 pm

Re: Compiler not finding CM3 C function definitions

Postby Hitesh » Wed Dec 07, 2016 11:06 am

Hi Martin,

Are you building a 32-bit or 64-bit application?

You might need to include the plcm3.lib file which is located in the C:\program Files\Pico Technology\SDK\lib\ folder for the 64-bit drivers or C:\Program Files (x86)\Pico Technology\SDK\lib for 32-bit applications.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2431
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Compiler not finding CM3 C function definitions

Postby Martin Chisnall » Sat Dec 10, 2016 3:17 pm

Hi Hitesh,
Thank you for your quick and accurate response.
I did indeed have a mix of 32 and 64 bit includes and files going on!
All compiling OK now, but now the code is working I have another question which I will post under a new thread 'g_status = PLCM3OpenUnit'
Martin
Martin Chisnall
Newbie
 
Posts: 0
Joined: Tue Dec 06, 2016 9:53 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests