lua-users home
lua-l archive

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


Please help.

I am trying to embed lua in a game I'm helping to create, that uses DirectX9, and MFC

Using Visual Studio.Net 2002 everything compiles fine but I am getting linker errors like

LNK2005 ( ____argc already defined in libcmtd.lib(crt0dat.obj) )

LNK1169 (one or more multiply defined symbols found)

I found this article at Microsoft's support site

(http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q148/6/52.asp&NoWebContent=1)

and I've tried everything it says to do. I've also tried using the /FORCE MULTIPLE option for the linker

but the game does not run correctly when using that option.

I've also tried setting the linker to ignore certain libraries but that doesn't work either. 

I would really appreciate any help anyone could provide with this.

Thanks in advance.

-Derek- 

I have included the build output text below

----------------------------------------------------------------------------

Linking...

Searching libraries

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\dsound.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\dinput8.lib:

Searching C:\DXSDK9\Lib\dxerr9.lib:

Searching C:\DXSDK9\Lib\d3dx9dt.lib:

Searching C:\DXSDK9\Lib\d3d9.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\d3dxof.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\dxguid.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\winmm.lib:

Searching C:\Program Files\lua-5.0\lib\laux_debug.lib:

Searching C:\Program Files\lua-5.0\lib\lua_debug.lib:

Searching \DXSDK9\Lib\DxErr9.lib:

Searching \DXSDK9\Lib\d3dx9dt.lib:

Searching \DXSDK9\Lib\d3d9.lib:

Searching \Program Files\lua-5.0\lib\laux_debug.lib:

Searching \Program Files\lua-5.0\lib\lua_debug.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\atlmfc\lib\nafxcwd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\libcmtd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\msimg32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\comdlg32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\winspool.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\advapi32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\shell32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\comctl32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\shlwapi.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\uuid.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\oledlg.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\ole32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\oleaut32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\urlmon.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\OLDNAMES.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\libcpmtd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\LIBCD.lib:

LIBCD.lib(crt0dat.obj) : error LNK2005: __cinit already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: _exit already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __exit already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: ___crtExitProcess already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __C_Exit_Done already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __C_Termination_Done already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __exitflag already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __wpgmptr already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __pgmptr already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: ___winitenv already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __wenviron already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: ___initenv already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __environ already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: ___wargv already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: ___argv already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: ___argc already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __winminor already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __winmajor already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __winver already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __osver already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __osplatform already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(crt0dat.obj) : error LNK2005: __umaskval already defined in libcmtd.lib(crt0dat.obj)

LIBCD.lib(cfout.obj) : error LNK2005: ___dtold already defined in libcmtd.lib(cfout.obj)

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\atlmfc\lib\atlsd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\wininet.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\oleacc.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\dsound.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\dinput8.lib:

Searching C:\DXSDK9\Lib\dxerr9.lib:

Searching C:\DXSDK9\Lib\d3dx9dt.lib:

Searching C:\DXSDK9\Lib\d3d9.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\d3dxof.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\prerelease\dxguid.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\winmm.lib:

Searching C:\Program Files\lua-5.0\lib\laux_debug.lib:

Searching C:\Program Files\lua-5.0\lib\lua_debug.lib:

Searching \DXSDK9\Lib\DxErr9.lib:

Searching \DXSDK9\Lib\d3dx9dt.lib:

Searching \DXSDK9\Lib\d3d9.lib:

Searching \Program Files\lua-5.0\lib\laux_debug.lib:

Searching \Program Files\lua-5.0\lib\lua_debug.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\atlmfc\lib\nafxcwd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\libcmtd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\msimg32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\comdlg32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\winspool.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\advapi32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\shell32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\comctl32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\shlwapi.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\uuid.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\oledlg.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\ole32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\oleaut32.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\urlmon.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\OLDNAMES.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\libcpmtd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\lib\LIBCD.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\atlmfc\lib\atlsd.lib:

Searching C:\Program Files\Microsoft Visual Studio NET\Vc7\PlatformSDK\lib\wininet.lib:

Finished searching libraries

LINK : warning LNK4098: defaultlib 'LIBCD' conflicts with use of other libs; use /NODEFAULTLIB:library

.\Debug/N2.exe : fatal error LNK1169: one or more multiply defined symbols found