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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - alphan95

Pages: [1]
1
General discussions / Re: SFML Game Development -- A book on SFML
« on: September 21, 2015, 07:13:30 pm »
Thanks. I'll do dynamic for now since that seems easier. Don't have to modify the cmake file.

2
General discussions / Re: SFML Game Development -- A book on SFML
« on: September 21, 2015, 04:25:41 am »
I am getting the following error message when I try to compile the tutorial code.

[  1%] Linking CXX executable 01_Intro.exe
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x11f): undefined reference to `FT_Set_Pixel_Sizes'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x2ce): undefined reference to `FT_Set_Pixel_Sizes'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x31a): undefined reference to `FT_MulFix'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x4ae): undefined reference to `FT_Set_Pixel_Sizes'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x4fa): undefined reference to `FT_MulFix'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x68a): undefined reference to `FT_Set_Pixel_Sizes'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x85a): undefined reference to `FT_Get_Char_Index'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x86b): undefined reference to `FT_Get_Char_Index'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x88a): undefined reference to `FT_Get_Kerning'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0xec6): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0xeea): undefined reference to `FT_Done_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0xfe5): undefined reference to `FT_Init_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1017): undefined reference to `FT_New_Memory_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x102e): undefined reference to `FT_Select_Charmap'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1123): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1144): undefined reference to `FT_Done_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x11d4): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x12d2): undefined reference to `FT_Init_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x12fc): undefined reference to `FT_New_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1313): undefined reference to `FT_Select_Charmap'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1463): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1484): undefined reference to `FT_Done_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1543): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1646): undefined reference to `FT_Init_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1714): undefined reference to `FT_Open_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x172f): undefined reference to `FT_Select_Charmap'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1894): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x18b5): undefined reference to `FT_Done_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1964): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1ac7): undefined reference to `FT_Done_Face'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1ae8): undefined reference to `FT_Done_FreeType'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1e98): undefined reference to `FT_Set_Pixel_Sizes'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1ec8): undefined reference to `FT_Load_Char'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1ee7): undefined reference to `FT_Get_Glyph'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1f2f): undefined reference to `FT_Glyph_To_Bitmap'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1f8d): undefined reference to `FT_Done_Glyph'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x1f92): undefined reference to `glFlush@0'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x20fb): undefined reference to `FT_Bitmap_Embolden'
C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj):Font.cpp:(.text+0x2134): undefined reference to `FT_Outline_Embolden'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:/SFML-2.3.2/lib/libsfml-graphics-s.a(Font.cpp.obj): bad reloc address 0x17 in section `.text.unlikely'
collect2.exe: error: ld returned 1 exit status
01_Intro\Source\CMakeFiles\01_Intro.dir\build.make:128: recipe for target '01_Intro/Source/01_Intro.exe' failed
mingw32-make[2]: *** [01_Intro/Source/01_Intro.exe] Error 1
CMakeFiles\Makefile2:84: recipe for target '01_Intro/Source/CMakeFiles/01_Intro.dir/all' failed
mingw32-make[1]: *** [01_Intro/Source/CMakeFiles/01_Intro.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

Any help? I am u sing the most recent version of SFML.

3
General / Re: Issues with using SFML with Visual Studio 2010
« on: March 28, 2014, 12:24:09 am »
If you created a Win32 application delete your whole code and put this.

#include <SFML/Graphics.hpp>

using namespace sf;

int main()
{
        RenderWindow window(VideoMode(200, 200), "Apocalypse");
        CircleShape shape(100.f);
        shape.setFillColor(Color::Green);

        while (window.isOpen())
        {
                Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == Event::Closed)
                                window.close();
                }

                window.clear();
                window.draw(shape);
                window.display();
        }

        return 0;
}
(I know using namespace sf; is bad but I'm testing stuff)

Then what you need to do is link all the libraries E.G, these are for release. Add the -d for debug.
sfml-main.lib
sfml-graphics.lib
sfml-audio.lib
sfml-system.lib
sfml-window.lib
sfml-network.lib

(Yet again, not the best way to do it since you're not using them, but I don't know what you move onto after this, you may need them)
Didn't work. I get more errors


Quote
1>sfml-main-d.lib(SFML_Main.cpp.obj) : error LNK2019: unresolved external symbol _main referenced in function _WinMain@16
[...] I did change main to WinMain.
When you combine the error message with that statement, you'll see that main() cannot be found by the linker, because you did not declare it.

Link to sfml-main and use main(), not WinMain(). This is explained in the tutorials, by the way...
Tutorial says
Quote
If you chose to create a "Windows application" project, then the entry point of your code has to be the "WinMain" function instead of "main".


Doesn't look like anyone can fix this issue so I'm just going to try and use a different editor.

4
General / Issues with using SFML with Visual Studio 2010
« on: March 27, 2014, 02:42:33 am »
I get this error when I try to build it:
Quote
1>sfml-main-d.lib(SFML_Main.cpp.obj) : error LNK2019: unresolved external symbol _main referenced in function _WinMain@16
I followed the tutorial (http://www.sfml-dev.org/tutorials/2.1/start-vc.php). It's a windows application. I did change main to WinMain. I'm running in debug mode so I copied all the sfml-xxx-d.lib. Anybody can help?

Pages: [1]
anything