Using nuget packages in a script file - f#

I installed FSharp.Quotations.Evaluator in my library. I added a reference to the install in the project. Then, I added a reference to FSharp.Quotations.Evaluator in the module,
open FSharp.Quotations.Evaluator
The library compiles without error.
I then attempted to load the module in the script file included in the same library, but the module fails to load and complains that there is no definition for "Evaluator" as used in the module.
Also, when I run the code in FS interactive, the compiler does not recognize "Evaluator". There must be a load command I need to run, but load "FSharp.Quotations.Evaluator" does not work.
I assume I have to somehow load the nuget package in the script file. However, I have no idea how to do that. How do I get the script file to recognize FSharp.Quotations.Evaluator?

For F# interactive mode you can use the following snippet:
#I #".\my_lib_path"
#r "MyLib.dll"
open MyLib
where #I - lib path, #r - adding a reference to a lib,

Related

Cannot install design-time package: missing #Classes#TStream#Write$qqrpxvi from vcl50.bpl

Short Version
My design-time package cannot install
because my run-time package library bpl
requires the export #Classes#TStream#Write$qqrpxvi from vcl50.bpl
that does not exist
Long Version
When trying to install a design-time package, Delphi 5 gets a loader error:
The procedure entry point #Classes#TStream#Write$qqrpxvi could not be located in the dynamic link library c:\program files (x86)\borland\delphi5\Projects\Bpl\AvatarDateTimePickerD5.bpl.
Once you clear the error dialog shown by the loader, Delphi shows it's own version of the same error:
So i check the file
I use Depends to check the exports in the dll:
c:\program files (x86)\borland\delphi5\Projects\Bpl\AvatarDateTimePickerD5.bpl
And sure enough, there is no export named:
#Classes#TStream#Write#qqrpxvi
In fact, there's no export that starts with #Classes at all:
Make sure it's loading the right one
So i use Process Monitor to make sure it's reading the correct file. And it is:
So check the runtime build
You'll remember there's usually two packages:
ContosoGrobberD5: run-time
ContosoGrobberD5D: design-time
In this case it's the design-time package that's loading it's dependancy on the run-time package:
AvatarDateTimePickerD5.bpl
So i'll load up that earlier-generated run-time package to watch it build, and it builds without incident:
and it writes to the expected location. And it does all it's file write operations:
It's successfully, correctly, and quite intentionally, not generating a DLL export named:
#Classes#TStream#Write#qqrpxvi
But the corresponding design-time package claims it needs such an import.
Depends says not quite
If i run Depends on the design-time bpl, i see the failed chain:
AvatarDateTimePickerD5D.bpl (design-time dll)
AvatarDateTimePickerD5.bpl (run-time dll)
vcl50.bpl
Missing Export: #Classes#TStream#Read$qqrpvi
Missing Export: #Classes#TStream#Write$qqrpxvi
So apparently it's vcl50.bpl that's missing the export
Check vcl50.bpl for export #Classes#TStream#Write
So i monitor the operation to Install the design-time package, and after some hunting around, it finds it in the path:
In the "System32" folder:
C:\Windows\SysWOW64\vcl50.bpl
So i check the exports of vcl50.bpl. And it's right, there is no export #Classes#TStream#Write$______:
And it looks like the file:
Created: 1/24/2000 4:01 am
SHA-1: 29398F5CD966335EB38377962B12780DDEA9DBDC
So what's going on?

Dart pub get command is not working properly when i try to pull my dependencies

I have my project in github. I already created it like a library (Dart). Now I am trying to use my library in one of my project.
After i add all the necessary comments to get it from my git source, pub get is giving the following error,
Warning: Package <library_name> does not have a "lib" directory so you will not be able to import any libraries from it.
Got dependencies!
Any clue???
Thanks,
Tham
When importing libraries, the files you import come from the lib folder.
Eg:
import 'package:danny/danny.dart';
will import the file lib/danny.dart from the danny package.
If the package doesn't have a lib folder; this means you can't possibly import it. If you're importing directly from a Git repo; you need to ensure the lib folder is a top-level folder.

Unable to compile / run run book-examples in eclipse

I am trying to run sample code "MyHierarchicalUI" from section 4.2 from "book of vaadin" and this code refers to TreeExample and TableExample classes which can be found at
http://dev.vaadin.com/svn/doc/book-examples/
I downloaded the book example code from mentioned svn link and imported it as existing eclipse project,however when I try to compile / run this project in eclipse I get the following error.
Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'book-examples'.
The file does not exist for the external tool named Copy sources.
The file does not exist for the external tool named Copy sources.
book-examples project is not valid vaadin project so can not be imported directly, we can not build it directly as vaadin project due to missing artifacts like ivy.xml and ivysettings.xml.
To use any code from book-examples project you will have to bring the code to your project manually (copy/paste), however a support ticker to make book-example project import-able / build-able and run-able has been created and can be tracked using this link Ticket # 13078.

Failed to load package in Dart

When I try to import a package with the syntax import 'package:markdown/markdown.dart';, I get no error in Dart Editor but when I run the dart application, the debugger shows me the message:
An error occurred loading file: package:markdown/markdown.dart
Failed to load resource
chrome-extension://gfjabgeipkcfopofkhjimepepnomcidk/dart/packages/markdown/markdown.dart
But when I write the whole path (import "../../packages/markdown/markdown.dart";) everything works fine. I cannot understand why the syntax package: doesn't work in my code though it works in Dart Editor's own examples.
You can see the Chrome app architecture below (I'm loading a package from translator.dart):
You should have the package added as a dependency in pubspec.yaml (which I assume you do).
Also try running following:
delete packages folder
delete pubspec.lock
run pub get to fetch the
dependencies again.
I think in your md_to_html folder you need a link to the 'packages' directory for the shortform to work. I seem to remember this happening when the workspace is built but I'm not sure now which command triggers it, have a look at the current pub docs.

LINK : fatal error LNK1104: cannot open file '.obj'

I have a big problem with building a simple program. I am using many tutorials, instructions and I can't solve it. I edit the variable's path as follows:
C/C++->General->Additionals Include
Directories->MyOpenCv\build\include Linker->General->Additionals
Library Directories->MyOpenCv\build\x86\vc11\lib
Linker->Input->Additional Dependencies->*I added .libs
The same in Debug and Release.Windows 8 x64, VS2012 x32, OpenCV 2.4.5
Go to C/C++ -> Output Files and check Object File Name. Chances are it contains a bogus macro reference.
For C/C++, I have found for Visual Studio the location listed below is NOT the correct way to reference library files during linking the compiler-linking stage (at least in Community Version 2017). I had a project folder called 'lib' which contained all my .lib files. Originally I had specified a value like
Linker --> General --> Additional Library Directories: $(ProjectDir)lib;%(AdditionalDependencies)
I was getting error messages like:
error LNK1104: cannot open file 'lib.obj'
I figured out this was the correct way to specify the library directories:
VC++ Directories --> Library Directories
In my case, my value was:
VC++ Directories --> Library Directories: $(ProjectDir)lib;$(LibraryPath)

Resources