Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd party library works on Azure uart sample but doesnt work on Azure Iot sample #262

Open
nishithpoojary opened this issue May 29, 2023 · 4 comments

Comments

@nishithpoojary
Copy link

I have been testing with using a 3rd party library in Azure UART sample which was working. But when I tried the same library with the Azure Iot sample, I faced several issues. I can't disclose more about this here. Is there any way to share you more details about this issue privately, may be through mail.
Kindly let me know what I can do. Thank you.

@jamesadevine
Copy link
Contributor

jamesadevine commented May 30, 2023

Hi again!

You can send a support request here: azsppgsup@microsoft.com

Otherwise, please do open issues on github - no judgement here 😄.

@nishithpoojary
Copy link
Author

Hi @jamesadevine . Thanks for your reply. Sorry that I didn't know how to get support from microsoft team privately. So had to create a issue to get support as quickly as possible.

I used the 3rd party library in Uart sample by pasting the .c and .h file inside UART folder and putting the .c file name in "add_executable(${PROJECT_NAME}" of the CMakeLists.txt file. This worked.

When I used the same library in Azure IOT sample by pasting both .h and .c library files inside "common" folder and typing both .c and .h in "${CMAKE_CURRENT_LIST_DIR}/" of the CmakeLists.txt in common folder, I get errors in .c library.
I couldn't understand what caused the issue.

@jamesadevine
Copy link
Contributor

Hi @nishithpoojary

The LoggingToAzure sample copies the IoTHub folder from the AzureIoT project. Then, the CMakeLists.txt is updated with a call to add_subdirectory. The add_subdirectory CMake call invokes CMake on the folder and processes any CMakeLists.txt. The CMakeLists.txt of the IoTHub folder adds the required source files to the LoggingToAzure project.

Hope that helps!

@nishithpoojary
Copy link
Author

I am using the Azure IoT sample now. I am trying to use the 3rd party library in this project. I have already added the details of library in cmakelists present inside the common folder and pasted the .c and .h files in the common folder.
subdirectory is already available for common folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants