LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup
cmake version 3.18.20081302-MSVC_2
and
cmake version 3.16.5
CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(testttttt)
include(GenerateExportHeader)
add_library(mylib SHARED Export.h)
generate_export_header(mylib)
set_target_properties(mylib PROPERTIES LINKER_LANG
Export.h
#include <string>
#include "mylib_export.h"
MYLIB_EXPORT int Export(const char* data_c, size_t size){
std::string http_data(data_c, size);
return 333;
}