|
From: kidchaos en h. <kid...@ho...> - 2007-04-20 09:06:59
|
Hi again,
The console snake sample now works great!! Thanks!
Anyway, i found a small problem that im trying to resolve, my laptop is a
bit old and it only has 700Mb RAM, so when VC triggers a breakpoint my
windows doesnt react well. I have a little experience programming in
windows, but i have read that the Windows Message dispatching must be
accurate so it doenst eat all the machine resources.... I have tried a small
change on platgl.cpp on the DoMain function, and i think it works better
now. Here are my changes, tell me what you think, i think it respect the
multithreading in windows better.
- Changed:
/*while(m_hThread != NULL && GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}*/
- To:
while(m_hThread != NULL)
{
do
{
if (GetMessage(&msg, NULL, NULL, NULL))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} while (::PeekMessage(&msg, NULL, NULL, NULL, PM_REMOVE));
Sleep(2);
}
I have tested it and it works fine on breakpoint and exceptions...
@B^)>
----- Original Message -----
From: "Sam Steele" <sam...@gm...>
To: "General Discussion about the Tiki Toolkit"
<cad...@li...>
Sent: Friday, April 20, 2007 3:26 AM
Subject: Re: [cadcdev-tiki] [Tiki-win32] Unable to compile tikisnake
>I checked in a Visual Studio 2005 project file for TikiSnake. The
> problem you were encountering was caused by setting the runtime
> library to "Multi-threaded DLL" (the default in Visual Studio 2005).
> Changing the runtime library to "Multi-threaded" fixes the linker
> problem.
>
> -Sam
>
> On Apr 19, 2007, at 9:56 AM, kidchaos en hotmail2 wrote:
>
>> Hi,
>>
>> This a message for the devtiki mailing list, (to other people who
>> received
>> the same mail: hope you dont mind that i send personally)
>>
>> Im having troubles on compiling the tikisnake sample. Im working on a
>> windows XP with visual studio express. I downloaded the current
>> version of
>> tiki from svn, and compiled the tiki library without problem, but
>> now trying
>> to compile the tikisnake sample im getting the following errors:
>> ------ Build started: Project: tikisnake, Configuration: Debug
>> Win32 ------
>>
>> Compiling...
>>
>> snake.cpp
>>
>> Linking...
>>
>> msvcprtd.lib(MSVCP80D.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)
>> already defined in tiki.lib(console.obj)
>>
>> msvcprtd.lib(MSVCP80D.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)
>> already defined in tiki.lib(console.obj)
>>
>> LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of
>> other
>> libs; use /NODEFAULTLIB:library
>>
>> C:\cygwin\usr\local\dc\kos\tiki\examples\console\TikiSnake\vcproject
>> \Debug\tikisnake.exe
>> : fatal error LNK1169: one or more multiply defined symbols found
>>
>> Build log was saved at
>> "file://c:\cygwin\usr\local\dc\kos\tiki\examples\console\TikiSnake
>> \Debug\BuildLog.htm"
>>
>> tikisnake - 3 error(s), 1 warning(s)
>>
>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>> ==========
>>
>> Two questions:
>>
>> 1) srand(Time::gettime()); is there any problem with this function???
>>
>> 2) Searching on the code, i dont understand if the console class is
>> a valid
>> drawable object, it is declaring the ctor and the dtor of a string
>> class???
>>
>> Any help appreciate,
>>
>> Regards
>>
>> @B^)>
>>
>>
>> ----------------------------------------------------------------------
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> cadcdev-tiki mailing list
>> cad...@li...
>> https://lists.sourceforge.net/lists/listinfo/cadcdev-tiki
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> cadcdev-tiki mailing list
> cad...@li...
> https://lists.sourceforge.net/lists/listinfo/cadcdev-tiki
>
|