Nevermind. This appears to be a problem with service.ml. While I get tons of syntax errors in the UI, things compile fine.

By on 4/4/2006 12:27 PM ()

Thanks - we'll look into that scenario. For the moment if you use .fsi files I would recommend you set up an F# project and add the -r and -I flags into the project properties (the old fashioned way of doing things :-) )

Have fun!

Don

By on 4/5/2006 7:20 PM ()

When ever you use the #i or #r directives, the libraries are loaded.

My guess is that this is a namespace scoping issue. Like C# using, the namespace must be qualified. Use the F# open command to use those types. Consider the following example, taken from 3D Simulation and Visualization with F# and DirectX by dsyme and jmarg.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Sample.DirectX.Basics
#I @"C:\WINDOWS\Microsoft.NET\Managed DirectX\v9.02.2904" ;; 
#r @"Microsoft.DirectX.dll";;
#r @"Microsoft.DirectX.Direct3D.dll" ;;
#r @"Microsoft.DirectX.Direct3Dx.dll" ;;

open System
open Drawing
open Threading  
open Windows.Forms
open Microsoft.DirectX
open Microsoft.DirectX.Direct3D
open Idioms
open Compatibility  
open List

The "open Microsoft.DirectX.Direct3D" would be just like a using statement in C#. Also, as a side note, that #i statement above would need to be modified for machines that run Windows 2000 as:

1
2
module Sample.DirectX.Basics
#I @"C:\WINNT\Microsoft.NET\DirectX for Managed Code\1.0.2902.0" ;;

Let me know if that was helpful. If not, could you provide a quick code example of the failure?

By on 4/3/2006 4:27 PM ()

Chris-

Just put the above in any FSI file and you'll see what I mean. So in MyDX.fsi:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Sample.DirectX.Basics
#I @"C:\WINDOWS\Microsoft.NET\Managed DirectX\v9.02.2904" ;; 
#r @"Microsoft.DirectX.dll";;
#r @"Microsoft.DirectX.Direct3D.dll" ;;
#r @"Microsoft.DirectX.Direct3Dx.dll" ;;

open System
open Drawing
open Threading  
open Windows.Forms
open Microsoft.DirectX
open Microsoft.DirectX.Direct3D
open Idioms
open Compatibility  
open List

type MyEffect = 
   class
      inherits BaseEffect  
   end

This causes a syntax error on the #I and doesn't resolve any of the namespaces.

Do you see this behavior?

-Chad

By on 4/3/2006 4:55 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper