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 - Cedrei

Pages: [1]
1
General / Re: Tutorial program won't link
« on: March 05, 2017, 12:00:58 pm »
Guess I am a fool, after all... D=

Well, thanks for taking your time to help a fool like me, I'm sorry to have bothered you.

2
General / Re: Tutorial program won't link
« on: March 05, 2017, 10:26:53 am »
That... helped, but now I get an error about sfml-system-d-2.dll not being on the computer. Where should I put that file for the program to find it?

Edit: If I used the static libraries, it works. Yay!  :D

3
General / Tutorial program won't link
« on: March 05, 2017, 09:48:41 am »
I'm a total noob to SFML, I downloaded it an hour ago (I have the Visual C++ 14 (2015) - 64-bit in SFML 2.4.2) and went to test it by doing the first little code in the tutorial. I first tried to write it myself and then copy-pasting it, but nothing worked. I run on debug x64 in visual studio 2015, using these linker additional dependencies:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);sfml-audio-d.lib;sfml-graphics-d.lib;sfml-network-d.lib;sfml-system-d.lib;sfml-window-d.lib
If you don't feel like searching the tutorial for the code I'm talking about, it's here:
#include <SFML/Graphics.hpp>

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

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

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

        return 0;
}
And the error I got was LNK2019 in MSVCRTD.lib (exe_winmain.obj):
unresolved external symbol WinMain referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
 

Pages: [1]
anything