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

Author Topic: Errors On Compilation  (Read 16833 times)

0 Members and 1 Guest are viewing this topic.

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Errors On Compilation
« on: June 05, 2012, 10:04:51 pm »
I recently changed computers. I managed to reinstall SFML, but I'm getting an error on compilation. I'm relatively new, so I'm not quite sure as to the cause.

The program was simply a test that everything was set up right, it does nothing but open a window. I'm thinking the problem likely lies not in the code but in the project setup, but I'll include the code regardless.

http://pastebin.com/q8QzPQan

Using Visual Studio 2011 Beta.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Errors On Compilation
« Reply #1 on: June 05, 2012, 10:56:04 pm »
You must link to the sfml-window library.
Laurent Gomila - SFML developer

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #2 on: June 05, 2012, 11:20:08 pm »
SFML-window-d.lib is in Linker->Input->Additional Dependencies. Is that what you're reffering to?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Errors On Compilation
« Reply #3 on: June 06, 2012, 08:18:53 am »
Yes, that's what I meant.

Ok, so make sure that SFML_STATIC is not defined in your preprocessor options.
Laurent Gomila - SFML developer

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #4 on: June 06, 2012, 06:35:15 pm »
Oh? I thought it was supposed to be?

Regardless, removing it results in 10 unresolved conflicts, as opposed to 6.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Errors On Compilation
« Reply #5 on: June 06, 2012, 06:49:43 pm »
Quote
Oh? I thought it was supposed to be?
It is required if you link to static libraries (-s suffix), which you apparently don't ("SFML-window-d.lib").

Quote
removing it results in 10 unresolved conflicts
Which ones?
Laurent Gomila - SFML developer

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #6 on: June 06, 2012, 11:40:10 pm »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Errors On Compilation
« Reply #7 on: June 07, 2012, 07:39:14 am »
Can you upload your project file?
Laurent Gomila - SFML developer

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #8 on: June 08, 2012, 05:14:45 am »

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #9 on: June 11, 2012, 12:28:58 am »
Could I please get some help here?

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #10 on: June 13, 2012, 04:02:33 am »
I hate to be  nag, but I could really use some help here.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Errors On Compilation
« Reply #11 on: June 13, 2012, 03:48:13 pm »
Your project file is so messed up I don't even want to try to explain what you have to put where...

Create a completly new project and follow STRICTLY the tutorial. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #12 on: June 13, 2012, 10:19:46 pm »
1>sfml-graphics-d.lib(sfml-graphics-d-2.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

That's the new error. Obviously some type of bit conflict, but I'm not sure why. I don't remember defining anything as specifically being 64 or 32 bit.

I am running a 64 Bit Windows 7 and using 64 bit VS.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Errors On Compilation
« Reply #13 on: June 14, 2012, 01:01:31 am »
I am running a 64 Bit Windows 7 and using 64 bit VS.

There's no 64bit Visual Studio ;D

So again you didn't follow strictily the tutorial, because you somehow managed to change the platform from 32 to 64bit.

Unfortunatly there's no 64bit version of SFML 2rc directly available to download. So I guess you should keep using the 32bit version and switching your platform back to 32 (or you get the source from GitHub and compile the library on your own...). ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

NameUser

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Errors On Compilation
« Reply #14 on: June 15, 2012, 04:27:36 am »
So again you didn't follow strictily the tutorial

I did. Whatever's broken is a default.

So I guess you should keep using the 32bit version and switching your platform back to 32
Mind informing me how I do this?