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

Author Topic: MS VisualStrudio9 C++ SFML: How to port exe on others PC?  (Read 13873 times)

0 Members and 1 Guest are viewing this topic.

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« on: October 06, 2008, 05:01:40 pm »
Hi  :(  I study subject problem for 2 month without any success.
I found/try many options but I don't found a combinations to generate a app.exe (with or without *.dll) that can run on others PC.

Compiling same programs with Code::Blocks I obtain always exe that run immediately on others computers.

Unfortunately I have my proffered project that use CEGUI and I get too strange errors compiling in C::B. In VS run well but I can't port that.

Someone have an experience on this or simply in VS options to export to others PC?

Many-Thanks
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #1 on: October 06, 2008, 06:02:43 pm »
First thing, when you want to distribute you app, make sure you fully compiled your project in release configuration.

After that, it depends on your compiler :

for GCC (mingw) : the standard library (c/c++ standard functions) is embeded in your app by default, you only need to provide your exe, and the dependencies dll and ressource (image, sound etc ) if any.

for vs : the standard lib isn't included in your compiled exe, final user must have the C++ runtime installed on his computer. Easiest way is to let the user download these libs, here. MSDN have a page that summarize deployment methods (side-by-side, static etc) for visual based applications, here.

bullno1

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #2 on: October 06, 2008, 06:37:03 pm »
Just statically link the runtime in your exe. Try Multithreaded or Multithreaded Debug instead of Multithreaded DLL or multithreaded debug dll in the linker option

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #3 on: October 06, 2008, 08:08:51 pm »
Thanks, before that clear post I was lost in options.
Previously I read online about Native mode but I never get results with it.
And after that I'm get more confused about Runtime Library Options:
Multithread / DLL / Debug
Now I use /MD = DLL Multithread and
 can't successful compile with /MT = Multithread that I see in some post.

Ok, in next hour I can try to execute my program on other PC with your suggestion. Thanks
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #4 on: October 06, 2008, 08:42:16 pm »
(Previous post was sent 2 hours after typing it due to local net problem)

Now I re try to modify Code Generation Options and get many errors..
if you can try to explain me the situation I can try to study..
I want to know options and want to learn compile modes & parameters.
I have a brain to make this work.. isn't too much bat is time to use it. ^_^

Normally (/MD) I have to ignore specific library LIBCMT

Now Try /MT in Release mode without any ignore lib.. I get:
Code: [Select]
Errore 1 error LNK2005: "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 &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) già definito in carro.obj msvcprt.lib
Errore 2 error LNK2005: "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)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) già definito in carro.obj msvcprt.lib
Errore 3 error LNK2005: "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 *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) già definito in carro.obj msvcprt.lib
Errore 4 error LNK2005: "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@std@@QAEXXZ) già definito in libcpmt.lib(xmutex.obj) msvcprt.lib
Errore 5 error LNK2005: "public: void __thiscall std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex@std@@QAEXXZ) già definito in libcpmt.lib(xmutex.obj) msvcprt.lib
Errore 6 error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) già definito in carro.obj msvcprt.lib
Errore 7 error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) già definito in carro.obj msvcprt.lib
Errore 8 error LNK2005: "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@std@@YA_NXZ) già definito in libcpmt.lib(uncaught.obj) msvcprt.lib
Errore 9 error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) già definito in carro.obj msvcprt.lib
Errore 10 error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) già definito in carro.obj msvcprt.lib
Errore 11 error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) già definito in carro.obj msvcprt.lib
Errore 12 error LNK2005: "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) già definito in libcpmt.lib(string.obj) msvcprt.lib
Errore 13 error LNK2005: "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) già definito in libcpmt.lib(string.obj) msvcprt.lib
Errore 14 error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z) già definito in carro.obj msvcprt.lib
Errore 15 error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) già definito in carro.obj msvcprt.lib
Errore 16 error LNK2005: "public: void __thiscall std::locale::facet::_Incref(void)" (?_Incref@facet@locale@std@@QAEXXZ) già definito in carro.obj msvcprt.lib
Errore 17 error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) già definito in carro.obj msvcprt.lib
Errore 18 error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) già definito in libcpmt.lib(xlock.obj) msvcprt.lib
Errore 19 error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) già definito in libcpmt.lib(xlock.obj) msvcprt.lib
Errore 20 error LNK2005: "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)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) già definito in carro.obj msvcprt.lib
Errore 21 error LNK2005: "public: __thiscall std::locale::~locale(void)" (??1locale@std@@QAE@XZ) già definito in carro.obj msvcprt.lib
Errore 22 error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) già definito in LIBCMT.lib(stdexcpt.obj) MSVCRT.lib
Errore 23 error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) già definito in LIBCMT.lib(stdexcpt.obj) MSVCRT.lib
Errore 24 error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) già definito in LIBCMT.lib(stdexcpt.obj) MSVCRT.lib
Errore 25 error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) già definito in LIBCMT.lib(stdexcpt.obj) MSVCRT.lib
Errore 26 error LNK2005: __invalid_parameter_noinfo già definito in LIBCMT.lib(invarg.obj) MSVCRT.lib
Errore 27 error LNK2005: _memmove_s già definito in LIBCMT.lib(memmove_s.obj) MSVCRT.lib
Errore 28 error LNK2005: _longjmp già definito in LIBCMT.lib(longjmp.obj) MSVCRT.lib
Errore 29 error LNK2005: _fclose già definito in LIBCMT.lib(fclose.obj) MSVCRT.lib
Errore 30 error LNK2005: _fopen già definito in LIBCMT.lib(fopen.obj) MSVCRT.lib
Errore 31 error LNK2005: _free già definito in LIBCMT.lib(free.obj) MSVCRT.lib
Errore 32 error LNK2005: _fflush già definito in LIBCMT.lib(fflush.obj) MSVCRT.lib
Errore 33 error LNK2005: _exit già definito in LIBCMT.lib(crt0dat.obj) MSVCRT.lib
Errore 34 error LNK2005: ___iob_func già definito in LIBCMT.lib(_file.obj) MSVCRT.lib
Errore 35 error LNK2005: _sprintf già definito in LIBCMT.lib(sprintf.obj) MSVCRT.lib
Errore 36 error LNK2005: _abort già definito in LIBCMT.lib(abort.obj) MSVCRT.lib
Errore 37 error LNK2005: _strncpy già definito in LIBCMT.lib(strncpy.obj) MSVCRT.lib
Errore 38 error LNK2005: _fseek già definito in LIBCMT.lib(fseek.obj) MSVCRT.lib
Errore 39 error LNK2005: _fread già definito in LIBCMT.lib(fread.obj) MSVCRT.lib
Errore 40 error LNK2005: _malloc già definito in LIBCMT.lib(malloc.obj) MSVCRT.lib
Errore 41 error LNK2005: _ftell già definito in LIBCMT.lib(ftell.obj) MSVCRT.lib
Errore 42 error LNK2005: _realloc già definito in LIBCMT.lib(realloc.obj) MSVCRT.lib
Errore 43 error LNK2005: _strtol già definito in LIBCMT.lib(strtol.obj) MSVCRT.lib
Errore 44 error LNK2005: _strncmp già definito in LIBCMT.lib(strncmp.obj) MSVCRT.lib
Errore 45 error LNK2005: _getenv già definito in LIBCMT.lib(getenv.obj) MSVCRT.lib
Errore 46 error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) già definito in LIBCMT.lib(stdexcpt.obj) MSVCRT.lib
Errore 47 error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) già definito in LIBCMT.lib(typinfo.obj) MSVCRT.lib
Errore 48 error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) già definito in LIBCMT.lib(typinfo.obj) MSVCRT.lib
Avviso 49 warning LNK4098: la libreria predefinita 'MSVCRT' è in conflitto con l'utilizzo di altre librerie; utilizzare /NODEFAULTLIB:libreria




