no Dinput.lib (msvs2008)
RSwar01

according to the setup instruction from the allegro wiki for static linking
i have to include:

alleg_s.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib

some of the files were missing because i didn't had DirextX SDK

however after downloading the DirextX SDK (dxsdk_november2007.exe) there is still 1 file missing: dinput.lib

what do i need to do to get static linking to work? ???

Milan Mimica

MS removed some libs from recent DXSDK. Use dx70_min.zip from http://www.liballeg.org/wip.html

RSwar01

solves the problem of the missing files i now get 21 errors :(

Any ideas on how to solve them?

1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _abort already defined in LIBCMT.lib(abort.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(getenv.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fopen already defined in LIBCMT.lib(fopen.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: ___iob_func already defined in LIBCMT.lib(_file.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strtod already defined in LIBCMT.lib(strtod.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _memmove already defined in LIBCMT.lib(memmove.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strtol already defined in LIBCMT.lib(strtol.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strpbrk already defined in LIBCMT.lib(strpbrk.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __wopen already defined in LIBCMT.lib(wopen.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info: :type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info :: operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __strdup already defined in LIBCMT.lib(strdup.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __open already defined in LIBCMT.lib(open.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __lseek already defined in LIBCMT.lib(lseek.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __write already defined in LIBCMT.lib(write.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __read already defined in LIBCMT.lib(read.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __close already defined in LIBCMT.lib(close.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>C:\Documents and Settings\Administrator\Mijn documenten\Visual Studio 2005\Projects\RPG\Static Releas\RPG.exe : fatal error LNK1169: one or more multiply defined symbols found
1>RPG - 21 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

torhu

Are you linking with alleg_s_crt.lib? alleg_s.lib wants msvcr80.dll, so you can't combine that with libcmt.lib.

RSwar01

I don't now

I'm following the instructions from the allegro wiki
http://wiki.allegro.cc/Visual_C%2B%2B_Express_2005

alleg_s.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib

are the only libraries under additional dependencies

after some testing:

Static Release the file doesn't work on different pc's

Static Release, Static Runtime the errors

Milan Mimica

You you are using "Static Release, Static Runtime" then you have to link against alleg_s_crt.lib. And set a option in C/C++ -> Code Generation -> Runtime Library to (MT).

(edited)

RSwar01

I'm using the MT option (its the different between he Static Release and Static Release options)

and what do you mean with:
then you have to link against alleg_s_crt.lib

torhu

Replace this:
alleg_s.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib

with this:
alleg_s_crt.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib

RSwar01

It works.

finally I'm ably to use my games on computers witout allegro or vs2008 instold

thanks for the help

Thread #594676. Printed from Allegro.cc