How to add linker additional dependencies into flutter desktop plugin for windows - flutter

I want to use CredUIPromptForWindowsCredentialsW function from windows api. But it require me add "Credui.lib" to linker additional dependencies.
With Visual studio we can go to Properties > Linker > All Options > Additional Dependencies then add it.
I saw it added to vcxproj file.
But with flutter plugin I can not see any file .sln or file .vcxproj, It is only auto generated by fullter.
How can I config linker file to flutter plugin ? In additional, How can we open windows folder as a project using Visual Studio as android folder using Android studio ?

Windows plugin builds are based on CMake, so you would use target_link_libraries in your plugin's CMakeLists.txt to add a library dependency.

Related

How to change VSCode Gradle Version?

Beginner here.
I get this build error when trying to build a project in visual studio code:
Executing Gradle tasks as part of a build without a settings file is not supported. Make sure you are executing Gradle from a directory within your Gradle project. Your project should have a 'settings.gradle(.kts) file in the root directory.
The thing is, is that there is already one there.
I believe it is because it is VSCode is using Gradle 7.x.x when I should be using 6.5.0.
Does anyone know how to change gradle version on visual studio code?
If you're using the Gradle for Java extension in VSCode and you have the Gradle wrapper in your project, the extension should use the version the wrapper is using by default, so specify the correct version there.
You can do that by manually updating the distributionUrl property in <your-project>/gradle/wrapper/gradle-wrapper.properties or by running the below command:
./gradlew wrapper --gradle-version <your-desired-version>
If you don't yet have a Gradle wrapper in your project, I would suggest you add it as it is the recommended way to execute Gradle builds. You can add it to your project with the following command
gradle wrapper --gradle-version <your-desired-version>
All listed commands are meant to be executed in the root folder of your project.
Documentation on the wrapper: https://docs.gradle.org/current/userguide/gradle_wrapper.html
I just managed to set the gradle version in VS code explicitly by performing the following steps:
Open the user settings (press F1, type "Preferences: Open User Settings (JSON)"
Add the following two settings to the file (settings.json):
"java.import.gradle.wrapper.enabled": false,
"java.import.gradle.version": "4.4.1"
Reopen your gradle project
Before doing this, VS code wanted to use gradle 7.3. It created the folder projectroot/.gradle/7.3, and failed to build my rather old project.
After performing the above changes I noticed the folder projectroot/.gradle/4.4.1 appearing and my legacy project was able to build from inside VS code.

How do I convert/ build .juce file to vst3 plugin

The following repository contains a .juce file along with c++ source file. The operating system I am currently working on is Ubuntu. I want to be able to build this file into a .vst3 file so that it can be added as a plugin in any DAW which has that capability. When I open the .juce file in Projucer, it only lists Visual Studio 2017 as an exporter option, with no option to add exporters (usually for Linux, the options are Code::Blocks and Makefile). How do I build the source files here to create a .vst3 plugin file?
In the projucer application, if you click on the plus icon in the bottom left, you will get a menu with which you can specify which exporter configuration you want to add to the project.
After adding the linux makefile as an exporter configuration, you should save the projucer file which will generate the makefiles.
Then you can use "make" via terminal to compile the plugin in the specified formats.
Please make sure to enable the VST3 option in the settings page.

how to configure sonarlint in VScode for C language?

I'm practising clean code and I installed sonarlint as a static testing tool to help me write clean code. after installing the editor rises this notification
SonarLint is unable to analyze C and C++ file(s) because there is no configured compilation
database.
after some searching, I found that I should add a file with a name
compile_commands.json.
this file should be exported automatically by cmake after adding this option
CMAKE_EXPORT_COMPILE_COMMANDS
where can I add this option in VScode.
this link is where the vscode redirected me to creat the required .json file
I am assuming that you are using CMake for your build. If that is the case then add the following line to the CMakeLists.txt
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Then build the project and the database will be created for you.

Unknown VST project files

I am trying to build a VST on Windows, using MinGW GCC compiler, and Cmake build system.
I am using this VST project as an example. It used cmake to build a visual studio project. I am rebuilding the project to work with MinGW I hope!
In the resources folder of the project there is a .rc file, and .vstxml file. I am confused as to what these are. Are the used by visual studio? Are the needed by MinGW?
https://github.com/gijzelaerr/gijzelijzer
The RC file is probably used for the GUI to bundle resources in the VST's DLL. Not sure what the VSTXML file is, but it's probably associated with the GUI again. Regardless, if you are making a GUI-less plugin just to get started, you won't need either of these files.

Migrate from Eclipse to Android studio: only empty build.gradle exported

The project works well in Eclipse and I have upgraded the android SDK to 22.0.1 too. when I follow the instruction
1, In Eclipse, select File > Export.
2, In the window that appears, open Android and select Generate Gradle build files.
3, Select the project you want to export for Android Studio and click Finish.
But the problem is the exported build.gradle is empty.only one comments there:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
and this empty file is never able to guide the android studio to import the project successfully.
Does anyone has idea what I should do? Thanks.