If LIBCMT.lib is Library of C for MT I have to ignore other library..
 try ignoring MSVCRT lib



Code: [Select]
Errore 1 error LNK2005: "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 &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) già definito in carro.obj msvcprt.lib
Errore 2 error LNK2005: "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)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) già definito in carro.obj msvcprt.lib
Errore 3 error LNK2005: "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 *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) già definito in carro.obj msvcprt.lib
Errore 4 error LNK2005: "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@std@@QAEXXZ) già definito in libcpmt.lib(xmutex.obj) msvcprt.lib
Errore 5 error LNK2005: "public: void __thiscall std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex@std@@QAEXXZ) già definito in libcpmt.lib(xmutex.obj) msvcprt.lib
Errore 6 error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) già definito in carro.obj msvcprt.lib
Errore 7 error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) già definito in carro.obj msvcprt.lib
Errore 8 error LNK2005: "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@std@@YA_NXZ) già definito in libcpmt.lib(uncaught.obj) msvcprt.lib
Errore 9 error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) già definito in carro.obj msvcprt.lib
Errore 10 error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) già definito in carro.obj msvcprt.lib
Errore 11 error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) già definito in carro.obj msvcprt.lib
Errore 12 error LNK2005: "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) già definito in libcpmt.lib(string.obj) msvcprt.lib
Errore 13 error LNK2005: "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) già definito in libcpmt.lib(string.obj) msvcprt.lib
Errore 14 error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z) già definito in carro.obj msvcprt.lib
Errore 15 error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) già definito in carro.obj msvcprt.lib
Errore 16 error LNK2005: "public: void __thiscall std::locale::facet::_Incref(void)" (?_Incref@facet@locale@std@@QAEXXZ) già definito in carro.obj msvcprt.lib
Errore 17 error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) già definito in carro.obj msvcprt.lib
Errore 18 error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) già definito in libcpmt.lib(xlock.obj) msvcprt.lib
Errore 19 error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) già definito in libcpmt.lib(xlock.obj) msvcprt.lib
Errore 20 error LNK2005: "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)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) già definito in carro.obj msvcprt.lib
Errore 21 error LNK2005: "public: __thiscall std::locale::~locale(void)" (??1locale@std@@QAE@XZ) già definito in carro.obj msvcprt.lib
Errore 22 error LNK2001: simbolo esterno __imp__fwrite non risolto sfml-graphics-s.lib
Errore 23 error LNK2001: simbolo esterno __imp__fwrite non risolto sfml-graphics-s.lib
Errore 24 error LNK2001: simbolo esterno __imp__fwrite non risolto sfml-graphics-s.lib
Errore 25 error LNK2001: simbolo esterno __imp__fwrite non risolto sfml-graphics-s.lib
Errore 26 error LNK2001: simbolo esterno __imp__ferror non risolto sfml-graphics-s.lib
Errore 27 error LNK2001: simbolo esterno __imp__fprintf non risolto sfml-graphics-s.lib
Errore 28 error LNK2001: simbolo esterno __imp__fprintf non risolto sfml-graphics-s.lib
Errore 29 error LNK2001: simbolo esterno __imp__fprintf non risolto sfml-graphics-s.lib
Errore 30 error LNK2001: simbolo esterno __imp___gmtime64 non risolto sfml-graphics-s.lib
Errore 31 error LNK2001: simbolo esterno __imp__fgetc non risolto sfml-graphics-s.lib
Errore 32 error LNK2001: simbolo esterno __imp__feof non risolto sfml-graphics-s.lib
Errore 33 error LNK2001: simbolo esterno __imp__ldexp non risolto sfml-graphics-s.lib
Errore 34 error LNK2001: simbolo esterno __imp__sscanf non risolto sfml-graphics-s.lib
Errore 35 error LNK2001: simbolo esterno __imp__srand non risolto sfml-system-s.lib
Errore 36 error LNK2001: simbolo esterno __imp__rand non risolto sfml-system-s.lib
Errore 37 fatal error LNK1120: 10 esterni non risolti E:\E\P\Fix\Trasporter\\Trasporter_Release.exe





If I try Debug version (/MTd) I get similar results (from Output window now)

Code: [Select]
1>------ Inizio compilazione: Progetto: Trasporter, Configurazione: Debug Win32 ------
1>Collegamento in corso...
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "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)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "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 *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) già definito in libcpmtd.lib(locale0.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(int)" (?width@ios_base@std@@QAEHH@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static int __cdecl std::char_traits<char>::eof(void)" (?eof@?$char_traits@D@std@@SAHXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBEHXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" (?length@?$char_traits@D@std@@SAIPBD@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@std@@YA_NXZ) già definito in libcpmtd.lib(uncaught.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) già definito in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) già definito in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) già definito in libcpmtd.lib(stdthrow.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "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 &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (?_Orphan_all@_Container_base_secure@std@@QBEXXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_String_base::~_String_base(void)" (??1_String_base@std@@QAE@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (??1_Container_base_secure@std@@QAE@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) già definito in libcpmtd.lib(string.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (??0_Container_base_secure@std@@QAE@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) già definito in libcpmtd.lib(string.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_String_base::_String_base(void)" (??0_String_base@std@@QAE@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::locale::~locale(void)" (??1locale@std@@QAE@XZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::locale::facet::_Incref(void)" (?_Incref@facet@locale@std@@QAEXXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::locale::id::operator unsigned int(void)" (??Bid@locale@std@@QAEIXZ) già definito in carro.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "protected: char * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Myptr(void)" (?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ) già definito in carro.obj
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) già definito in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) già definito in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) già definito in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __invalid_parameter già definito in LIBCMTD.lib(invarg.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __CrtDbgReportW già definito in LIBCMTD.lib(dbgrptw.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) già definito in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _memmove_s già definito in LIBCMTD.lib(memmove_s.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _longjmp già definito in LIBCMTD.lib(longjmp.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose già definito in LIBCMTD.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fopen già definito in LIBCMTD.lib(fopen.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free già definito in LIBCMTD.lib(dbgfree.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fwrite già definito in LIBCMTD.lib(fwrite.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fflush già definito in LIBCMTD.lib(fflush.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _exit già definito in LIBCMTD.lib(crt0dat.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: ___iob_func già definito in LIBCMTD.lib(_file.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _sprintf già definito in LIBCMTD.lib(sprintf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _abort già definito in LIBCMTD.lib(abort.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strncpy già definito in LIBCMTD.lib(strncpy.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _malloc già definito in LIBCMTD.lib(dbgmalloc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __wassert già definito in LIBCMTD.lib(wassert.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fseek già definito in LIBCMTD.lib(fseek.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _ftell già definito in LIBCMTD.lib(ftell.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _realloc già definito in LIBCMTD.lib(dbgrealloc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fread già definito in LIBCMTD.lib(fread.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strtol già definito in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strncmp già definito in LIBCMTD.lib(strncmp.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _ldexp già definito in LIBCMTD.lib(_ldexp_.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _getenv già definito in LIBCMTD.lib(getenv.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) già definito in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) già definito in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) già definito in LIBCMTD.lib(typinfo.obj)
1>LINK : warning LNK4098: la libreria predefinita 'MSVCRTD' è in conflitto con l'utilizzo di altre librerie; utilizzare /NODEFAULTLIB:libreria
1>LINK : warning LNK4098: la libreria predefinita 'LIBCMT' è in conflitto con l'utilizzo di altre librerie; utilizzare /NODEFAULTLIB:libreria
1>LIBCMTD.lib(crt0init.obj) : warning LNK4098: la libreria predefinita 'msvcrt.lib' è in conflitto con l'utilizzo di altre librerie; utilizzare /NODEFAULTLIB:libreria
1>E:\E\P\Fix\Trasporter\\Trasporter_Debug.exe : fatal error LNK1169: rilevato uno o più simboli definiti più volte



In my program I use only this libs:
Quote
sfml-main.lib sfml-graphics-s-d.lib sfml-window-s-d.lib sfml-system-s-d.lib

Quote
sfml-main.lib sfml-graphics-s.lib sfml-window-s.lib sfml-system-s.lib



Why I get this conflicts/errors?
Thanks
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #5 on: October 06, 2008, 09:02:51 pm »
For SirJulio
Quote
for vs : the standard lib isn't included in your compiled exe, final user must have the C++ runtime installed on his computer. Easiest way is to let the user download these libs, here. MSDN have a page that summarize deployment methods (side-by-side, static etc) for visual based applications, here.


I try.. None changed because I just installed redist package in my past test.
Program in Debug or Release mode (working on source PC)
on destination PC (Win2000 here but I try on XP too)
start open window (only border) and crash with generate error.
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #6 on: October 06, 2008, 09:33:34 pm »
For your previous reply, you cannot mix /MD and /MT : /MD is default for several application and lib precompiled libs (ie : SFML). If you want to use static linked library and compile your project in /MT all static library need to be (re)compiled in /MT.

Now, try to run a minimal app on the target computer (I mean just a window with a quit handler, like the window tuto), and see if you can reproduce the crash.

BTW : you use SFML 1.3 or svn ?

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #7 on: October 07, 2008, 12:55:06 pm »
Ok, you are right!

I test on Win2000 and on XP(only windows installed)

If I compile with /MT in Release mode my mini program run well!

I understand that /MT incorporate C function library in .exe

I understand that msvc*90d.dll is used only for Debug version.

PS: In VS I use SFML SVN(1.4)
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #8 on: October 07, 2008, 01:57:09 pm »
So if a minimal app run on the other computer, you have a problem with the app you want to distribute. Maybe a ressource (sound, image or other) problem ?

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #9 on: October 07, 2008, 07:54:32 pm »
Ok, I tested same simple code..

Code: [Select]
#include <windows.h>
#include <SFML/Graphics.hpp>

int main()
{
    MessageBox(NULL, "Addio, Mondo Crudele!", "Nota1", MB_OK);
    sf::RenderWindow App(sf::VideoMode(), "SFML");      // <----
    MessageBox(NULL, "OK Tutto a posto!!", "Nota2", MB_OK);
    return 0;
}


I compiled ALL SFML and program with /MT in Release mode.

I have here 4 PC:
On WinXP SP3 NVIDIA (VS PC)  all go ok in any version
On Win2k SP4 ATI         full of software I get general error
On WinXP SP2 INTEL     very very clear without any framework all go ok
On WinXP SP2 MATROX very very full with framework 1.1 I get an "Illegal instruction"

I found that the problem is in this line:
Code: [Select]
sf::RenderWindow App(sf::VideoMode(), "SFML");

If I comment this all go ok and I see a (black window)
If I left line I get error at start of execution.. don't see first win mex.
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #10 on: October 08, 2008, 12:42:37 am »
Now I tested with Standard SFML 1.3 (/MD) and compile previous mini program with /MD too.
I get identical results! Crash on window creation on 2PC.
I check graph and try to setup different resolution / 32M colors but result don't change.
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #11 on: October 08, 2008, 11:52:54 am »
Hi.. searching problem using Dependency Walker I found
a problem in a System DLL "DWMAPI.DLL"
not found on Develop PC but present in Win2000

I don't know if is important in our case but..

Surfing Web I found an exhaustive article that explain all story
that begin all with installation of new Internet Explorer 7.
He suggest to uninstall IE7 or create the missing DLL with dependencies.

http://www.novell.com/communities/node/4372/handling-dwmapidll-dependency
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #12 on: October 08, 2008, 03:07:02 pm »
I found that on other PC (Win2000 in this case)
using my mini program:
Code: [Select]
// DWMAPI.cpp : Defines the entry point for the console application.
#include <windows.h>
#include <stdio.h>
#include <SFML/Graphics.hpp>

int main(int argc, char* argv[])
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);

printf("GetVersionEx Returns %d\n",GetVersionEx(&osvi));

if( osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
printf("VER_PLATFORM_WIN32_NT\n");
}

printf("dwMajorVersion %d \n",osvi.dwMajorVersion );

//sf::RenderWindow App(sf::VideoMode(), "SFML");      // <----
sf::VideoMode Mode(800, 600, 32);
sf::RenderWindow App;
//App.Create(Mode, "Test", sf::Style::Close);


MessageBox(NULL, "Addio, Mondo Crudele!", "Nota", MB_OK);

return 0;
}


Debug version run well but
Release version open console window and crash immediatly.

If I comment line
[code]//sf::RenderWindow   App;[code]
all go ok in Debug and Release mode too.[/code]
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #13 on: October 08, 2008, 04:29:35 pm »
hmm ... that's a weird problem.

On this pc, is your drivers and windows up-to-date ?

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
MS VisualStrudio9 C++ SFML: How to port exe on others PC?
« Reply #14 on: October 09, 2008, 04:10:21 pm »
Hi I tested on WinXP SP2 with framework 2 just installed..
with Debug version all go ok
with Release mode Mini program halt on definition of RenderRindow

on this PC ther is an old installation of MS VisualStudio6
that put me in debug program
that show me the assembler code with cursor on this line

Code: [Select]
0043EE9A   movq        mmword ptr [esi+4],xmm0
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

 

anything