1st TRY
2nd TRY
3rd TRY
4th TRY
As a basis we take Application with JNI Library from Nokee. Download GroovyDSL extract to a folder. Move the folder to Empty VSCode. I am using Java 18 therefore I need to VSCode promts me to upgrade to Gradle 7.3.1 Gradle Projects->jvm-application-with-jni-library->Tasks->Build Gradle Projects->jvm-application-with-jni-library->Tasks->Application->Run
Move downladed forlder with kfr cloned library to Empty VSCode CMake will promt for build environment. Select the appropriate (Clang) CMake -> Build All Projects (Icon) Create subfolder dependencies/kfr in jni-library folder of the above JNI project Copy the *.lib and *.h files and include subfolder from kfrlib folder to above newly created folder
- Show All Commands Java: Create Java Project
- Select project type: Gradle
- In Select Target Folder Window create a folder for workspace
- Select build script DSL : Groovy
- Input name of the project
- Gradle Projects under project select Tasks->build->build
- Gradle Projects under project select Tasks->application->run
- Should show in terminal "Hello World!"
- First create source cpp folder under app/src/main
- Adjust Workspace settings for CMake : Show All Commands Preferences: Open User Settings in Extensions under CMake Tools adjust
CMake: Build Directory ${workspaceFolder}/build* to ${workspaceFolder}/app/build CMake: Source Direcory ${workspaceFolder} to ${workspaceFolder}/app/src/main/cpp
- Show All Commands CMake: Quick Start
- Enter name of the project
- Create an executable
- Show ALl Commands CMake: Configure, CMake: Build, CMake: Debug
- Shoud show in terminal "Hello World"!
Following instructions
KFR will be included in CMake project which was set up previously Cometa needs C++14 therefore we need to add this to CMakeLists.txt
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
endif()
And for KFR these lines needs to be added to CMakeLists.txt
add_subdirectory (C:/Users/msd/DSP/kfr kfr)
include_directories(C:/Users/msd/DSP/kfr/include)
include_directories("C:/Program Files/Java/jdk-18.0.1.1/include")
include_directories("C:/Program Files/Java/jdk-18.0.1.1/include/win32")
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries(kfr INTERFACE)
target_link_libraries(kfr_dft)
target_link_libraries(kfr_io)
Apache NetBeans IDE is used. C/C++ plugin is needded. Following this YouTube tutorial. Everything is explained in the video. At the end of the video the guy says Eclipse is better due to outdated C/C++ plugin for NetBeans
After browsing on Google I found this YouTube turorial. It is an Eclipse project. Just follow all the steps.