-
Notifications
You must be signed in to change notification settings - Fork 737
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
fatal error: umock_c/umock_c_prod.h: No such file or directory #1364
Comments
Hi @abhipony git submodule update --init --recursive to make sure you have all the latest submodules. After that, make sure to have in your include path |
I'm having this same issue only on Windows with the latest SDK release. |
@scout208 how are you building the code? Is it a hand rolled make, cmake, etc |
I'm using the Visual Studio integration with vcpkg and trying to build one of the samples (using Visual Studio) |
@danewalton I'm wondering is there a particular version of the azure-iot-sdk-c vcpkg that I need to have installed? |
are you using the latest version? |
Yeah, I am. I really just tried to follow the instructions at https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/devbox_setup.md#windows and https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/setting_up_vcpkg.md#setup-c-sdk-vcpkg-for-windows-development-environment and it doesn't work when I try to build the sample. |
@danewalton Hey, I was able to build it successfully using the latest version. I had to include -I$(AZURE_SDK_PATH)/deps/umock-c/inc and -I$(AZURE_SDK_PATH)/c-utility/deps/azure-macro-utils-c/inc to my path. Thanks for helping me out. :) |
@danewalton, @abhipony, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey |
OS version :
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 7.6 (Maipo)
Release: 7.6
Codename: Maipo
SDK Release: latest
Description:
I built azure-iot-sdk-c inside a docker.
My Dockerfile :
FROM balenalib/beaglebone-black:buster
COPY azure-iot-sdk-c /usr/src/app/azure-iot-sdk-c
WORKDIR /usr/src/app/azure-iot-sdk-c/build_all/linux
RUN apt-get -q update && apt-get install -yq --no-install-recommends git sudo
RUN ./setup.sh
RUN ./build.sh --no-logging
WORKDIR /usr/src/app/
After everything is built, I started using it in my application called pusher. I get the below error with the latest version of this library.
[Build] main In file included from /usr/src/app/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/platform.h:7:0,
[Build] main from src/pusher.cpp:8:
[Build] main /usr/src/app/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h:7:34: fatal error: umock_c/umock_c_prod.h: No such file or directory
[Build] main #include "umock_c/umock_c_prod.h"
[Build] main ^
[Build] main compilation terminated.
The headers included my file are :
#include "azure_c_shared_utility/platform.h
#include "azure_c_shared_utility/threadapi.
#include "iothub_client.h"
#include "iothubtransportmqtt_websockets.h"
My makefile for the appplication:
AZURE_SDK_PATH:=$(CURDIR)/azure-iot-sdk-c
CXXFLAGS += -I$(AZURE_SDK_PATH)/iothub_client/inc -I$(AZURE_SDK_PATH)/c-utility/inc -I/usr/include/azureiot -I/usr/include/azureiot/inc -I$(AZURE_SDK_PATH)/deps/parson -I .
binary/pusher:
$(CXX) -o $ @ $^ -L$ (AZURE_SDK_PATH)/cmake/iotsdk_linux/c-utility -L$(AZURE_SDK_PATH)/cmake/iotsdk_linux/umqtt -L$(AZURE_SDK_PATH)/cmake/iotsdk_linux/iothub_client $(LDLIBS) -lm -liothub_client_mqtt_ws_transport -lumqtt -l:libiothub_client.a -lpthread -laziotsharedutil -lssl -lcrypto -lcurl
src/pusher.o
parson.o
parson.o:$(AZURE_SDK_PATH)/deps/parson/parson.c $ (AZURE_SDK_PATH)/deps/parson/parson.h
gcc -c $(AZURE_SDK_PATH)/deps/parson/parson.c -o "parson.o"
I am currently working with an older version of this repo and I have to move to the latest version urgently. Please look into this issue and suggest a solution. Let me know if you have any doubts or queries.
The text was updated successfully, but these errors were encountered: