Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Re: Link DLL to C project for an embedded system
Re: Link DLL to C project for an embedded system [message #1707315] Thu, 03 September 2015 16:12 Go to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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.
Re: Link DLL to C project for an embedded system [message #1707461 is a reply to message #1707315] Fri, 04 September 2015 20:40 Go to previous message
Christopher Koch is currently offline Christopher KochFriend
Messages: 4
Registered: September 2015
Junior Member
Thank you for your help, I will move my question there.
Previous Topic:Eclipse MARS spends forever refreshing
Next Topic:Unable to scroll Help Window when Editor Dialogue open
Goto Forum:
  


Current Time: Wed Apr 24 22:09:52 GMT 2024

Powered by FUDForum. Page generated in 0.08370 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top