lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks,
My application is ok now

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Michael Wolf
Sent: Wednesday, June 14, 2006 2:37 AM
To: Lua list
Subject: Re: Have a trouble when running Lua in MSVC8

Hi,

I am using Lua with MS Visual Studio without any problems.
Did you set the character set to Unicode?

Because I had problems with Unicode, lua always returned with an error 
after a call to lua_pcall if i remember correctly.
Setting 'Character set' under project properties to 'Not Set' or 'Use 
Multi-Byte Character Set' works fine!

BR
Michael

PS: Please excuse my poor english! :(

Nguyen Dang Quang wrote:
> Hi,
> 
> I have just port my application from MSVC6 to MSVC8 (Microsoft Visual 
> Studio 2005). In the past, my application ran well but now it raise 
> application error. At the following code At the second lua_pcall
> 
>  
> 
> if(luaL_loadfile(L,rule_path.c_str()) != 0 || lua_pcall(L, 0, 0, 0))
> 
>                   {
> 
>                         pi->m_current_processed_size = pi->m_current_size;
> 
>                         pi->m_total_processed_size += pi->m_current_size;
> 
>                         MessageBox(NULL,lua_tostring(L, -1),"Error 
> executing the Script",MB_OK);
> 
>                   }
> 
>                   else//run the main function
> 
>                   {
> 
>                         //push the parameters onto the stack
> 
>                         lua_settop(L,0);
> 
>                         lua_getglobal(L, "main");  // function to be
called
> 
>                         if (lua_pcall(L, 0 , 1, 0) != 0) //Khong 
> argument, 1 result, khong co ham xu ly loi
> 
>                         {
> 
>                               MessageBox(NULL,lua_tostring(L, -1),"Error 
> executing the Script",MB_OK);
> 
>                         }
> 
>                   }
> 
>  
> 
> Can lua 5.1 run well on MSVC8???
> 
> Help me please!!
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com