Hello everyone ![]()
I’m trying to build a JUCE plugin with an AI component written using torch. I am able to compile an application depending on torch only, and a basic JUCE plugin without torch dependency with no problems. However, when I try to combine them I get this runtime error:
Exception thrown at 0x00007FFAAAC7F90D (ntdll.dll) in minimal_plugin.exe: 0xC0000139: Entry Point Not Found.
Do you have any idea why it is triggering this error here?
I’ll attach my CMakeLists.txt file aswell:
cmake_minimum_required ( VERSION 3.15)
project ( minimal_plugin VERSION 0.0.1)
# TORCH compatibility
set ( CMAKE_PREFIX_PATH "../libs/libtorch")
find_package ( Torch REQUIRED )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS} ")
add_subdirectory (C:/Users/rizzo/JUCE ./JUCE )
juce_add_plugin (minimal_plugin
COMPANY_NAME Daevide
PLUGIN_MANUFACTURER_CODE D43
PLUGIN_CODE Abc1
FORMATS AU VST3 Standalone
PRODUCT_NAME "minimal_plugin"
)
juce_generate_juce_header ( minimal_plugin )
target_sources ( minimal_plugin
PRIVATE
Source/PluginEditor.cpp
Source/PluginEditor.h
Source/PluginProcessor.cpp
Source/PluginProcessor.h)
target_compile_definitions(minimal_plugin
PUBLIC
# JUCE_WEB_BROWSER and JUCE_USE_CURL would be on by default, but you might not need them.
JUCE_WEB_BROWSER=0 # If you remove this, add `NEEDS_WEB_BROWSER TRUE` to the `juce_add_plugin` call
JUCE_USE_CURL=0 # If you remove this, add `NEEDS_CURL TRUE` to the `juce_add_plugin` call
JUCE_VST3_CAN_REPLACE_VST2=0)
target_link_libraries(minimal_plugin
PRIVATE
# AudioPluginData # If we'd created a binary data target, we'd link to it here
juce::juce_audio_utils
"${TORCH_LIBRARIES}"
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags)
set_property ( TARGET minimal_plugin PROPERTY CXX_STANDARD 17)
if (MSVC)
file(GLOB TORCH_DLLS "${TORCH_INSTALL_PREFIX}/lib/*.dll")
add_custom_command(TARGET minimal_plugin
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${TORCH_DLLS}
$<TARGET_FILE_DIR:minimal_plugin>)
endif (MSVC)
Thank you! ![]()
