I just started learning C++ about a month ago. Mostly only done console stuff and a little directX from a youtube series but used a premade framework for that.
So followed the SMFL tutorial to setup the compiler. Im using Visual Studio 2010 express.
Put in some code and It wont compile. Been searching for about 2 hours now and cant find a resolution.
Any help would be appreciated. (set it up to use Static .dll)
1>------ Build started: Project: wtf, Configuration: Debug Win32 ------
1> main.cpp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>c:\users\amorie\documents\visual studio 2010\Projects\wtf\Debug\wtf.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The code im trying to compile:
#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;
}
Libraries added for debug:
sfml-graphics-s-d.lib
sfml-audio-s-d.lib
sfml-system-s-d.lib
sfml-window-s-d.lib
sfml-network-s-d.lib
Libraries added for release:
sfml-graphics-s.lib
sfml-audio-s.lib
sfml-system-s.lib
sfml-window-s.lib
sfml-network-s.lib
All config - Preproccessor:
SFML_STATIC
All config:
include directory
library directory
I followed the official tutorial and watched some videos and double checked everything. Started a clean project and did it again and still the same results.
Thanks for any help,
Amorie