I managed to compile my Azure IoT SDK C programming project files (Without I/O and I2C Configuration) within Intel Edison itself using cmake.
Now, I wish to compile the Azure IoT SDK C programming project files in the Eclipse IDE.
Reason for choosing Eclipse IDE is I/O and I2C C project files is compiled and runs sucessfully on Eclipse IDE. (I/O and I2C configuration requires MRAA library)
Now, I have encountered compiling errors when trying to compile whole project files (Combined codes of Azure IoT SDK, I/O and I2C).
The errors are as per below:
It cannot reference to some functions of Azure library (I have copied all required C header files from Azure folder and inserted into Eclipse)
May I know is there any solution for this?
Below are the full list of header files I have included in Eclipse IDE:
Current Directory - Precedent of Other Folders: azure_c_shared_utility, azure_uamqp_c and azure_umqtt_c
What image version are you using? What Eclipse IDE version are you using? Can you list all the steps you did to configure Azure in the Eclipse IDE, were you following any guide, if so, which one?
I'd also suggest you to post your question in https://github.com/Azure/azure-iot-sdks https://github.com/Azure/azure-iot-sdks so you can receive a response from Azure support.
What image version are you using?
weekly-159.devkit-2.0 (Get from cat /etc/version)
159.devkit (Get from configure_edison --version)
What Eclipse IDE version are you using?
Intel IoT Development Kit IDE (Eclipse)
Version: Luna (4.4.2)
Build id: M20150204-1700
Can you list all the steps you did to configure Azure in the Eclipse IDE, were you following any guide, if so, which one?
I did not found any online guides that teach compiling Azure in Eclipse IDE. Thus, I tried it out myself by coping Azure library files into Eclipse IDE.
I have posted questions on both Microsoft Forum and Azure Github Forum.
Here are the link for the posts:
1) Microsoft Forum
https://social.msdn.microsoft.com/Forums/azure/en-US/336d48cb-452f-4450-a82f-e738b6724a00/intel-edis... Intel Edison - Issue On Compiling Azure IoT SDK In Eclipse IDE
2) Azure Github Forum
https://github.com/Azure/azure-iot-sdks/issues/698 Intel Edison - Issue On Compiling Azure IoT SDK In Eclipse IDE · Issue # 698 · Azure/azure-iot-sdks · GitHub
So far the issue is not solved.
Do you have any idea on cross compiling MRAA stastically in Ubuntu OS and link against itself in same project folder?
I tried myself by putting all required mraa C code and header files in same project folder, but it failed.
It shows errors as per below:
Now, Microsoft Azure IoT code in Ubuntu OS works and MRAA code in Eclipse IDE works.
But not for combined code complied in Ubuntu OS or Eclipse IDE.
Currently there is no alternative/methods that can combine both codes and compile code successfully in Ubuntu OS/Eclipse IDE.
Due to this, I cant proceed further for my project.
Can your side suggest a method to solve this since this is code compiling issue?
Thanks in advance.
Could you please share your code so we can attempt to see why it's not compiling? The issue could be related to the linker flags or the include paths in the Eclipse IDE when combining both libraries. We're doing our best to help in any way we can, but since there's no issue with MRAA, we cannot guarantee a solution to your problem.
Just by trying to compile your code I noticed the Eclipse was not able to find some of the header files. Although most of them are included in his project, some other header files require other files that are not included or the defined location is not correct. For example the header file umock_c_prod.h includes umock_c.h which is not included in the directory list that you provided. The Eclipse IDE lists the problems with a detailed description, the error name, the project, the path of the issue and the location, this is helpful to start eliminating encountered problems.
Take a look at this thread to get an idea on how to add this libraries into Eclipse IDE and add the necessary linker flags: /thread/94227 https://communities.intel.com/thread/94227