Linker problems, still cant get this working

Started by
1 comment, last by JinJo 19 years, 11 months ago
I have just started to work with LUA (which is a scripting library) and it seems really easy and powerful to use so I'm planning to do almost all my game code using it to communicate with my engine, the problem is that my program won't compile when I call a LUA function. It doesn't bother about the library being added or header file included but when I call a function it complains that things have already been defined in mscvt.dll and libc.dll (i think these are the names, I'm not at home to check). I have changed linker options (I admit I don't fully know what I'm doing with these options) and it either generates new errors or gives the same result. It is a dos program and I use sdl, OGL, FMOD also the compiler is Visual C 6. Hope someone can help. [edited by - JinJo on May 26, 2004 7:43:09 PM]
Advertisement
make sure ALL the libs you compile in are using the same runtime library, otherwise thats when problems accure such as you have.
I cant remember where the runtime library option is under VC6 however :|
I still can''t get lua to compile, i get these errors:

--------------------Configuration: Genesis - Win32 Debug--------------------
Compiling...
E_Main.cpp
Linking...
LINK : warning LNK4044: unrecognized option "/kernel32.lib"; ignored
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
libc.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCRT.dll)
libc.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCRT.dll)
libc.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
libc.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
libc.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
libc.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in libc.lib(strncpy.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fprintf already defined in libc.lib(fprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fgetc already defined in libc.lib(fgetc.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fopen already defined in libc.lib(fopen.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in libc.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _freopen already defined in libc.lib(freopen.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in libc.lib(isctype.obj)
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib "libc.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/Genesis.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

Genesis.exe - 14 error(s), 4 warning(s)


if it helps my project settings are:
project cpp options
/nologo /MD /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR"Debug/" /Fp"Debug/test.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c

project link options
user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"Debug/Genesis.pdb" /debug /machine:I386 /out:"Debug/Genesis.exe" /pdbtype:sept //kernel32.lib

This topic is closed to new replies.

Advertisement