Im trying to build the newest OpenCV version (4.2.0) for x86/32bit on Windows for Visual Studio. However there is only 1 OpenCVConfig.cmake in the finished build (opencv/build/win-install/x86/vc16/lib/OpenCVConfig.cmake - there is no bin folder).
What i've tried:
I've downloaded and executed the latest version (opencv-4.2.0-vc14_vc15.exe)
I've followed this SO thread and added the short snippet in my opencv/build/OpenCVConfig.cmake
Downloaded Cmake 3.17 and installed via the installer
Started the Cmake GUI - set source code to opencv/sources and binaries to opencv/build
Choose Visual Studio 16-2019 as generator and options to win32
Configured Proxy for the downloads and clicked on Generate.
I got no noticeable Errors in the build process. The last lines of the console are:
Install to: C:/Users/user/opencv/build/install
Configuring done
Generating done
There is also no install folder inside opencv/install. I think it installs to opencv/build/win-install.
What am i doing wrong?
I'm usingn Aptana Studio 3 on Mac High Sierra. I have imported my Rails 5 project and set "Rails" as my project natures in the "Properties" section of my project. However when editing some Ruby files, Aptana is incorrectly reporting syntax errors on the left side of the editor. For example, this line
creds = PasswordService.find_user(params[:login])&.object
is flagged with this error
syntax error, unexpected tDOT
even though this doesn't raise any errors when I run my project. I'm wondering if Aptana is not picking up the correct version of Ruby associated with my project but I'm not sure how to check/set that.
I don't use Aptana, but maybe you want to set your Ruby version too because the safe navigation & is a Ruby feature.
In the project directory run ruby -v in the console and check the ruby version, it must be higher than 2.3.
If you use a ruby version manager (rbenv or rvm) make sure you configure the right Ruby version for the project.
Is studio3-ruby the plugin you're using?
If so, I found this open issue that seems related to Ruby 2.0 support:
https://github.com/aptana/studio3-ruby/issues/8
Is there anyone who has a decent working solution to integrate Netbeans 8.0 with behat, in terms of code highlighting and code-completion.
I saw that there exists the Cetriolo plugin which is unfortunately not available for Netbeans 8.0.
Has anyone found a workaround on this?
I would suggest this plugin for NetBeans that works also for version 8.x
http://plugins.netbeans.org/plugin/17939/cucumber-features
Some more details to #Ferie's answer:
I indeed could not install Cetriolo on Netbeans 8.2.
Instructions to install Cucumber Features manually (since automatic installation is not available):
Download the .nbm file by clicking on the "Download" button on http://plugins.netbeans.org/plugin/17939/cucumber-features
In Netbeans, go to Tools > Plugins > Downloaded > Add Plugins... and open the .nbm file.
Click Install
After restarting Netbeans, you should see syntax highlighting in .feature files.
Here's a feature request for Netbeans to include Behat support out-of-the-box:
https://netbeans.org/bugzilla/show_bug.cgi?id=226804
I was trying to get Rust to work on my Windows box. I followed the instructions, however when I tried hello world program, it spits the below. It looks like it has not been able to link up to gcc.. and I have gcc out there. Could someone help me figure out what is the issue here?
$ rustc foo.rs
error: linking with `gcc` failed: exit code: 1
note: gcc arguments: '-m32' '-LC:\Program Files (x86)\Rust\bin\rustlib\i686-pc-m
ingw32\lib' '-o' 'foo' 'foo.o' '-shared-libgcc' '-LC:\MinGW\msys\1.0\home\ENwank
wo\.rust' '-LC:\MinGW\msys\1.0\home\ENwankwo' 'C:\Program Files (x86)\Rust\bin\r
ustlib\i686-pc-mingw32\lib\libstd-3e5aeb83-0.9.rlib' 'C:\Program Files (x86)\Rus
t\bin\rustlib\i686-pc-mingw32\lib\libgreen-83b1c0e5-0.9.rlib' 'C:\Program Files
(x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\librustuv-2ba3695a-0.9.rlib' '-lws2_3
2' '-lpsapi' '-liphlpapi' '-lmorestack'
note: gcc: fatal error: -fuse-linker-plugin, but liblto_plugin-0.dll not found
compilation terminated.
error: aborting due to previous error
task 'rustc' failed at 'explicit failure', C:\bot\slave\dist2-win\build\src\libs
yntax\diagnostic.rs:75
task '<main>' failed at 'explicit failure', C:\bot\slave\dist2-win\build\src\lib
rustc\lib.rs:453
This is how to install Rust on windows with Visual Studio Code and optionally MSYS2 MinGW
You can Instal Rust without installing "Microsoft C++ Build Tools". You can also use Rust with the gcc or clang tools from the MSYS2 suite.
I didn't want to install Rust on Windows with the required "Microsoft C++ Build Tools" because this would need too much disk space.
To get Microsoft C++ Build Tools on Windows you need to download a full Windows SDK which is very large (I think more than 4GB).
You can run and debug Rust programs without installing MSYS2.
If you want to use the gcc or clang compilers that are included in MSYS2 (you will need to install them in a separate step from the MSYS2 installation, using the version of the pacman package manager from MSYS2), then you can install MSYS2.
(MSYS2 also allows you build very easily, C++ programs inside Visual Studio Code with the C++ extensions installed, using the gcc or clang compilers).
The MSYS2 installation version needs 1.61 GB for MSYS2 ( The tools installed using mingw-w64-x86_64-toolchain occupy 1083.49 MiB of disk space out of the 1.61 for the total MSYS2 suite).
Rust installs about 1.46 GB of files - mostly in the "C:\Users\user\.rustup" folder when using the parameter "x86_64-pc-windows-gnu" (for a MSYS MinGW install).
Rust takes up 900 MB after installation, when using "x86_64-pc-windows-msvc" (for a "Microsoft C++ Build Tools" install).
For a better Rust experience inside VS Code it is recommended to install the rust-analyzer extension Online from the VS Code Marketplace, or instead of it, the Rust plugin from [Link1] below, at the bottom of the post.
All you have to do is:
Install Visual Studio Code
(Optional - Install MSYS2)
Install Rust
Install Pyton if you don't have it
Add the required folders to the PATH variable
Install rust-analyzer and CodellDB extensions inside VS Code
At the end of this guide you should be able to run and debug rust programs inside Visual Studio Code.
MSYS2 is optional, you can install it if you want to use the gcc or clang from the suite - after creating the cargo config file, the cargo build and cargo run commands will use msys64\mingw64\bin\clang++.exe (by default if both compilers are installed, or ..\msys64\mingw64\bin\gcc.exe if you set it up to do this).
Just follow the installation from Part 1 - below.
(This part is just for reference - it lists the files and folders required for setup and how I chose the installation directories - )
I installed the programs inside these folders:
D:\Applications\msys64
D:\Applications\VSCode
rustup-init.exe installs the .cargo folder in the default location:
C:\Users\user\.cargo
( The settings files for VS Code are created and edited inside the Visual Studio Code editor, you don't need to open the files form windows explorer:
C:\Users\user\AppData\Roaming\Code\User\settings.json
C:\Users\user\AppData\Roaming\Code\User\keybindings.json
)
Part 1 - Installation Steps with Details:
I will use the code needed to run the installation programs inside "quotes" - remove the quotes when you run the commands.
For example: "pacman -Syu" - remove the quotes and just run pacman -Syu .
Change the paths in the tutorial, for your installations.
The programs needed are VS Code, MSYS2 (MSYS2 has files/tools from MinGW), the rust-analyzer extension for VS Code for code completion and the CodeLLDB extension (with the author Vadim Chugunov) for debugging.
Make sure to have the Windows Firewall setup to allow connections out for MSYS2, VS Code, the Rust installer - rustup-init.exe (maybe rustup later on - during this tutorial you don't need it) and D:\Applications\msys64\usr\bin\pacman.exe. This will allow the programs to download necessary files for components or plugins.
a)
Download Visual Studio Code portable version for Windows from filehorse.com and extract the files (or install it any way you like).
Open VS Code and disable the 2 telemetry options from the settings:
Click on Edit > Preferences > Settings, type telemetry in the input box and disble the 2 telemetry options (or press the key combo: Ctrl + Shift + P, type open settings and press Enter to open the 'settings.json' file)
this will put inside the "settings.json" file this code, between the main open and close curly braces:
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false
Good fonts to use inside VS Code are: Fira Code, Consolas, DejaVu Sans Mono, Droid Sans Mono Slashed, Inconsolata-g, Bitstream Vera Sans Mono , Lucida Console, maybe Menlo Regular (was used in MacOS), Meslo LG DZ.
Fonts like 'Fira Code' have font ligatures present inside the font. 'Fire Code' doesn't have traditional font ligatures for example ft is not connected, but has ligatures specific for coding, for example the look of these character combinations are changed and usually look better with ligatures enabled: fl , -> , <= , >= . See the image below the post for an image with font ligatures on vs off.
To enable font ligatures, open the Preferences for Visual Studio Code, search for ligatures in the search box, and enable the setting: 'Editor:Font Ligatures' .
You can change the default user data directory from:
"C:\Users\user\AppData\Roaming\Code" to your desired location, e.g. :
"D:\Applications\VSCode\UserData\Code"
by creating a shortcut for VSCode with the parameter --user-data-dir, that you'll use to launch VS Code.
To do this create a shortcut for VSCode with the setting for Target: D:\Applications\VSCode\Code.exe --user-data-dir "D:\Applications\VSCode\UserData\Code"
b) This step is Optional, follow it only if you want to use gcc or clang from MSYS2:
You can run Rust programs and compile them in Visual Studio Code without installing MSYS2. Install MSYS2 only if you want to use its gcc or clang compiler.
Optional - Install MSYS2 - this is about 1.61 GB.
Download MSYS2 and follow the installation instructions - I will mention the most important steps:
Install MSYS2 and keep the checkbox selected: "run MSYS2 64bit" at the end of the installation.
Run pacman -Syu in the console that appears after the installation. This is the MSYS2 shell.
!!! For the next step, be careful an choose the right shortcut Don't choose the MinGW one, so
run the shortcut named "MSYS2 MSYS" from Start menu (it is "D:\Applications\msys64\msys2_shell.cmd -msys"). This is the MSYS2 shell.
Inside the shell run pacman -Su .
The next step is to download the programs needed to build the programs written in Rust, for the Windows Platform:
From the start menu run "MSYS2 MinGW 64-bit" (it is "D:\Applications\msys64\msys2_shell.cmd -mingw64"). This is for MinGW and it has a different parameter from the shortcut used above.
Run pacman -S mingw-w64-x86_64-toolchain.
Press Enter, Enter and type 'y' during the installation process.
( The guide on the msys2.org page said to also install some packages using the option '--needed base-devel' by runnig the command "pacman -S --needed base-devel mingw-w64-x86_64-toolchain", but I don't think they are needed here.
If you want, you can install single tools and their dependencies from the list of tools installed by the command "--needed base-devel", by selecting their corresponding number during the installation, for example you can just install make and not the rest of the tools present in the "--needed base-devel" package.
The simple rust "hello world" program that I wrote in rust using VS Code and the rustc and cargo tools/programs ran well without installing the "--needed base-devel" files.
The --needed base-devel files are not needed to run and debug simple Rust programs,but you can install them if you want.
To use the gcc or clang linker and compiler from MSYS2 you have to create the C:\Users\user\.cargo\config file:
To make the cargo use clang++.exe , add these lines to the C:\Users\user\.cargo\config file:
[target.x86_64-pc-windows-gnu]
linker = "D:\\Applications\\msys64\\mingw64\\bin\\clang++.exe"
ar = "D:\\Applications\\msys64\\mingw64\\bin\\llvm-ar.exe"
If you want to change the linker to gcc, create the C:\Users\user\.cargo\config file that contains the lines:
[target.x86_64-pc-windows-gnu]
linker = "D:\\Applications\\msys64\\mingw64\\bin\\gcc.exe"
ar = "D:\\Applications\\msys64\\mingw64\\bin\\ar.exe"
(clang++.exe is the same file as clang.exe from the same directory.)
I got everything installed and running well - I could run the programs and debug them using gcc or clang.
)
c)
Install Rust for Windows
Download the installer: rustup-init.exe from rust-lang.org
The browser should recognize that you ar using Windows and give you the link to "DOWNLOAD RUSTUP-INIT.EXE (64-BIT)" , that is:
[...]static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
Run rustup-init.exe . It is better to launch a console with cmd.exe and launch rustup-init.exe from there.
choose "Continue? (y/N)" by typing y and hitting the Enter key.
choose "2) Customize installation" using the keyboard.
paste or type the option: x86_64-pc-windows-gnu .
Press enter for the rest of the options.
Finally type "1" as input in the console, then press Enter, to choose the option "1 to proceed" with the Current installation Options.
There might be problems if you had rustup already installed.
If you already have rustup installed follow the indications on the guide at Source 1 Link at the bottom of the page with the step-by-step-instruction-to-install-rust-and-cargo-for-mingw-with-msys2 :
This is a quote from that post:
"Note: If rustup is already installed, then rerunning rustup-init won't actually install the requested toolchain. Instead, run rustup toolchain install stable-x86_64-pc-windows-gnu if you already have the MSVC-based toolchain. Then run rustup default stable-x86_64-pc-windows-gnu to set the GNU-based toolchain as the default."
d) Add the folders to the PATH
Add the folders that have useful programs from rust and msys2 to the Windows system PATH variable:
Adding the folders to the system PATH variable will allow VS Conde console, which defaults to PowerShell (you can change it to Command Prompt or other shell if you want), to recognize the commands:
cargo, rustc, etc.
This will make running and debugging rust programs in VS Code with the rust-analyzer and CodeLLDB extensions easy because you don't have to configure anything else.
To add the folders to the PATH use the System Properties window:
Right click on "My Computer" and select "properties"
Click on Advanced System Settings
In the Advanced tab, click on "Environment Variables"
under 'User variables for user' click on the PATH Variable and add the locations of your cargo\bin folder and mingw64\bin folder, (plus \msys64):
;C:\Users\user\.cargo\bin;D:\Applications\msys64;D:\Applications\msys64\mingw64\bin
This will add the folders "C:\Users\user\.cargo\bin", "D:\Applications\msys64", "D:\Applications\msys64\mingw64\bin" to the PATH variable. (stackoverflow is bad at formatting \. backslash followed by a dot - you have to use another backslash as an escape character)
To test that the PATH variable is updated open a NEW Command Prompt or PowerShell window, and in this window run cargo --version or gcc --version (if you installed MSYS2 and gcc.exe) or rustc --version inside a 'Command Prompt' window and inside a PowerShell Window.
If the commands are not found, restart your computer so that Windows can update the PATH variable. For me the change worked without having to restart, I just had to open a new shell window.
e) Install the Rust extensions for VS Code
rust-analyzer and CodeLLDB require Python to be installed.
Install Python 3.6.3, for example, and select to add it to the path during installation.
From the VS Code Marketplace install the needed extensions.
Open VS Code, click on the Extensions button on the right toolbar, and search and install the extensions:
rust-analyzer - (publisher: matklad) ;
CodeLLDB (publisher: Vadim Chugunov);
( I didn't have to do this next step so you shouldn't either - if rust-analyzer doesn't load/run properly, you may need to install the rust source code.
Using the 'Command Prompt' run: rustup component add rust-src to install the rust Source Code.
I didn't have to install it, the rust-analyzer worked well [ by the way, the VS Code could connect to the internet during testing].
)
[While running Visual Studio Code you may get a message telling you to install .Net Framework 4.5.2. Download and install the Offline version if the online version fails to install. (On Windows 7 without some updates, you may have to download and install the certificate: MicRooCerAut2011_2011_03_22.crt, and install some windows updates: Windows6.1-KB2533623-x64, windows6.1-kb2813430-x64, and maybe Windows6.1-KB4019990-x64 ) ]
Part 2 - Running and Debugging Rust programs with VS Code
Running and compiling in Rust with VS Code and Msys2:
After adding the folders to the PATH and installing the extensions, you basically need to run:
cargo init
cargo run - to run the program.
press the F5 key, or click the debug button to debug the code.
First you need to:
Create a folder for your Rust app.
Open the folder inside VS Code.
Press Ctrl+{`} to open the terminal panel.
The default shell will be 'PowerShell'.
You can select the 'Command prompt' shell from the Terminal pane using the down arrow on the left, that is near the plus button and x button.
Or you can set VS Code to use 'Command Prompt' as the default shell by adding the lines to the 'settings.json' file - the main Visual Studio Settings file.
"terminal.integrated.defaultProfile.windows": "Command Prompt",
You can use PowerShell or 'Command Prompt', they both work fine.
Run cargo init inside the terminal to create the project files.
Edit the main.rs file if you want. It is located inside 'app folder'\src\main.rs
Run cargo run inside the terminal
If you have rust-analyzer installed, the extension puts 2 buttons as popups on top of the main() function.
They are named 'Run' and 'Debug' and if clicked they do what their names say.
To debug, put a breakpoint inside your main.rs file and hit F5 (the menu entry Run > Start Debugging) or click the Debug button on top of the main() function placed there by the rust-analyzer extension if you have it installed.
If you click the debug button you don't have to create a launch.json config file.
If you hit the F5 key or click the menu entry Run > Start Debugging, a launch.json file will be added to your folder.
Just click Yes in the message box to auto generate the launch.json file.
Then hit the F5 key again to start debugging.
Now you can step through your code during the debugging process.
Link 1: https://marketplace.visualstudio.com/items?itemName=rust-lang.rust
Link to Font Ligatures example - Image for the font 'Fira Code':
Image Link: Coding font with font ligatures
This question is old, but in the mean time a lot has changed.
The easiest way to install on Windows is to go to the Rust installation page and download and run rustup-init.exe. It installs rustc, rustup and similar tools. It just works™.
I haven't seen this problem when browsing the web, so here it is:
I used the .msi file (vs. right click -> Install, option on the setup project) to install "Version 1.0.7" product onto my computer.
I then changed my "Version" to 1.0.8 , and all projects Assembly Version/AssemblyFileVersion properties to 1.0.8.0. I deleted the old Primary Output, and added a new one where I made sure the version was correct under the KeyOutput expanded list. I did this because it didn't update after I changed all Assembly Versions to 1.0.8.0, and it stayed at 1.0.7.0 (the previous version).
I built my Setup project and went to my folder that contained the new 1.0.8 .msi file. I double-clicked and got the "Application already exists, remove existing in Add/Remove Programs" (or similar) dialog, and it stopped installation.
So I checked my: ProductCode-they were the same between new/old versions, UpgradeCode-also the same, RemovePreviousVersion property-set to True between both versions. This is what I checked because I usually found as a solution in all my other searches, but it wasn't working.
So I unistalled the 1.0.7 version, installed 1.0.8 and all worked fine. Still didn't fix my problem where I shouldn't get the unistall first prompt. Note: I've been installing on "Everyone".
I unistalled 1.0.8 again (at this point, no versions exist/are installed), and tried this:
1. Install 1.0.7 from .msi file or Install 1.0.7 by right clicking it's setup project and using the "Install" option.
2. Right clicked 1.0.8 setup project and used the Install option from there.
3. No errors/dialogs pop up, the old version seems to have been unistalled first, then I continued with installation and new version was on the computer. This is what I want!
As you can see here, I need to beable to use 1.0.7 .msi file to install, then when I need to patch/fix/update, I need to be able to 1.0.8 .msi to not display a "Already exists" prompt and just overwrite/merge, but this isn't happening unless I use VS2010 Right Click>Install on the Setup project.
Any help is appreciated.
edit added bolding
Change the ProductCode between the two versions. Read more on major upgrades
Installing a minor upgrade (which is the case when you change the ProductVersion but not ProductCode) requires specifying REINSTALL if and only if a previous version is present on the machine. There are ways to do this for explorer-launched scenarios by specifying it in the Property table and clearing it with a custom action, but it's much more common to handle it with a launcher or by using a major upgrade.