I guess VC6 doesn't like that wx2lua and lua2wx are inline functions in a header file included by multiple libs. Since I don't use DLLs myself I can see a few different things we can try.
1) Add /FORCE:MULTIPLE to the linker options http://msdn2.microsoft.com/en-us/library/72zdcz6f.aspx 2) Put the body of the functions into the cpp file and remove the inline. Slower, but smaller. 3) Maybe the problem is that WXDLLIMPEXP_WXLUA is defined when building the wxlua dll, but WXDLLIMPEXP_WXLUASOCKET is defined when building the wxluasocket dll and so that wx2lua and lua2wx are not exported for the socket lib. Maybe add this #ifdef WXMAKINGDLL_WXLUASOCKET && !defined(WXDLLIMPEXP_WXLUA) #define WXDLLIMPEXP_WXLUA #endif so that it gets the import symbol too. Note that this must be put someplace so that it gets parsed before modules/wxlua/wxluadefs.h does. ---------- I think #2 is the simplest option and at the cost of speed, maybe not having so many inline functions might be a good thing as well. Any thoughts about these? Thanks. John Labenski On 8/6/06, marcos <[EMAIL PROTECTED]> wrote: > I get this error on VC6. > > --------------------Configuration: mod_wxluasocket - Win32 DLL Release > Multilib-------------------- > Linking... > wxlua_msw26_wxlua.lib(wxlua_msw26_wxlua.dll) : error LNK2005: "class > wxString __cdecl lua2wx(char const *)" (?lua2wx@@YA?AVwxString@@[EMAIL > PROTECTED]) > already defined in wxlsock.obj > wxlua_msw26_wxlua.lib(wxlua_msw26_wxlua.dll) : error LNK2005: "class > wxCharBuffer const __cdecl wx2lua(class wxString const &)" > (?wx2lua@@YA?BVwxCharBuffer@@ABVwxString@@@Z) already defined in wxlsock.obj > wxlua_msw26_wxlua.lib(wxlua_msw26_wxlua.dll) : warning LNK4006: "class > wxString __cdecl lua2wx(char const *)" (?lua2wx@@YA?AVwxString@@[EMAIL > PROTECTED]) > already defined in wxlsock.obj; second definition ignored > wxlua_msw26_wxlua.lib(wxlua_msw26_wxlua.dll) : warning LNK4006: "class > wxCharBuffer const __cdecl wx2lua(class wxString const &)" > (?wx2lua@@YA?BVwxCharBuffer@@ABVwxString@@@Z) already defined in > wxlsock.obj; second definition ignored > Creating library ..\..\..\lib\vc_dll/wxlua_msw26_wxluasocket.lib and > object ..\..\..\lib\vc_dll/wxlua_msw26_wxluasocket.exp > ..\..\..\lib\vc_dll\wxlua_msw26_wxluasocket.dll : fatal error LNK1169: > one or more multiply defined symbols found > Error executing link.exe. > > wxlua_msw26_wxluasocket.dll - 3 error(s), 2 warning(s) > > > Help! > > -- > Marcos E. Wurzius > > > > _______________________________________________________ > Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. > Registre seu aparelho agora! > http://br.mobile.yahoo.com/mailalertas/ > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wxlua-users mailing list > Wxlua-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wxlua-users > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wxlua-users mailing list Wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users