diff --git a/README.md b/README.md index 19ad94c..5890c38 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ git clone https://github.com/acids-ircam/nn_tilde --recurse-submodules cd nn_tilde mkdir build cd build -cmake ..\src -A x64 -DCMAKE_PREFIX_PATH="" +cmake ..\src -A x64 -DCMAKE_PREFIX_PATH="" -DPUREDATA_INCLUDE_DIR="" -DPUREDATA_BIN_DIR="" cmake --build . --config Release ``` diff --git a/src/frontend/maxmsp/nn_tilde/CMakeLists.txt b/src/frontend/maxmsp/nn_tilde/CMakeLists.txt index 8e58bda..27fcf89 100755 --- a/src/frontend/maxmsp/nn_tilde/CMakeLists.txt +++ b/src/frontend/maxmsp/nn_tilde/CMakeLists.txt @@ -71,6 +71,7 @@ endif() endif() if (MSVC) # COPY TORCH DLL IN THE LOADER FOLDER +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${TORCH_INSTALL_PREFIX}/lib/" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ ) diff --git a/src/frontend/puredata/nn_tilde/nn_tilde.cpp b/src/frontend/puredata/nn_tilde/nn_tilde.cpp index dc3fe0c..e1be2ad 100644 --- a/src/frontend/puredata/nn_tilde/nn_tilde.cpp +++ b/src/frontend/puredata/nn_tilde/nn_tilde.cpp @@ -273,7 +273,11 @@ void startup_message() { } extern "C" { +#ifdef _WIN32 +void __declspec(dllexport) nn_tilde_setup(void) { +#else void nn_tilde_setup(void) { +#endif startup_message(); nn_tilde_class = class_new(gensym("nn~"), (t_newmethod)nn_tilde_new, 0, sizeof(t_nn_tilde), CLASS_DEFAULT, A_GIMME, 0); @@ -288,4 +292,4 @@ void nn_tilde_setup(void) { A_GIMME, A_NULL); CLASS_MAINSIGNALIN(nn_tilde_class, t_nn_tilde, f); } -} \ No newline at end of file +}