Error while developing sample provider
ganesh kumar
ganeshkumar14 at gmail.com
Mon Oct 14 07:57:47 UTC 2013
Hi,
I'm getting error while creating sample provider. I followed "Openlmi CIM
Provider HowTo" tutorial to create "mof,.c,.h and CMakeList" files, when i
tried to cmake it asks for "CMake Error: your CXX compiler: "/usr/bin/c++"
was not found" so i installed gcc-c++ rpm.
later i followed tutorial instruction i.e.
mkdir build && cd build
cmake ..
when i try to make, its reporting error globals.h, errors.h...etc files not
found. So i copied globals.h errors.h....etc and their respective .c files
from openlmi-networking provider to sample folder.
But now i getting error in globals.h file.
#openlmi-providers/src/sample/globals.h:131:71: error: unknown type name
‘uint’
LMIResult g_hash_table_insert_uint(GHashTable *hash, const char *key, uint
value);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/openlmi-devel/attachments/20131014/449295d8/attachment.html>
-------------- next part --------------
cmake_minimum_required(VERSION 2.6)
include(OpenLMIMacros)
find_package(CMPI REQUIRED)
find_package(KonkretCMPI REQUIRED)
add_subdirectory(mof)
set(PROVIDER_NAME sample)
set(LIBRARY_NAME cmpiLMI_${PROVIDER_NAME})
set(MOF 60_LMI_Sample.mof)
set(CMAKE_C_FLAGS "-std=c99")
# Add all your .c source files here
set(provider_SRCS
LMI_SIPProtocolEndpointProvider.c
)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
konkretcmpi_generate(${MOF}
CIM_PROVIDERS
CIM_HEADERS
CIM_CLASSES
)
add_library(${LIBRARY_NAME} SHARED
${provider_SRCS}
${CIM_PROVIDERS}
${CIM_HEADERS}
)
# FIXME - /usr/include/openlmi shouldn't be hardcoded, needed for globals.h
# OpenLMI should provide a pkgconfig file
include_directories(${CMAKE_CURRENT_BINARY_DIR}
${CMPI_INCLUDE_DIR}
${GLIB2_INCLUDE_DIRS}
/usr/include/openlmi
)
target_link_libraries(${LIBRARY_NAME}
openlmicommon
${KONKRETCMPI_LIBRARIES}
${GLIB2_LIBRARIES}
)
# Create registration file
cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 60_LMI_Sample.mof
Type: application/octet-stream
Size: 332 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/openlmi-devel/attachments/20131014/449295d8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LMI_SIPProtocolEndpointProvider.c
Type: text/x-csrc
Size: 7317 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/openlmi-devel/attachments/20131014/449295d8/attachment.bin>
More information about the openlmi-devel
mailing list