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

Author Topic: 32 bit sfml can't be used when on 64 bit system.  (Read 17386 times)

0 Members and 1 Guest are viewing this topic.

Me-Myself-And-I

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
32 bit sfml can't be used when on 64 bit system.
« on: December 02, 2022, 12:46:03 am »
I'm having a trouble getting 32 bit sfml to compile at all on a 64 bit system.I'm pretty sure the compiler is set to 32 bit and it doesn't give any errors about not being compatible but it doesn't recognize the existence of sfml.I'm using devc++ 5.11 on 64 bit windows and I have the linking done in compiler settings.
Here are the settings I used.

In the linker I have this:

-static-libgcc -lsfml-graphics



In the directories tab under libraries:
C:\SFML-2.5.1\lib    //this is the correct directory.

In the directories tab under c++ includes:

C:\SFML-2.5.1\include //this directory is correct also.

The compiler is set to TDM-GCC 4.9.2 32-bit release


The error received is [Error] SFML\Graphics.hpp: No such file or directory


This is the placed include script.it seems fine to me.
#include <SFML\Graphics.hpp>
using namespace sf;


This problem only occurs when using 32 bit sfml on this machine.64 bit sfml compiles fine but I would rather use 32 bit.

I'm really stumped on this one.I hope I gave enough details. Any ideas on what's causing the problem?

By the way,I would like to do static linking if you could show me how please.Thankyou

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: 32 bit sfml can't be used when on 64 bit system.
« Reply #1 on: December 02, 2022, 08:43:02 am »
Sounds like your setting for the include directory is not correctly set on your 32-bit settings.

Double check your project settings that it's set for the right configuration.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

euscar

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: 32 bit sfml can't be used when on 64 bit system.
« Reply #2 on: December 02, 2022, 10:35:11 am »
Hello.
I too use Dev-C++ 5.11 (by Orwell), however with SFML version 2.4.2.

As already asked by eXpl0it3r, did you set up all the include directory correctly?
Be careful that you have to do this for each "Compiler set to configure".

I did some testing and on my PC equipped with windows 7 it works.
Last thing, if you use dynamic linking, as I do too, remember to copy the correct .dll files, the 32-bit ones.

For static linking, I have no idea how to do it.

Me-Myself-And-I

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: 32 bit sfml can't be used when on 64 bit system.
« Reply #3 on: December 03, 2022, 12:40:37 am »
I think I figured out this error.
The error received is [Error] SFML\Graphics.hpp: No such file or directory
It was that the compiler was set right but the project settings was on 64 bit compiler.
There is another linker related error though.

recipe for target '"sfml' failed

It seems that i've looked through all the possible settings in devc++ so I have no idea why this is having linker problems.
Any ideas on what's causing this error?


euscar

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: 32 bit sfml can't be used when on 64 bit system.
« Reply #4 on: December 03, 2022, 01:00:38 am »
I forgot to tell you to check the pre-entered inclusion entries, which should be the following in the directories tab under libraries (the first part of the path depends on the installation folder on your pc, just check the bold text):

C:\Program Files (x86)\Dev-Cpp\MinGW64\lib
C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib32

If you find errors in the first line you need to correct them. Apparently there was an autodetecting error,

"Fixed use of invalid library directories when autodetecting 32bit GCC 4.9.2."

reported at:

https://sourceforge.net/p/orwelldevcpp/code/ci/master/tree/NEWS.txt

It refers to a 5.12 version, which I think one has to self-compile, because so far I have only found Orwell's 5.11 as an executable.

If you have set the path to your SFML library correctly, I can't think of anything else.
At most manually check the devcpp.ini file located in the hidden folder:

C:\Users\your_user\AppData\Roaming\Dev-Cpp

where instead of your_user the name of your user appears.
There may be errors or extra characters in the paths.

« Last Edit: December 03, 2022, 01:14:32 am by euscar »

Me-Myself-And-I

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: 32 bit sfml can't be used when on 64 bit system.
« Reply #5 on: December 03, 2022, 01:54:19 am »
Thankyou for bringing this devc problem to my attention.I have tried the best I know to correct what you showed me but I still am receiving the same error.If I figure this problem out I'll be sure to post it here.If anyone else has any ideas i'm open to suggestion.Thanks

euscar

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: 32 bit sfml can't be used when on 64 bit system.
« Reply #6 on: December 03, 2022, 09:23:49 am »
I did some testing and the following error

[Error] SFML/Graphics.hpp: No such file or directory.

appears to me when I change the name of the directory containing the SFML library. Are you sure you typed the path names correctly or that there is not some strange character? Also watch out for blank spaces, which are not welcome.
By the way, I use windows7.
« Last Edit: December 03, 2022, 09:46:58 am by euscar »

 

anything