Nov 11, 2010 at 1:01pm Nov 11, 2010 at 1:01pm UTC
1 2 3 4 5
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>
void main(){
sf::Window App(sf::VideoMode(800,600,32), L"T_T" , sf::Style::Fullscreen); //cannot convert from 'const wchar_t [4]' to 'const std::string'
By removing the L, it generates 4 errors instead of one. :/
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Window::~Window(void)" (??1Window@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>C:\Users\papa\Desktop\C++\SFML_Console_Learning\Debug\SFML_Console_Learning.exe : fatal error LNK1120: 3 unresolved externals'
But if I
DO use the L...
1>c:\users\papa\desktop\c++\sfml_console_learning\sfml_console_learning\main.cpp(5) : error C2664: 'sf::Window::Window(sf::VideoMode,const std::string &,unsigned long,const sf::WindowSettings &)' : cannot convert parameter 2 from 'const wchar_t [4]' to 'const std::string &'
Last edited on Nov 11, 2010 at 1:04pm Nov 11, 2010 at 1:04pm UTC
Nov 11, 2010 at 1:08pm Nov 11, 2010 at 1:08pm UTC
Yes, but you're thru. Now the compiler is satisfied and the linker whinges. You must provide the appropriate library