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

Author Topic: Odd things in Visual Studio 2013  (Read 2071 times)

0 Members and 2 Guests are viewing this topic.

LPeter1997

  • Newbie
  • *
  • Posts: 3
    • View Profile
Odd things in Visual Studio 2013
« on: June 04, 2014, 02:09:47 pm »
Hi!
I've successfully installed SFML with VS2013 (with a template). It works, the provided tutorial code works perfectly. But... in the editor I get a lot of red underlines, like it's a mistake. Another thing is I get 12 errors in the error list if I run the  program. For example the first one: Cannot open source file "SFML/Graphics.hpp".
Lastly, in the Output panel I get a lot of these:
'SFML2 Application1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'SFML2 Application1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.

I don't think it's normal. Could anyone help fixing these?

Oh, before I forget, I used this guide:
Could I get some help installing this?
In order to make things easier, I took a shot at doing a bundle (VS2013 binaries + template) that is simpler to install and use. Here are the steps:

BINARIES
1) Download the binaries from here.
2) Unzip anywhere you want. As a suggestion, you could use C:\SFML-2.1.
3) Create a system environment variable called SFML2_HOME pointing to the folder where you unzipped the file.

TEMPLATE
1) Download the binaries from here.
2) Copy the attached ZIP file to Documents\Visual Studio 2013\Templates\ProjectTemplates under your home folder.
3) Open Visual Studio and click FILE, New Project... The "SFML2 Application" Visual C++ template is now available. Create your project.
4) The project is all set up, and the small bundled sample program (the one from the tutorial) is ready to compile.

Details:
The binaries and the template were made with Visual Studio 2013 Express Edition Update 1 running on Windows 8.1 Pro x64. Since VS2013EE only ships with a x86 SDK, I couldn't try and make the template x64-compatible. I also didn't bother building static libraries.
Also, it doesn't matter if you have the SFML2 DLLs in your PATH environment variable nor in the output folder. The template includes a Post-Build Event that copies the DLLs from $SFML2_HOME\bin to the output folder in case they're not there already.
« Last Edit: June 04, 2014, 02:11:55 pm by LPeter1997 »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Odd things in Visual Studio 2013
« Reply #1 on: June 04, 2014, 03:35:36 pm »
This is why those templates are not recommended. Programmers should learn to setup their own tools instead of relying on premade templates.

What you should do is compile SFML yourself as there has been many important fixes for SFML since 2.1 was released. Secondly follow the official tutorial to setup your project.

Quote
Lastly, in the Output panel I get a lot of these:
'SFML2 Application1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'SFML2 Application1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.

You can very safely ignore these warnings.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Odd things in Visual Studio 2013
« Reply #2 on: June 04, 2014, 04:07:55 pm »
Quote
What you should do is compile SFML yourself as there has been many important fixes for SFML since 2.1 was released.
... and as there's no precompiled version of SFML for Visual Studio 2013.
Laurent Gomila - SFML developer

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Odd things in Visual Studio 2013
« Reply #3 on: June 04, 2014, 04:14:52 pm »
... and as there's no precompiled version of SFML for Visual Studio 2013.

Unless you pick the binaries from those template threads  :P
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

LPeter1997

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Odd things in Visual Studio 2013
« Reply #4 on: June 04, 2014, 05:14:23 pm »
Really? There is no just a simple template to set up the project? Always have to do the same again if I want to create a new project? That's disappointing...  :-\

There's no offical download for VS 2013... now what?
« Last Edit: June 04, 2014, 05:31:02 pm by LPeter1997 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Odd things in Visual Studio 2013
« Reply #5 on: June 04, 2014, 06:04:22 pm »
Templates are for beginners or fast prototyping. Once you know how to setup a library -- 30 seconds max -- you just do it. It's not a big deal compared to the weeks / months / years you'll then spend on the project ;)
Laurent Gomila - SFML developer

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Odd things in Visual Studio 2013
« Reply #6 on: June 04, 2014, 06:37:27 pm »
There's no offical download for VS 2013... now what?

Build it yourself, it takes all of maybe 15 minutes if you follow the tutorial. Or if you want, you could get a nightly build here.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

LPeter1997

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Odd things in Visual Studio 2013
« Reply #7 on: June 04, 2014, 08:46:46 pm »
You guys are right. I'm just too picky sometimes  ;D