F# Cannot find DLL - f#

I am currently learning F# and working through the samples on tryfsharp.org. I am using the Mono F# on a Mac.The script begins as follows:
#r "MathNet.Numerics.dll"
open MathNet.Numerics
open System.Numerics
When starting the script I get the following error message:
/Users/benjamin/Desktop/Kalman/kalman.fsx(1,1): error FS0078: Unable to find the file '
MathNet.Numerics.dll' in any of
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/mono/4.5
/Users/benjamin/Desktop/Kalman
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/m
I do not know, where to find that DLL or how to install it.

You should just be able to use nuget to get that library.
http://nuget.org/packages/MathNet.Numerics
See here to install nuget:
http://docs.nuget.org/docs/start-here/nuget-faq

Related

F# Can't install nugets because doesn't find default nuget source

I'm trying to install some nuget packages using vs code in F# interactive (fsx script). It has worked before because I have successfully installed FSharp.Data, but it seems to not work (anymore).
Following error
No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org (vs code)
Code
open System.IO
open System
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
#r "nuget:System.Data.Linq.dll"
#r "nuget:FSharp.Data.SqlClient.dll"
A related issue says to list the nuget sources through commandline:
Visual Studio 2019 F# NU1101 Unable to find package FSharp.core
When I do this I get a correct response:
So what is going on here?
When You use nuget prefix in the #r directive, you don't have to add ".dll" extension at the end of package name. It is required only when you are referencing local dlls.
https://learn.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-interactive/

Installing F# in visual studio code

I am trying to install F# with Visual studio code in Windows 10. I have installed dotnet framework first.
Then I have installed lonide-fsharp in visual studio code.
Then I have included the path of fsi in visual studio by clicking the Preferences->extensions->selected F# and Included the path.
Now in the visual studio code I typed ctrl+shift+p then I have typed fsi start, I am getting an error.
I tried with '/' and '\'. in the path. Every time I change I uninstalled the lonide and installed it again.
When I do fsi start ,F# should get started or what are all the other ways that I can make F# to start.
What is happening here is 'C:/Program Files/dotnet/sdk/3.0.100/FSharp/fsi the path does not exist'.
First, make sure you have the latest version of VS Code and Ionide.
Then, if you install the .NET Core 3.0 SDK from https://dotnet.microsoft.com/download, then it should install fsi.exe to that path. And then F# Interactive should just work with Ionide without any other configuration needed.

F# Script "Error FS0078: Unable to find the file"

When I try to run a F# script with FSI (4.1) I get this error on the Windows command shell:
stdin<0,1>: error FS0078: Unable to find the file 'open System' in any of C:\..\Desktop
I've tried referencing the standard libraries with #I and #r, but have not found a way to make it run.
The script file uses:
open System
open System.Windows.Forms
open System.Drawing
The script runs fine in Visual Studio Code when the code is sent to F# Interactive.
The locations for F# and .NET files:
C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\
C:\Windows\Microsoft.NET\Framework\v4.0.30319\

Delphi 2007 Import a Type Library

In Delphi 2007 i'm trying to Import a type library and i get an error message:
error occured during loading library type/DLL.
I want to import libraries: pkcs11.dll, libp11.dll
The libraries have been prepared in VisualStudio 2017.
I tried to use command-line tool tlibimp, but without effects.
c:\Program Files (x86)\CodeGear\RAD Studio\5.0\Projects\TEST>tlibimp -p pkcs11.dll
Borland TLIBIMP Version 11.0
Copyright (c) 1997-2005 Borland Software Corporation
Error loading type library pkcs11.dll.
Maybe someone knows how to solve this problem?
I tried to do regsvr32 pkcs11.dll but i get the message: DllRegisterServer entry point was not found.
I also tried to find pkcs11.tlb in VS project but it does not exist.
I installed the Dependency Walker "depends.exe" and saw that some libraries are missing:
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
DCOMP.DLL
IESHIMS.DLL
I have installed Visual Studio 2017 and why are not there ? Where to get them ?
As Eugene explained, PKCS#11 API doesn't export any type libraries and i need to import function. I found 2 tools:
1. 23991_c_to_pascal_converter_1.0 from Embarcadero
2. GUIHeadConv from Dr. Bob

How to install OpenCV 3.1 with nonfree module?

I'm trying to write a program that uses SURF algorithm and I know that the nonfree module must be installed separately. I've downloaded and installed the latest version of CMake(3.5.2) and I'm following the instructions from:
https://github.com/itseez/opencv_contrib/ . I'm using the GUI and I run Visual Studio 2015 on a 64 bit Windows 10.
Since I know that for SURF you must include xfeatures2d when it asked me the source of the code I only specified the xfeatures2d folder. When I first pressed the configure button I had some errors(I've attached an image of them). I managed to get rid of one of the errors, the one that said to write a line of code at the top of the file
cmake_minimum_required(VERSION 3.5), but I still have one error:
CMake Error at CMakeLists.txt:4 (ocv_define_module):
Unknown CMake command "ocv_define_module".
I'm also attaching a picture of the CMakeLists.txt. Please help me find the problem.
Also, if you could help my install all modules at once, I would be grateful. Or do I have to set as input every folder in the modules folder?
GUI error and CMakeLists.txt
Try using Visual Studio 12 2013 for compilation, this has worked for me, but not the other (newer) versions of Visual Studio.

Resources