Re: [Iup-users] Can't get IUP to work with Lua and Visual Studio2010
Brought to you by:
scuri
From: Antonio S. <sc...@te...> - 2010-06-18 16:15:37
|
One simple test you can do. Rename the Lua for Windows folder to Lua.old, for example. This will eliminate that iup.dll from the path. Let me know if this works. BTW, I tested here requiring the iuplua51.dll build with vc10 using an application and lua5.1.dll built with vc10, everything worked fine. Best, scuri > -----Original Message----- > From: Simon Orde [mailto:so...@go...] > Sent: sexta-feira, 18 de junho de 2010 13:08 > To: IUP discussion list. > Subject: Re: [Iup-users] Can't get IUP to work with Lua and Visual > Studio2010 > > Thanks for that - your email crossed with mine. I downloaded the new > lua5.1.dll and it works fine for me - but only as long as I run > LoadLibrary > to load iup.dll before running any script which has IUP in it. > Otherwise I > get the same error as before. > > Simon > > > ----- Original Message ----- > From: "Antonio Scuri" <sc...@te...> > To: "'IUP discussion list.'" <iup...@li...> > Sent: Friday, June 18, 2010 12:59 PM > Subject: Re: [Iup-users] Can't get IUP to work with Lua and Visual > Studio2010 > > > > Hi, > > > > By the time I uploaded the dll10 package for IUP, I also uploaded > for > > LuaBinaries. You can get it here: > > > > > http://sourceforge.net/projects/luabinaries/files/5.1.4/Windows%20Libra > ries/ > > lua5_1_4_Win32_dll10_lib.zip/download > > > > I had to upload a new iup dll10 package because of another change I > did, > > that left the previous package with an error in Lua. Not the one you > > mention. > > > > Your error looks more like a new iuplua51.dll using an old iup.dll. > Since > > you have Lua for Windows installed, be aware that it changes your > path to > > include its folders. > > > > If you still got problems, don't waste much time, contact me soon. > > > > Best, > > Scuri > > > > BTW, I think you do not have to wait for mirrors, SourceForge will > > redirect > > you only for the mirrors that are updated. If you still got the old > > package, > > then contact me that I'll send it directly to you. > > > >> -----Original Message----- > >> From: Simon Orde [mailto:so...@go...] > >> Sent: sexta-feira, 18 de junho de 2010 06:38 > >> To: IUP discussion list. > >> Subject: [Iup-users] Can't get IUP to work with Lua and Visual > Studio > >> 2010 > >> > >> I posted before about my struggles to get IUP working with Lua. I > >> still > >> can't get it to work, and I would really appreciate help. Just to > >> recap: I > >> am a Windows developer using Visual Studio 2010 and VC++ 10. I want > to > >> embed support for Lua in my application as a plugin scripting > language. > >> And > >> I want to support the use of IUP within plugin Lua scripts. > >> > >> Previously I linked to Lua as a static library, but following advice > >> from > >> Antonio Scuri on this list, I switched to using a DLL version of > Lua. > >> I > >> chose to use runtime dynamic linking to link to the library. I > copied > >> the > >> LUA and IUP Dlls from Lua for Windows into an appropriate folder and > >> set > >> LUA_CPATH appropriately. If I do this, I can run an ordinary Lua > >> script OK > >> but when I try to run a script using IUP it tends to crash. When I > run > >> an > >> IUP script I put > >> > >> require ("iuplua") > >> > >> at the top of the script. If I run a simple IUP-using script which > >> just > >> calls "iup.Alarm" it seems to work, the first few times I run it. > But > >> I run > >> it from a script-selection dialog box. And if I close and re-open > this > >> dialog box, and then try and run the script again, my application > >> usually > >> crashes immediately with an unhandled exception (sometimes it just > >> disappears). This doesn't happen if I run a non-IUP Lua script. > >> > >> My theory was that the problem was caused by the fact that both the > Lua > >> and > >> IUP DLLs were all built using Visual Studion 2008, and I was using > >> Visual > >> Studio 2010. More specifically, the Lua & IUP dlls were linking to > >> MSVCR80.DLL and I was linking to MSVCR100.DLL. I don't know if that > >> really > >> was the problem, but that's been the theory I've been working with > up > >> to > >> now. > >> > >> I couldn't find any lua dlls built with 2010 so I downloaded the > 5.1.4 > >> source code (the code used by Lua for Windows, as recommended on the > >> IUP > >> site), and built it myself as a Lua DLL. That seemed to work OK - I > >> could > >> use it to run Lua scripts from app. I also discovered on the IUP > site > >> a > >> file called "iup3_1_Win32_dll10_lib.zip", which I presumed contained > >> DLLs > >> built with Visual Studio 2010. So I downloaded that. > Unfortunately, > >> if I > >> copy these DLLs into the appropriate folder, I cannot run any IUP > >> scripts. > >> It doesn't crash. I get the message "error loading module 'iuplua' > >> from > >> file '...\iuplua51.dll': The specified procedure could not be > found." > >> > >> Ross Berteig suggested using Dependency Walker which I have been > doing > >> and > >> found very useful (thanks Ross). But it hasn't solved this one. > Can > >> anyone > >> suggest what I'm doing wrong and what I need to do? > >> > >> TIA > >> > >> Simon > >> > >> > >> -------------------------------------------------------------------- > --- > >> ------- > >> ThinkGeek and WIRED's GeekDad team up for the Ultimate > >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > >> lucky parental unit. See the prize list and enter to win: > >> http://p.sf.net/sfu/thinkgeek-promo > >> _______________________________________________ > >> Iup-users mailing list > >> Iup...@li... > >> https://lists.sourceforge.net/lists/listinfo/iup-users > > > > > > --------------------------------------------------------------------- > --------- > > ThinkGeek and WIRED's GeekDad team up for the Ultimate > > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > > lucky parental unit. See the prize list and enter to win: > > http://p.sf.net/sfu/thinkgeek-promo > > _______________________________________________ > > Iup-users mailing list > > Iup...@li... > > https://lists.sourceforge.net/lists/listinfo/iup-users > > > > > ----------------------------------------------------------------------- > ------- > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Iup-users mailing list > Iup...@li... > https://lists.sourceforge.net/lists/listinfo/iup-users |