KellenSunderland commented on a change in pull request #9456: [CMake] Add 
im2rec executable
URL: https://github.com/apache/incubator-mxnet/pull/9456#discussion_r161828744
 
 

 ##########
 File path: CMakeLists.txt
 ##########
 @@ -267,6 +267,8 @@ if(USE_OPENCV)
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined")
     endif()
   endif()
+  add_executable(im2rec "tools/im2rec.cc")
+  target_link_libraries(im2rec mxnet_static ${OpenCV_LIBS} 
${mxnet_LINKER_LIBS} dmlc)
 
 Review comment:
   Should definitely have: ${BEGIN_WHOLE_ARCHIVE} mxnet_static 
${END_WHOLE_ARCHIVE}.  I've run into that issue a few times now ;-).  If you 
don't put this the linker seems to optimize out all your operators, so you'll 
get some FCompute, or FInferShape not found error at runtime.
   
   Aren't we safe to always statically link the lib here though?  Any idea why 
this is turned of for MSVS for the unit tests? (I'm assuming you guys ran into 
issues at some point).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to