[
https://issues.apache.org/jira/browse/MINIFICPP-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16667908#comment-16667908
]
ASF GitHub Bot commented on MINIFICPP-659:
------------------------------------------
Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/430#discussion_r229138444
--- Diff: nanofi/examples/CMakeLists.txt ---
@@ -61,18 +61,18 @@ add_executable(generate_flow generate_flow.c)
add_executable(terminate_handler terminate_handler.c)
-target_link_libraries(generate_flow capi ${CMAKE_THREAD_LIBS_INIT}
${LINK_FLAGS} minifi ${LINK_END_FLAGS})
+target_link_libraries(generate_flow nanofi ${CMAKE_THREAD_LIBS_INIT})
-target_link_libraries(terminate_handler capi ${CMAKE_THREAD_LIBS_INIT}
${LINK_FLAGS} minifi ${LINK_END_FLAGS})
+target_link_libraries(terminate_handler nanofi ${CMAKE_THREAD_LIBS_INIT})
if (NOT WIN32)
add_executable(transmit_flow transmit_flow.c)
-target_link_libraries(transmit_flow capi ${CMAKE_THREAD_LIBS_INIT}
${LINK_FLAGS} minifi ${LINK_END_FLAGS})
+target_link_libraries(transmit_flow nanofi ${CMAKE_THREAD_LIBS_INIT})
add_executable(monitor_directory monitor_directory.c)
-target_link_libraries(monitor_directory capi ${CMAKE_THREAD_LIBS_INIT}
${LINK_FLAGS} minifi ${LINK_END_FLAGS})
+target_link_libraries(monitor_directory nanofi ${CMAKE_THREAD_LIBS_INIT})
--- End diff --
Cmake implants those target libs in place. Therefore, I get
/usr/bin/c++ -std=c++11 -DOPENSSL_SUPPORT -std=c++11 -std=c++11
-rdynamic CMakeFiles/monitor_directory.dir/monitor_directory.c.o -o
monitor_directory
-Wl,-rpath,/home/marc/dev/nifi-minifi-cpp/build/thirdparty/uuid:/home/marc/dev/nifi-minifi-cpp/build/thirdparty/yaml-cpp-yaml-cpp-20171024
../libnanofi.a -lpthread -Wl,--whole-archive ../../libminifi/libminifi.a
../../libminifi/libcore-minifi.a -ldl ../../thirdparty/uuid/libuuid.so
../../thirdparty/yaml-cpp-yaml-cpp-20171024/libyaml-cpp.so.0.5.3
../../extensions/expression-language/noop/libminifi-expression-language-extensions.a
-lz -lssl -lcrypto -Wl,--no-whole-archive
Even though I had the above build statement. This is because of the way
CMAKE injects the targets, so there isn't the need for the extraneous target
protections. On my system monitror_directory works appropriately after
testing, but this does mean that MINIFICPP-660 should probably be changed to
enable better testing these examples in docker images. I will take a look at
that since I've already started 660
> Move CAPI code out of libminifi
> -------------------------------
>
> Key: MINIFICPP-659
> URL: https://issues.apache.org/jira/browse/MINIFICPP-659
> Project: NiFi MiNiFi C++
> Issue Type: Improvement
> Reporter: Mr TheSegfault
> Assignee: Mr TheSegfault
> Priority: Major
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)