php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6834 LIBCMT.lib(setlocal.obj) : error LNK2005: _setlocale already defined in
Submitted: 2000-09-21 15:43 UTC Modified: 2000-11-11 15:49 UTC
From: apseel at yahoo dot co dot kr Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.2 OS: windows 2000 server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: apseel at yahoo dot co dot kr
New email:
PHP Version: OS:

 

 [2000-09-21 15:43 UTC] apseel at yahoo dot co dot kr
I first compiled ...
  used MSVC 6.0.

--------------------Configuration: php4dll - Win32 Release--------------------
Compiling...
configuration-parser.c
configuration-scanner.c
configuration-scanner.c(721) : warning C4102: 'find_rule' : unreferenced label
configuration-scanner.c(1499) : warning C4273: 'isatty' : inconsistent dll linkage.  
.
.
.
safe_mode.c
SAPI.c
D:\Public\apseel\Wizmax\php\sc\php-4.0.2\main\SAPI.c(250) : warning C4018: '>=' : signed/unsigned mismatch
strlcat.c
strlcpy.c
.
.
.
dir.c
dl.c
D:\Public\apseel\Wizmax\php\sc\php-4.0.2\ext\standard\dl.c(91) : warning C4005: 'IS_SLASH' : macro redefinition
        ..\main\php_virtual_cwd.h(44) : see previous definition of 'IS_SLASH'
dns.c
D:\PHP\INCLUDE\arpa/inet.h(74) : warning C4005: 'FD_SETSIZE' : macro redefinition
        D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(46) : see previous definition of 'FD_SETSIZE'
D:\PHP\INCLUDE\portability.h(382) : warning C4273: 'getenv' : inconsistent dll linkage.  dllexport assumed.
D:\PHP\INCLUDE\portability.h(745) : warning C4273: 'strdup' : inconsistent dll linkage.  dllexport assumed.
exec.c
.
.
.
maketables.c
pcre.c
D:\Public\apseel\Wizmax\php\sc\php-4.0.2\ext\pcre\pcrelib\pcre.c(174) : warning C4273: 'pcre_malloc' : inconsistent dll linkage.  dllexport assumed.
D:\Public\apseel\Wizmax\php\sc\php-4.0.2\ext\pcre\pcrelib\pcre.c(175) : warning C4273: 'pcre_free' : inconsistent dll linkage.  dllexport assumed.
study.c
COM.c
.
.
.
LIBCMT.lib(setlocal.obj) : error LNK2005: _setlocale already defined in MSVCRT.lib(MSVCRT.dll)
LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRT.lib(MSVCRT.dll)
LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRT.lib(MSVCRT.dll)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __get_osfhandle already defined in MSVCRT.lib(MSVCRT.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCRT.dll)
LIBCMT.lib(strftime.obj) : error LNK2005: _strftime already defined in MSVCRT.lib(MSVCRT.dll)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(tzset.obj) : error LNK2005: __tzset already defined in MSVCRT.lib(MSVCRT.dll)
LIBCMT.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRT.lib(MSVCRT.dll)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __strdup already defined in LIBCMT.lib(strdup.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __strnicmp already defined in LIBCMT.lib(strnicmp.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __close already defined in LIBCMT.lib(close.obj)
LIBCMT.lib(setlocal.obj) : warning LNK4006: _setlocale already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBCMT.lib(tolower.obj) : warning LNK4006: _tolower already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBCMT.lib(dosmap.obj) : warning LNK4006: __errno already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBCMT.lib(osfinfo.obj) : warning LNK4006: __get_osfhandle already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBCMT.lib(crt0dat.obj) : warning LNK4006: _exit already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBCMT.lib(strftime.obj) : warning LNK4006: _strftime already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xc_z already defined in MSVCRT.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xc_a already defined in MSVCRT.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xi_z already defined in MSVCRT.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xi_a already defined in MSVCRT.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(tzset.obj) : warning LNK4006: __tzset already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBCMT.lib(getenv.obj) : warning LNK4006: _getenv already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __strdup already defined in LIBCMT.lib(strdup.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __strnicmp already defined in LIBCMT.lib(strnicmp.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __stricmp already defined in LIBCMT.lib(stricmp.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __close already defined in LIBCMT.lib(close.obj); second definition ignored
   Creating library ..\Release/php4nts.lib and object ..\Release/php4nts.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4049: locally defined symbol "_pcre_free" imported
LINK : warning LNK4049: locally defined symbol "_pcre_malloc" imported
resolv.lib(res_send.obj) : error LNK2001: unresolved external symbol _writev
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
..\Release\php4nts.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-11 15:49 UTC] dbeu@php.net
don't mix up the different c runtime dlls!
you have one lib linked against libcmt (/MT(d)) and wanted to link them against msvcrt (/MD(d)), don't do that.
i can't see any code in the cvs which uses libcmt (anymore?), so closing.
i'd also suggest that you load the php4ts workspace to compile the threadsafe version of php.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 13:00:01 2026 UTC