Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[help]C++ dlls

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
iRiot
Master Cheater
Reputation: 0

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Fri Oct 17, 2008 3:46 pm    Post subject: [help]C++ dlls Reply with quote

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
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Oct 17, 2008 3:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zerith
Master Cheater
Reputation: 1

Joined: 07 Oct 2007
Posts: 468

PostPosted: Fri Oct 17, 2008 3:52 pm    Post subject: Reply with quote

Project properties->C/C++->Code generation->change runtime library to Multi-Threaded (/MT)
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Oct 17, 2008 3:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
iRiot
Master Cheater
Reputation: 0

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Fri Oct 17, 2008 4:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Oct 17, 2008 4:16 pm    Post subject: Reply with quote

Tried compiling in Release mode?
_________________
Back to top
View user's profile Send private message
iRiot
Master Cheater
Reputation: 0

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Fri Oct 17, 2008 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
TehBestNewbZ
Expert Cheater
Reputation: 0

Joined: 28 Jul 2006
Posts: 109

PostPosted: Fri Oct 17, 2008 4:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Fri Oct 17, 2008 11:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites