| View previous topic :: View next topic |
| Author |
Message |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Fri Oct 17, 2008 3:46 pm Post subject: [help]C++ dlls |
|
|
Well everytime i make a dll in c++ and compile it in c++... people that dont have visual studio 2008 installed have problems with the dll and does not work for them but ppl with visutal 2008 installed the dlls work perfectly... what can i do to fix this problem... use a different compiler if so which 1?
_________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Oct 17, 2008 3:50 pm Post subject: |
|
|
It's because most people don't have the C++ Runtime library's.
If you want to build them right into your program, at the expense of the size (just a small increase of like 30-40kb) you can switch the project settings.
Project Settings
- C/C++
-- Code Generation
--- Runtime Library : Multi-Threaded (/MT).
Will build them straight into the project.
By default they're at Multi-Threaded DLL (/MD).
_________________
|
|
| Back to top |
|
 |
Zerith Master Cheater
Reputation: 1
Joined: 07 Oct 2007 Posts: 468
|
Posted: Fri Oct 17, 2008 3:52 pm Post subject: |
|
|
| Project properties->C/C++->Code generation->change runtime library to Multi-Threaded (/MT)
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Oct 17, 2008 3:58 pm Post subject: |
|
|
| lurc wrote: | | If you want to build them right into your program, at the expense of the size (just a small increase of like 30-40kb) you can switch the project settings. |
Or you can always be cool and just not use it at all, though depending on what functions you use, you may have to reinvent the wheel.
|
|
| Back to top |
|
 |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Fri Oct 17, 2008 4:11 pm Post subject: |
|
|
umm i get mad errors once i change the settings to Multi-Treaded MT and try the compile it
| Code: | ------ Build started: Project: EverLastingGGless, Configuration: Debug Win32 ------
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Main.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: char const & __thiscall std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >::operator*(void)const " (??D?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDXZ)
libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __malloc_dbg
libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __free_dbg
libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype |
_________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Oct 17, 2008 4:16 pm Post subject: |
|
|
Tried compiling in Release mode?
_________________
|
|
| Back to top |
|
 |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Fri Oct 17, 2008 4:20 pm Post subject: |
|
|
| lurc wrote: | | Tried compiling in Release mode? |
sweet it worked now thanks lol i didnt even know what release mode meant but found it in a sec
_________________
|
|
| Back to top |
|
 |
TehBestNewbZ Expert Cheater
Reputation: 0
Joined: 28 Jul 2006 Posts: 109
|
Posted: Fri Oct 17, 2008 4:40 pm Post subject: |
|
|
| everytime when you create a new program, it's a good idea to test it in debug mode first. In debug mode, it makes things easier for you to find errors. When you're confident that your program has no errors, then re-complie it in release mode. Release mode = uses less memory and resources btw.
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Fri Oct 17, 2008 11:10 pm Post subject: |
|
|
| TehBestNewbZ wrote: | | everytime when you create a new program, it's a good idea to test it in debug mode first. In debug mode, it makes things easier for you to find errors. When you're confident that your program has no errors, then re-complie it in release mode. Release mode = uses less memory and resources btw. |
You forgot to mention the massive size reductions.
|
|
| Back to top |
|
 |
|