Can someone help me build D2X-XL from source?
Posted: Fri Aug 04, 2006 9:39 pm
I'm trying to build D2X-XL in Visual C++ 7. I have four goals, to build the projects d2x and d2xgl, using both the Debug and Release configs. In each goal, I'm having a problem.
d2xgl, Debug
Everything compiles. But when it links, I get this error:
I've also noticed that if I define the entry point as a function that exists in inferno.c, such as MainLoop, it will finish linking, but the *correct* entry point function seems to be which is also located in inferno.c. But I have no idea what I need to type in as the entry point to use this.
My linker command line parameters look like this:
d2xgl, Release
Everything compiles, I get these linking errors:
My linker command line parameters look like this:
d2x, Debug
I get a *ton* of compile errors. The first few look like this:
My compiler command line parameters look like this:
d2x, Release
I *think* the compile errors I get are the same as the ones I get in the Debug config.
My compiler command line parameters look like this:
Thanks in advance for help in solving any of these problems.
d2xgl, Debug
Everything compiles. But when it links, I get this error:
Code: Select all
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
Code: Select all
int _CDECL_ main (int argc, char *argv[])
My linker command line parameters look like this:
Code: Select all
/OUT:\"d:\\games\\descent\\d2\\d2x-xl-dbg.exe\" /INCREMENTAL /NOLOGO /LIBPATH:\"D:\\visualstudionet\\Vc7\\PlatformSDK\\Lib\" /LIBPATH:\"D:\\cppproj\\SDL-1.2.10\\VisualC\\SDL\\Debug\" /LIBPATH:\"D:\\cppproj\\SDL_mixer-1.2.7\\VisualC\\Debug\" /DEBUG /PDB:\".\\Debug/d2x-xl-dbg.pdb\" /SUBSYSTEM:WINDOWS odbc32.lib odbccp32.lib wsock32.lib opengl32.lib glu32.lib winmm.lib sdl.lib sdl_mixer.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \\cppproj\\d2x\\VisualC\\libmve\\Debug\\libmve.lib \"\\cppproj\\SDL-1.2.10\\VisualC\\SDL\\Debug\\SDL.lib\" \"\\cppproj\\SDL_mixer-1.2.7\\VisualC\\Debug\\SDL_mixer.lib\" /MACHINE:I386
d2xgl, Release
Everything compiles, I get these linking errors:
Code: Select all
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _fprintf already defined in LIBCMT.lib(fprintf.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _fopen already defined in LIBCMT.lib(fopen.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(sprintf.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(getenv.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _strstr already defined in LIBCMT.lib(strstr.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _strncpy already defined in LIBCMT.lib(strncpy.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _atoi already defined in LIBCMT.lib(atox.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _atof already defined in LIBCMT.lib(atof.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _strchr already defined in LIBCMT.lib(strchr.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _strtol already defined in LIBCMT.lib(strtol.obj)
MSVCRT.lib(MSVCR70.dll) : error LNK2005: _vsprintf already defined in LIBCMT.lib(vsprintf.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCMT.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
Code: Select all
/OUT:\"d:\\games\\descent\\d2\\d2x-xl.exe\" /INCREMENTAL:NO /NOLOGO /LIBPATH:\"D:\\visualstudionet\\Vc7\\PlatformSDK\\Lib\" /LIBPATH:\"D:\\cppproj\\SDL_mixer-1.2.7\\VisualC\\Release\" /PDB:\".\\Release/d2x-xl.pdb\" /SUBSYSTEM:WINDOWS odbc32.lib odbccp32.lib wsock32.lib opengl32.lib glu32.lib winmm.lib sdl.lib sdl_mixer.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \\cppproj\\d2x\\VisualC\\libmve\\Release\\libmve.lib \"\\cppproj\\SDL-1.2.10\\lib\\SDL.lib\" \"\\cppproj\\SDL_mixer-1.2.7\\VisualC\\Release\\SDL_mixer.lib\" /MACHINE:I386
d2x, Debug
I get a *ton* of compile errors. The first few look like this:
Code: Select all
d:\\cppproj\\d2x\\texmap\\tmapflat.c(98) : error C2065: 'gameStates' : undeclared identifier
d:\\cppproj\\d2x\\texmap\\tmapflat.c(98) : error C2224: left of '.render' must have struct/union type
d:\\cppproj\\d2x\\texmap\\tmapflat.c(101) : error C2224: left of '.render' must have struct/union type
d:\\cppproj\\d2x\\texmap\\tmapflat.c(304) : error C2440: 'function' : cannot convert from 'grs_color' to 'int'
d:\\cppproj\\d2x\\texmap\\tmapflat.c(304) : warning C4024: 'texture_map_flat' : different types for formal and actual parameter 2
scanline.c
Code: Select all
/Od /I \"..\\..\\include\" /I \"..\\..\\main\" /I \"..\\..\\arch\\include\" /I \"..\\..\\arch\\win32\\include\" /I \"..\\..\\3d\" /I \"..\\..\\..\\..\\sdl\\SDL-1.2.10\\include\" /D \"_DEBUG\" /D \"WIN32\" /D \"_WINDOWS\" /D \"NO_ASM\" /D \"NMONO\" /D \"PIGGY_USE_PAGING\" /D \"NEWDEMO\" /D \"SDL_INPUT\" /D \"SDL_VIDEO\" /D \"FAST_FILE_IO\" /D \"CONSOLE\" /D \"NETWORK\" /D \"NATIVE_IPX\" /D \"_MBCS\" /FD /EHsc /RTC1 /MDd /Fp\".\\Debug/d2x.pch\" /Fo\".\\Debug/\" /Fd\".\\Debug/\" /W3 /nologo /c /ZI
d2x, Release
I *think* the compile errors I get are the same as the ones I get in the Debug config.
My compiler command line parameters look like this:
Code: Select all
/O2 /Ob1 /I \"..\\..\\include\" /I \"..\\..\\main\" /I \"..\\..\\arch\\include\" /I \"..\\..\\arch\\win32\\include\" /I \"..\\..\\3d\" /I \"..\\..\\..\\..\\sdl\\SDL-1.2.10\\include\" /D \"NDEBUG\" /D \"RELEASE\" /D \"WIN32\" /D \"_WINDOWS\" /D \"NO_ASM\" /D \"NMONO\" /D \"PIGGY_USE_PAGING\" /D \"NEWDEMO\" /D \"SDL_INPUT\" /D \"SDL_VIDEO\" /D \"FAST_FILE_IO\" /D \"CONSOLE\" /D \"NETWORK\" /D \"NATIVE_IPX\" /D \"_MBCS\" /GF /FD /EHsc /MD /Gy /YX\"stdafx.h\" /Fp\".\\Release/d2x.pch\" /Fo\".\\Release/\" /Fd\".\\Release/\" /W3 /nologo /c