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.


Topics - usernameialwaysforgot

Pages: [1]
1
General / Problem on using SFML.NET binding
« on: September 01, 2016, 04:57:58 pm »
I am having problem in using SFML.NET 2.2 64bit in Visual studio 2015.

I have added all the library in the "lib" folder(sfmlnet-audio-2.dll,sfmlnet-graphics-2.dll,sfmlnet-system-2.dll,sfmlnet-window-2.dll) (as references) and add the lib in "extlibs" by copying it into the visual studio and setting them to always copy to "output directory"

It is showing me the error on "sfmlnet-window-2.dll" saying that it is missing the required component.

Therefore, I try to add the source code while removing the references in the "lib" folder to understand what the error is really about. I doesn't remove the lib in "extlibs".

The stack trace is

System.BadImageFormatException was unhandled
  HResult=-2147024885
  Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
  Source=SFMLTest
  StackTrace:
       at SFML.Graphics.RenderWindow.sfRenderWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ContextSettings& Params)
       at SFML.Graphics.RenderWindow..ctor(VideoMode mode, String title, Styles style, ContextSettings settings) in C:\Users\Steven\Documents\Visual Studio 2015\Projects\SFMLTest\SFMLTest\SFML.Net-2.2\Graphics\RenderWindow.cs:line 66
       at SFML.Graphics.RenderWindow..ctor(VideoMode mode, String title) in C:\Users\Steven\Documents\Visual Studio 2015\Projects\SFMLTest\SFMLTest\SFML.Net-2.2\Graphics\RenderWindow.cs:line 30
       at MotionNetPlayer.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\Steven\Documents\Visual Studio 2015\Projects\SFMLTest\SFMLTest\Form1.cs:line 24
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException:



The source code my WPF program is

using SFML.Graphics;
using SFML.Window;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SFMLTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            RenderWindow window = new RenderWindow(new VideoMode(640, 480), "MotionNET Playback Example");
        }
    }
}



Pages: [1]