diff --git a/paddle/fluid/inference/capi/CMakeLists.txt b/paddle/fluid/inference/capi/CMakeLists.txt index bb3620b530c5ad70abadf1b0a9604ee3ff1f6b24..68e4fb4b1a3fa66c99bde411d97fdafacf286a8c 100644 --- a/paddle/fluid/inference/capi/CMakeLists.txt +++ b/paddle/fluid/inference/capi/CMakeLists.txt @@ -3,8 +3,9 @@ cc_library(pd_config SRCS pd_config.cc) cc_library(pd_predictor SRCS pd_predictor.cc) cc_library(pd_tensor SRCS pd_tensor.cc) cc_library(pd_c_api SRCS c_api.cc) - cc_library(paddle_fluid_c SRCS c_api.cc DEPS paddle_fluid pd_config pd_predictor pd_tensor pd_c_api) -# (TODO) dll -# cc_library(paddle_fluid_c_shared SHARED SRCS c_api.cc DEPS paddle_fluid pd_config pd_predictor pd_tensor pd_c_api) -# set_target_properties(paddle_fluid_c_shared PROPERTIES OUTPUT_NAME paddle_fluid_c) +cc_library(paddle_fluid_c_shared SHARED SRCS c_api.cc DEPS paddle_fluid pd_config pd_predictor pd_tensor pd_c_api) +set_target_properties(paddle_fluid_c_shared PROPERTIES OUTPUT_NAME paddle_fluid_c) +if(WIN32) + target_link_libraries(paddle_fluid_c_shared shlwapi.lib) +endif() diff --git a/paddle/fluid/inference/capi/pd_tensor.cc b/paddle/fluid/inference/capi/pd_tensor.cc index 9f1b6436fcca7ead518410cfdefcb6119ba965b0..8c797fd31d0f0aafede04e310a7b3192e763ece2 100644 --- a/paddle/fluid/inference/capi/pd_tensor.cc +++ b/paddle/fluid/inference/capi/pd_tensor.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include #include #include #include "paddle/fluid/inference/capi/c_api.h"