Re: Link DLL to C project for an embedded system [message #1707315] |
Thu, 03 September 2015 16:12 |
|
On 09/03/2015 09:59 AM, Christopher Koch wrote:
> I am working on a project where my goal is to create a binary file (not
> an executable) from C code to flash into a microcontroller in order for
> the system to act as a MQTT client. I am using PAHO as the backbone for
> the MQTT Client and have downloaded and compiled the .dll and .lib files
> for the MQTT client using Microsoft Visual Studio 15.0. I have taken
> the MQTTClient.h file and included it in my eclipse project. Now I am
> trying to figure out how to link the .lib and/or .dll to the project so
> that I can compile the C code and generate the binary file to flash to
> my embedded system. I have tried a few different ways to do this but am
> not sure where in the make file to include the library or .dll. Below
> is my current output:
>
> 10:05:13 **** Build of configuration Default for project DSM_demo****
> mingw32-make debug C:/Workbench/make\mingw32-make.exe -C
> C:/Workbench/SDK/make -j debug make\mingw32-make.exe[1]: Entering
> directory 'C:/Workbench/SDK/make'
> make\mingw32-make.exe[1]: Nothing to be done for 'debug'.
> make\mingw32-make.exe[1]: Leaving directory 'C:/Workbench/SDK/make'
> [ LD ] exe/SDS.out
> build/MQTTSyncPub.o: In function `MQTTSyncPub':
> C:\Workbench\workspace\DSM_demo\make/../MQTTSyncPub.c:76: undefined
> reference to `MQTTClient_create'
> Makefile:94: recipe for target 'exe/SDS.out' failed
> C:\Workbench\workspace\DSM_demo\make/../MQTTSyncPub.c:81: undefined
> reference to `MQTTClient_connect'
> C:\Workbench\workspace\DSM_demo\make/../MQTTSyncPub.c:90: undefined
> reference to `MQTTClient_publishMessage'
> C:\Workbench\workspace\DSM_demo\make/../MQTTSyncPub.c:94: undefined
> reference to `MQTTClient_waitForCompletion'
> C:\Workbench\workspace\DSM_demo\make/../MQTTSyncPub.c:96: undefined
> reference to `MQTTClient_disconnect'
> C:\Workbench\workspace\DSM_demo\make/../MQTTSyncPub.c:97: undefined
> reference to `MQTTClient_destroy'
> collect2.exe: error: ld returned 1 exit status
> mingw32-make: *** [exe/SDS.out] Error 1
>
> Any help would be greatly appreciated. I am sorry if I haven't given
> enough information, please let me know anything else I need to include
> to help solve this issue.
>
> Thank you in advance,
> Chris
You would likely find more and better help in the Eclipse CDT forum.
|
|
|
|
Powered by
FUDForum. Page generated in 0.08370 seconds