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

Author Topic: Help visual studio 2010 and C  (Read 4013 times)

0 Members and 1 Guest are viewing this topic.

massimo299

  • Newbie
  • *
  • Posts: 5
    • View Profile
Help visual studio 2010 and C
« on: December 06, 2010, 02:13:39 pm »
Hi there i'm italian so excuse me for my english. I would to use visual studio 2010 with C language, not C++, and i would to use sfml library to try to programm some games. I started trying to create a window with this code :

Code: [Select]
#include "stdafx.h"
#include <stdio.h>
#include <SFML\Window.h>

void main()
{
sfWindowSettings s;
sfVideoMode m ;
sfWindow *w;
m.BitsPerPixel=32;
m.Height=800;
m.Width=600;
malloc(sizeof(sfWindowSettings));
s.DepthBits=32;
s.StencilBits=32;
s.AntialiasingLevel=0;
w = sfWindow_Create(m,"primafinestra",20,s);
        sfWindow_Display(w);
system("PAUSE");
}


But i have this errors : C:\Users\Massimo\documents\visual studio 2010\Projects\Test1\Debug\Test1.exe : fatal error LNK1120: 16 external not solved

If I cut the 2 lines where i create and display the window , it compile correctly. Please help me to learn how to use sfml with visual studio. Thanks

AdrianM

  • Newbie
  • *
  • Posts: 43
    • View Profile
Help visual studio 2010 and C
« Reply #1 on: December 06, 2010, 02:39:42 pm »
You have to link against the SFML libraries. Be extra careful to link with the debug ones if you're working in debug or with the release ones if you work in release mode. In you're case, you are working with the debug mode.

massimo299

  • Newbie
  • *
  • Posts: 5
    • View Profile
Help visual studio 2010 and C
« Reply #2 on: December 06, 2010, 02:41:32 pm »
i've linked the sfml libraries in the properties of the project....

AdrianM

  • Newbie
  • *
  • Posts: 43
    • View Profile
Help visual studio 2010 and C
« Reply #3 on: December 06, 2010, 02:56:17 pm »
Then, please do post the link errors.

massimo299

  • Newbie
  • *
  • Posts: 5
    • View Profile
Help visual studio 2010 and C
« Reply #4 on: December 06, 2010, 03:03:48 pm »
1>csfml-window-s-d.lib(VideoModeSupport.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) non risolto nella funzione _sfWindow_Create
1>csfml-window-s-d.lib(Window.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(VideoMode.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(VideoModeSupport.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) non risolto nella funzione _sfWindow_Create
1>csfml-window-s-d.lib(Window.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) non risolto
1>csfml-window-s-d.lib(VideoMode.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) non risolto
1>csfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) non risolto nella funzione "public: void __thiscall std::deque<class sf::Event,class std::allocator<class sf::Event> >::push_back(class sf::Event const &)" (?push_back@?$deque@VEvent@sf@@V?$allocator@VEvent@sf@@@std@@@std@@QAEXABVEvent@sf@@@Z)
1>csfml-window-s-d.lib(VideoMode.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) non risolto
1>csfml-window-s-d.lib(VideoModeSupport.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) non risolto nella funzione "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >::~_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >(void)" (??1?$_Container_base_aux_alloc_empty@V?$allocator@VEvent@sf@@@std@@@std@@IAE@XZ)
1>csfml-window-s-d.lib(VideoMode.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) non risolto nella funzione "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
1>csfml-window-s-d.lib(VideoMode.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) non risolto
1>csfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) non risolto
1>csfml-window-s-d.lib(VideoModeSupport.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) non risolto nella funzione "public: virtual char const * __thiscall std::logic_error::what(void)const " (?what@logic_error@std@@UBEPBDXZ)
1>csfml-window-s-d.lib(VideoMode.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) non risolto
1>csfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) non risolto
1>csfml-window-s-d.lib(VideoModeSupport.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) non risolto nella funzione "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >::_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >(class std::allocator<class sf::Event>)" (??0?$_Container_base_aux_alloc_empty@V?$allocator@VEvent@sf@@@std@@@std@@IAE@V?$allocator@VEvent@sf@@@1@@Z)
1>csfml-window-s-d.lib(VideoMode.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: int __thiscall std::ios_base::width(int)" (__imp_?width@ios_base@std@@QAEHH@Z) non risolto nella funzione "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: int __thiscall std::ios_base::width(int)" (__imp_?width@ios_base@std@@QAEHH@Z) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) non risolto nella funzione "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (__imp_?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) non risolto nella funzione "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (__imp_?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: static int __cdecl std::char_traits<char>::eof(void)" (__imp_?eof@?$char_traits@D@std@@SAHXZ) non risolto nella funzione "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: static int __cdecl std::char_traits<char>::eof(void)" (__imp_?eof@?$char_traits@D@std@@SAHXZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: int __thiscall std::ios_base::width(void)const " (__imp_?width@ios_base@std@@QBEHXZ) non risolto nella funzione "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: int __thiscall std::ios_base::width(void)const " (__imp_?width@ios_base@std@@QBEHXZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" (__imp_?length@?$char_traits@D@std@@SAIPBD@Z) non risolto nella funzione "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" (__imp_?length@?$char_traits@D@std@@SAIPBD@Z) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (__imp_?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) non risolto nella funzione "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Sentry_base::_Sentry_base(class std::basic_ostream<char,struct std::char_traits<char> > &)" (??0_Sentry_base@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@AAV12@@Z)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (__imp_?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) non risolto
1>csfml-window-s-d.lib(Window.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (__imp_?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) non risolto nella funzione "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Sentry_base::~_Sentry_base(void)" (??1_Sentry_base@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@XZ)
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: simbolo esterno "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (__imp_?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) non risolto
1>csfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (__imp_?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) non risolto nella funzione "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings &)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KAAUWindowSettings@2@@Z)
1>C:\Users\Massimo\documents\visual studio 2010\Projects\Test1\Debug\Test1.exe : fatal error LNK1120: 16 esterni non risolti
1>
1>Compilazione NON RIUSCITA.
1>
1>Tempo trascorso 00:00:00.44
========== Compilazione: 0 completate, 1 non riuscite, 0 aggiornate, 0 ignorate ==========

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Help visual studio 2010 and C
« Reply #5 on: December 06, 2010, 03:23:19 pm »
Don't use the CSFML static libraries (-s suffix), they internally embed C++ symbols that your C linker can't understand.
Laurent Gomila - SFML developer

massimo299

  • Newbie
  • *
  • Posts: 5
    • View Profile
Help visual studio 2010 and C
« Reply #6 on: December 06, 2010, 03:32:15 pm »
ok i understand, but if i use the non static library i had this error "csfml-window-d.dll not present"

AdrianM

  • Newbie
  • *
  • Posts: 43
    • View Profile
Help visual studio 2010 and C
« Reply #7 on: December 06, 2010, 03:35:11 pm »
You have to copy the dll's in an appropriate directory, so that you're exe can dynamically link to them. Normally you would put the dll's next to the executable.

massimo299

  • Newbie
  • *
  • Posts: 5
    • View Profile
Help visual studio 2010 and C
« Reply #8 on: December 06, 2010, 03:38:53 pm »
ok i've copied the dll's in the debug directory but now i have this error : 0xc0150002
file pdb impossible to find or open
but if i go on release mode the program work !!

 

anything