I'm trying to rebuild 32-bit version Oracle DLLs using mkdbs.bat
My environment is as Follows:
I'm using Ca gen 8.6 on Windows 7 64-bit professional,
Visual studio 2013, and Oracle 11g 32-bit
%ORACLE_HOME% environment variable is set to the correct location.
I edited mkdbs.bat to set the compiler as follows:
set COMPILER_VER=VS120
When I run
mkdbs.bat oracle11
I got an error as follows:
********************************************************************
MKDBS: CA Gen DBMS DLL Rebuilder
MKDBS: Saving original database dll in subdirectory
MKDBS: Rebuilding the database loader prior to rebuilding the database dll
MAKEDDL: CA Gen DDL Loader Support
MAKEDDL: Saving original database loader in subdirectory
MAKEDDL: Making new version of database loader
BUILDNO.BAT: CA Gen BUILDNO.H update file
rc /dtioraddl /fotioraddl.res /I"C:\Gen86\gen\version" /I"C:\Gen86\gen\version" "C:\Gen86\gen\version\generic.rc"
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE\afxres.h(17) : fatal error RC1015: cannot open include file 'winres.h'.
MAKEDDL: MAKE Failed to Complete
MKDBS: Returning to mkdbs.bat
MKDBS: Compiling the database dll modules
tiroconn.c
tirora.c
tirora.c(305) : warning C4273: 'getenv' : inconsistent dll linkage
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdlib.h(462) : see previous definition of 'getenv'
MKDBS: Relinking the database dll
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE\afxres.h(17) : fatal error RC1015: cannot open include file 'winres.h'.LINK : fatal error LNK1181: cannot open input file 'orasql11.lib'
MKDBS: Link of aecoran.dll failed
MKDBS: Possible cause could be improper setting of the LIB environment variable.
ECHO is off.
********************************************************************
when I searched for "winres.h", I found it located in
"C:\Program Files (x86)\Windows Kits\8.0\Include\um"
I edited mkdbs.bat to include the folder above as follows:
set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Windows Kits\8.0\Include\um
Run
mkdbs.bat oracle11
again, I got another error as follows
********************************************************************
MKDBS: CA Gen DBMS DLL Rebuilder
MKDBS: Saving original database dll in subdirectory
MKDBS: Rebuilding the database loader prior to rebuilding the database dll
MAKEDDL: CA Gen DDL Loader Support
MAKEDDL: Saving original database loader in subdirectory
MAKEDDL: Making new version of database loader
BUILDNO.BAT: CA Gen BUILDNO.H update file
rc /dtioraddl /fotioraddl.res /I"C:\Gen86\gen\version" /I"C:\Gen86\gen\version" "C:\Gen86\gen\version\generic.rc"
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Windows Kits\8.0\Include\um\dlgs.h(1) : fatal error RC1015: cannot open include file 'winapifamily.h'.
MAKEDDL: MAKE Failed to Complete
MKDBS: Returning to mkdbs.bat
MKDBS: Compiling the database dll modules
tiroconn.c
tirora.c
tirora.c(305) : warning C4273: 'getenv' : inconsistent dll linkage
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdlib.h(462) : see previous definition of 'getenv'
MKDBS: Relinking the database dll
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Windows Kits\8.0\Include\um\dlgs.h(1) : fatal error RC1015: cannot open include file 'winapifamily.h'.LINK : fatal error LNK1181: cannot open input file 'orasql11.lib'
MKDBS: Link of aecoran.dll failed
MKDBS: Possible cause could be improper setting of the LIB environment variable.
ECHO is off.
********************************************************************
when I searched for 'winapifamily.h' I found it located in
"C:\Program Files (x86)\Windows Kits\8.0\Include\shared"
I edited mkdbs.bat to include the folder above as follows:
set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Windows Kits\8.0\Include\um
set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Windows Kits\8.0\Include\shared
Run
mkdbs.bat oracle11
again, I got another error as follows
********************************************************************
MKDBS: CA Gen DBMS DLL Rebuilder
MKDBS: Saving original database dll in subdirectory
MKDBS: Rebuilding the database loader prior to rebuilding the database dll
MAKEDDL: CA Gen DDL Loader Support
MAKEDDL: Saving original database loader in subdirectory
MAKEDDL: Making new version of database loader
BUILDNO.BAT: CA Gen BUILDNO.H update file
rc /dtioraddl /fotioraddl.res /I"C:\Gen86\gen\version" /I"C:\Gen86\gen\version" "C:\Gen86\gen\version\generic.rc"
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
1 file(s) copied.
proc iname=tioraddl.sc oname=tioraddl.c include=C:\osama\product\11.2.0\dbhome_1\precomp\public mode=ANSI sqlcheck=syntax ltype=none > tioraddl.out 2>&1
cl /c /Od /W3 /MD /nologo /FD /EHa -I"C:\Gen86\gen\ddl" -IC:\osama\product\11.2.0\dbhome_1\precomp\public -Fotioraddl.obj /DMSC /DWIN32 /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /D_MBCS tioraddl.c
tioraddl.c
cl tioraddl.res tioraddl.obj tidbms.lib tidbms.lib user32.lib C:\osama\product\11.2.0\dbhome_1\precomp\lib\orasql11.lib /link /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /NOLOGO /DYNAMICBASE /NXCOMPAT /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /MACHINE:X86 /out:tioraddl.exe
LINK : fatal error LNK1181: cannot open input file 'user32.lib'
MAKEDDL: MAKE Failed to Complete
MKDBS: Returning to mkdbs.bat
MKDBS: Compiling the database dll modules
tiroconn.c
tirora.c
tirora.c(305) : warning C4273: 'getenv' : inconsistent dll linkage
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdlib.h(462) : see previous definition of 'getenv'
MKDBS: Relinking the database dll
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
LINK : fatal error LNK1181: cannot open input file 'orasql11.lib'
MKDBS: Link of aecoran.dll failed
MKDBS: Possible cause could be improper setting of the LIB environment variable.
ECHO is off.
********************************************************************
Now It's a linker error
when I searched for 'user32.lib' I found it located in
"C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86"
I edited mkdbs.bat to include the folder above as follows:
set LIB=%LIB%;C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86
Run
mkdbs.bat oracle11
again, I got another error as follows:
********************************************************************
MKDBS: CA Gen DBMS DLL Rebuilder
MKDBS: Saving original database dll in subdirectory
MKDBS: Rebuilding the database loader prior to rebuilding the database dll
MAKEDDL: CA Gen DDL Loader Support
MAKEDDL: Saving original database loader in subdirectory
MAKEDDL: Making new version of database loader
BUILDNO.BAT: CA Gen BUILDNO.H update file
rc /dtioraddl /fotioraddl.res /I"C:\Gen86\gen\version" /I"C:\Gen86\gen\version" "C:\Gen86\gen\version\generic.rc"
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
1 file(s) copied.
proc iname=tioraddl.sc oname=tioraddl.c include=C:\osama\product\11.2.0\dbhome_1\precomp\public mode=ANSI sqlcheck=syntax ltype=none > tioraddl.out 2>&1
cl /c /Od /W3 /MD /nologo /FD /EHa -I"C:\Gen86\gen\ddl" -IC:\osama\product\11.2.0\dbhome_1\precomp\public -Fotioraddl.obj /DMSC /DWIN32 /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /D_MBCS tioraddl.c
tioraddl.c
cl tioraddl.res tioraddl.obj tidbms.lib tidbms.lib user32.lib C:\osama\product\11.2.0\dbhome_1\precomp\lib\orasql11.lib /link /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /NOLOGO /DYNAMICBASE /NXCOMPAT /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /MACHINE:X86 /out:tioraddl.exe
MSVCRT.lib(MSVCR120.dll) : error LNK2005: _printf already defined in tidbms.lib(tidbms.obj)
MSVCRT.lib(MSVCR120.dll) : error LNK2005: _sprintf already defined in tidbms.lib(tidbms.obj)
tidbms.lib(tidbms.obj) : error LNK2019: unresolved external symbol __imp____acrt_iob_func referenced in function _printf
tidbms.lib(tidbms.obj) : error LNK2019: unresolved external symbol __imp____stdio_common_vfprintf referenced in function __vfprintf_l
tidbms.lib(tidbms.obj) : error LNK2019: unresolved external symbol __imp____stdio_common_vsprintf referenced in function __vsnprintf_l
tioraddl.exe : fatal error LNK1120: 3 unresolved externals
MAKEDDL: MAKE Failed to Complete
MKDBS: Returning to mkdbs.bat
MKDBS: Compiling the database dll modules
tiroconn.c
tirora.c
tirora.c(305) : warning C4273: 'getenv' : inconsistent dll linkage
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdlib.h(462) : see previous definition of 'getenv'
MKDBS: Relinking the database dll
Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.20789Copyright (C) Microsoft Corporation. All rights reserved.
LINK : fatal error LNK1181: cannot open input file 'orasql11.lib'
MKDBS: Link of aecoran.dll failed
MKDBS: Possible cause could be improper setting of the LIB environment variable.
ECHO is off.
*********************************************************************************
Anybody have an idea to solve this problem?
Thanks