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

Author Topic: SFML Error  (Read 1367 times)

0 Members and 1 Guest are viewing this topic.

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
SFML Error
« on: March 05, 2023, 03:54:30 am »
Hello! I was trying to use SFML 2.5.1 since my visual studio is the 2022 version. But I keep getting errors. Here are the stuff I included in my directories.

Additional Include Directories :
c:\SFML-2.5.1\include;
$(SolutionDir)SDL\SDL2\include;
$(SolutionDir)SDL\SDL2_image\include;
$(SolutionDir)SDL\SDL2_mixer\include;
$(SolutionDir)SDL\SDL2_ttf\include;
(AdditionalIncludeDirectories)

Additional Library Directories:
c:\SFML-2.5.1\lib;
$(SolutionDir)SDL\SDL2\include;
$(SolutionDir)SDL\SDL2_image\include;
$(SolutionDir)SDL\SDL2_mixer\include;
$(SolutionDir)SDL\SDL2_ttf\lib;
%(AdditionalLibraryDirectories)

Additional Dependencies:
sfml-graphics-d.lib;
sfml-window-d.lib;
sfml-system-d.lib;
SDL2.lib;
SDL2main.lib;
SDL2_image.lib;
SDL2_mixer.lib;
SDL2_ttf.lib;
%(AdditionalDependencies)

And I kept getting the LNK2019 Errors, which are the unresolved external symbols.

Please help asap! Thanks

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: SFML Error
« Reply #1 on: March 05, 2023, 03:56:27 am »
These are some of the errors as mentioned

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: SFML Error
« Reply #2 on: March 05, 2023, 05:21:53 pm »
Looks like you aren't actually linking SFML. Make sure that the mentioned configs are set for the right architecture (x64 vs x86) and runtime config (Debug vs Release).

Can't really recommend to have SDL and SFML linked side-by-side, might be going okay, but might also mess up some states and cause odd issues.

Please make use of the edit function on the forum, if you just want to update something on your post a few minutes after posting it ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: SFML Error
« Reply #3 on: March 05, 2023, 05:40:07 pm »
Hello! Thanks for replying, so I tried to download both 32 bits and 64 bits for sfml, but it kept saying I have the library machine type as x86, which conflicts with my target machine type x64.

I used both Visual C++ 15 (2017) - 32-bit and 64 bit but it did not work for me :( I also changed my additional dependencies based on the debug and release parts.
« Last Edit: March 05, 2023, 05:45:34 pm by JapaneseCurry08 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: SFML Error
« Reply #4 on: March 05, 2023, 05:59:07 pm »
I didn't mean that you should download some other version, but that you need to make sure that your settings are actually set for the matching configuration.

Like this:

Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: SFML Error
« Reply #5 on: March 05, 2023, 06:01:55 pm »
Yup, it is the same

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: SFML Error
« Reply #6 on: March 05, 2023, 06:12:51 pm »
Well to fix the "conflicts with target machine type" errors, you'll have to remove all the falsely downloaded 32-bits library files (just remove everything SFML) and place the 64-bits library files there again, then do a clean rebuild.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: SFML Error
« Reply #7 on: March 05, 2023, 06:29:48 pm »
I removed the 32 bits and replaced it with 64 but it still does not work unfortunately

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: SFML Error
« Reply #8 on: March 05, 2023, 07:51:51 pm »
"Does not work" is not a problem description :D

What doesn't work?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: SFML Error
« Reply #9 on: March 05, 2023, 10:33:28 pm »
It still says the library machine type does not match with the target machine type.

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: SFML Error
« Reply #10 on: March 05, 2023, 10:38:05 pm »
The errors are gone right now, however it says my application was unable to start correctly (0xc000007b)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: SFML Error
« Reply #11 on: March 05, 2023, 11:56:44 pm »
Make sure to also delete the old DLLs and copy in the new ones.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/