I'm making my second C++ program with SFML, a game/multimedia application library. Upon compiling my code, I get an error:
error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
I have double checked and triple checked the Linker Input settings to make sure the libraries are included. No idea what this error means! Here's my code:
error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
I have double checked and triple checked the Linker Input settings to make sure the libraries are included. No idea what this error means! Here's my code:
C++:
// This application will load a simple sprite.
#include <SFML/Graphics.hpp>
int main()
{
// Create the program's main window.
sf::RenderWindow window(sf::VideoMode(800, 600), "Stick Man Wave");
while (window.isOpen())
{
sf::Event event;
// Checks for any events that occured since last iteration of main loop
while (window.pollEvent(event))
{
// Detects a window closed event.
if (event.type == sf::Event::Closed)
// Closes the window
window.close();
}
// Clears the window with a black color.
window.clear(sf::Color::Black);
// Load the texure
sf::Texture stick1Texture;
stick1Texture.loadFromFile("C:\sprite test\stick figure 1.dds");
// Load the texture into a sprite
sf::Sprite stick1Sprite;
stick1Sprite.setTexture(stick1Texture);
// Draw the Sprite
window.draw(stick1Sprite);
// Sends drawing to the display
window.display();
}
return 0;
}