Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kameko

Pages: [1]
1
DotNet / Re: [SOLVED] How to use SFML.NET on linux/mono?
« on: November 03, 2015, 12:14:48 am »
Sorry for bumping, but I didn't feel this deserved it's own thread.

Is there a good way to do this when you have your dlls in multiple directories? For instance, a "win" directory for the Windows SFML dlls, and a "linux" directory, etc. I tried making *.dll.config files by specifying "target="win\csfml-system-2.dll"" but that didn't seem to work.

Also, besides making *.dll.configs for all of the dlls, is there a way to just probe for a directory on a specific OS? Right now my probing is just set to "<probing privatePath="lib;lib\win" />" and all the DLLs, both the sfmlnet and the csfml are in the same directory, and of course that won't run outside of Windows.

Sorry for asking, but I've been trying tons of configurations and looking up stuff for hours and I can't figure this out.

2
DotNet / Re: DLL loading error in F#
« on: November 02, 2015, 08:51:39 am »
That solved it! Thank you!

I had considered the platform target, but the default is "anycpu" so I had figured it was okay. I looked at the compiler options and saw the lengthy and very specific "anycpu32bitpreferred" and tried that, and that works!

3
DotNet / Re: DLL loading error in F#
« on: November 02, 2015, 07:15:41 am »
Yeah, I've done that like I said in the OP: [img]

Those are the binaries from the "extlibs" folder. I've already tested the example Window.exe program and it works fine, it's only the F# code that I compile that doesn't work. I've also tested using fsc versions 12 and 14 as well.

Additionally, I just tested this with SFML.NET 2.1, and I got the same exact error. I'm not really sure what this means.

4
DotNet / [SOLVED] DLL loading error in F#
« on: November 02, 2015, 06:26:37 am »
Hello. I'm having some issues trying out SFML.NET. I'm not exactly sure how I'm supposed to compile an F# example manually? I don't use IDEs so I just make batch files, and, I can't seem to get this to work.

I'm getting a runtime exception that says "sfmlnet-window-2 or one of it's dependencies can't be loaded. An attempt was made to load an incorrect format". The example compiles, and it doesn't complain about any other assembly. Just that one.

I don't currently have a config file for my executable or anything, just kind of rawdogging it for now until I actually know how to use SFML from F#. So I put the four sfmlnet-*-2.dll files in the same directory as my executable, as well as all the other binaries (csfml-system-2.dll, etc.) in the same directory as well. I've already tried the precompiled "Window" example that comes with SFML.NET in the same directory, and it runs. So I don't know what's going wrong here.

This is the command I'm using:
fsc.exe test1.fs -I E:\PROJ\F_Sharp\SFML.Net-2.2\test -r sfmlnet-system-2.dll -r sfmlnet-audio-2.dll -r sfmlnet-graphics-2.dll -r sfmlnet-window-2.dll

And my code is:
namespace FSWindow

open System
open SFML
open SFML.Graphics
open SFML.Window
open SFML.System


module Window =
    [<EntryPoint>]
    let main argv =
       
        use mainWindow = new RenderWindow(VideoMode(600u, 600u), "EmptySpace")
        mainWindow.SetFramerateLimit(40u);
        mainWindow.Closed.AddHandler(fun sender args -> (sender :?> RenderWindow).Close())
       
        let rec mainLoop() =
            mainWindow.DispatchEvents()
            mainWindow.Display()
       
            match mainWindow.IsOpen with
            | true ->  mainLoop() |> ignore
            | false ->  ()
       
        mainLoop()
       
        0

 

Pages: [1]