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

Author Topic: Can't seem to install SFML  (Read 20259 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #15 on: March 16, 2014, 07:18:36 pm »
So, try inverting the order of your linked libraries in codeblocks (I see you've got little arrows on the right of the window, is that it?)
That's not the issue here. According to the screenshot the libraries are in the right order.

What happens when you make a full rebuild? If the build command didn't change, then you're still not linking against the SFML libraries for some reason. Not sure what setting you accidentally changed.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #16 on: March 16, 2014, 08:47:21 pm »
If I click rebuild, I still get the same errors

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
AW: Can't seem to install SFML
« Reply #17 on: March 16, 2014, 09:12:21 pm »
And the build command still doesn't contain any kind of -lsfml-xyz-d?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Raincode

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Can't seem to install SFML
« Reply #18 on: March 16, 2014, 09:58:58 pm »
Dunno if this will help you, but giving up won't!

By the way, the problem I have had before was using a g++ 4.8 compiler version and using the 4.7 libraries/binaries outsch... Looks like this is the case if you just downloaded CodeBlocks, however I'm not sure this is actually the cause for your errors

edit: didn't realize you weren't using Version 13...
« Last Edit: March 19, 2014, 05:31:16 pm by Raincode »

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #19 on: March 17, 2014, 02:09:21 am »
What is a build command? Is it the build log? if so, there's only
-lsfml-graphics-d    -lsfml-window-d    -lsfml-system-d
« Last Edit: March 17, 2014, 02:10:57 am by greenleaf800073 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #20 on: March 17, 2014, 02:15:31 am »
Yes the build log holds that information. The "command" is essentially what Code::Blocks calls to execute GCC, which is the compiler.
If those are now there, then please copy the build command again, because they weren't there before.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #21 on: March 17, 2014, 02:49:50 am »
-------------- Build: Debug in SFML Tests (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -L..\..\SFML-2.1\lib  -o "bin\Debug\SFML Tests.exe" obj\Debug\main.o    -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
obj\Debug\main.o: In function `main':
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:5: undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:5: undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:5: undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:6: undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:7: undefined reference to `_imp___ZN2sf5Color5GreenE'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:7: undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:15: undefined reference to `_imp___ZN2sf6Window5closeEv'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:12: undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:18: undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:18: undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:19: undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:19: undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:20: undefined reference to `_imp___ZN2sf6Window7displayEv'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:9: undefined reference to `_imp___ZNK2sf6Window6isOpenEv'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:23: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'

C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:5: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
C:/Users/cocon_000/Desktop/SFML Projects/SFML Tests/main.cpp:23: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'

obj\Debug\main.o: In function `ZN2sf11CircleShapeD1Ev':
C:\Users\cocon_000\Desktop\SFML Projects\SFML Tests/../../SFML-2.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `_imp___ZTVN2sf11CircleShapeE'

C:\Users\cocon_000\Desktop\SFML Projects\SFML Tests/../../SFML-2.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `_imp___ZTVN2sf11CircleShapeE'
C:\Users\cocon_000\Desktop\SFML Projects\SFML Tests/../../SFML-2.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `_imp___ZN2sf5ShapeD2Ev'

collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
20 errors, 0 warnings (0 minutes, 0 seconds)
 
 

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #22 on: March 17, 2014, 09:53:46 pm »
bump

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #23 on: March 19, 2014, 01:46:40 am »
should I try to re-install code::blocks then? or can I easily solve it?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #24 on: March 19, 2014, 01:58:40 am »
You could try to create a new empty project and add things from scratch. If that doesn't work, you could upload the Code::Blocks project file. I've no idea what the issue is exactly other than the libraries aren't getting linked properly.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #25 on: March 19, 2014, 03:41:41 am »
still doesn't work for me, attached is project

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #26 on: March 19, 2014, 09:49:33 pm »
bump

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #27 on: March 20, 2014, 01:32:31 am »
Well okay, no idea where you put these settings, but there's like nothing in that project file of yours:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
        <FileVersion major="1" minor="6" />
        <Project>
                <Option title="SFML Tests" />
                <Option pch_mode="2" />
                <Option compiler="gcc" />
                <Build>
                        <Target title="Debug">
                                <Option output="bin/Debug/SFML Tests" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Debug/" />
                                <Option type="1" />
                                <Option compiler="gcc" />
                                <Compiler>
                                        <Add option="-g" />
                                </Compiler>
                        </Target>
                        <Target title="Release">
                                <Option output="bin/Release/SFML Tests" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Release/" />
                                <Option type="1" />
                                <Option compiler="gcc" />
                                <Compiler>
                                        <Add option="-O2" />
                                </Compiler>
                                <Linker>
                                        <Add option="-s" />
                                </Linker>
                        </Target>
                </Build>
                <Compiler>
                        <Add option="-Wall" />
                </Compiler>
                <Extensions>
                        <code_completion />
                        <envvars />
                        <debugger />
                        <lib_finder disable_auto="1" />
                </Extensions>
        </Project>
</CodeBlocks_project_file>
 

There's also no source file added to the project:


You need to change the settings here:


It's empty for me:


Or did you simply forget to save the project file before packing things? ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Can't seem to install SFML
« Reply #28 on: March 20, 2014, 02:25:52 am »
That's really strange, I just checked my .zip, everything was there .-.
well, in my linker debug, yes, I'm in build options, I have

sfml-graphics-d
sfml-window-d
sfml-system-d

in link libraries for release, I have

sfml-graphics
sfml-window
sfml-system

I assume that I need .dlls? but I tried putting even all of them in my debug folder?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
Re: Can't seem to install SFML
« Reply #29 on: March 20, 2014, 04:04:56 pm »
Please make sure to click "Save All", because that project file is still empty:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
        <FileVersion major="1" minor="6" />
        <Project>
                <Option title="SFML Tests" />
                <Option pch_mode="2" />
                <Option compiler="gcc" />
                <Build>
                        <Target title="Debug">
                                <Option output="bin/Debug/SFML Tests" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Debug/" />
                                <Option type="1" />
                                <Option compiler="gcc" />
                                <Compiler>
                                        <Add option="-g" />
                                </Compiler>
                        </Target>
                        <Target title="Release">
                                <Option output="bin/Release/SFML Tests" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Release/" />
                                <Option type="1" />
                                <Option compiler="gcc" />
                                <Compiler>
                                        <Add option="-O2" />
                                </Compiler>
                                <Linker>
                                        <Add option="-s" />
                                </Linker>
                        </Target>
                </Build>
                <Compiler>
                        <Add option="-Wall" />
                </Compiler>
                <Extensions>
                        <code_completion />
                        <envvars />
                        <debugger />
                        <lib_finder disable_auto="1" />
                </Extensions>
        </Project>
</CodeBlocks_project_file>
 
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/