Archives of the TeradataForum
Message Posted: Thu, 10 Nov 2011 @ 12:49:38 GMT
Subj: | | 5603: Errors encountered in compiling UDF |
|
From: | | Damodaran, Biju |
Hi All,
Compiling a simple UDF on TD 13.0.0.12 (Teradata Express 13 for Windows - demo software & Visual Studio 2008) is failing? with 5603 error
code.I am able to compile stored procedures.Also, the same function was working fine on TD 12.However I am not able to compile any UDFs after
installing TD 13.
Please find below the UDF definition:
----------plus.c--------------
void plusudf(int *a, int *b, int *result)
{? *result = *a + *b;}
-----------------------------
CREATE FUNCTION user01.plusudf(
??????? a???? INTEGER,
??????? b???? INTEGER
)RETURNS INTEGER
LANGUAGE C
NO SQL
EXTERNAL NAME 'SS!plus!C:\LCD\UDF\plus.c'
PARAMETER STYLE TD_GENERAL;
-----------------------------
Please find the error below:
----------------------------Error Log---------------------------
CREATE FUNCTION Failed. 5603: Errors encountered in compiling
UDF/XSP/UDM/UDT/JAR.
5603:? Errors encountered in compiling UDF/XSP/UDM/UDT/JAR.
5603:? Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
5603:? Copyright (C) Microsoft Corporation.? All rights reserved.
5603:?? cl /EHsc /D_CRT_SECURE_NO_DEPRECATE /DWIN32? /GS--D_USE_32BIT_TIME_T? /c
5603:? /Foplus.obj plus.c
5603:? Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 8
5603:? 0x86
5603:? Copyright (C) Microsoft Corporation.? All rights reserved.
5603:? plus.c
5603:?? cl /EHsc /D_CRT_SECURE_NO_DEPRECATE /DWIN32? /GS--D_USE_32BIT_TIME_T? /c
5603:? /FoTeradata_new_delete.obj Teradata_new_delete.cpp
5603:? Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 8
5603:? 0x86
5603:? Copyright (C) Microsoft Corporation.? All rights reserved.
5603:? Teradata_new_delete.cpp
5603:?? cl /EHsc /D_CRT_SECURE_NO_DEPRECATE /DWIN32? /GS--D_USE_32BIT_TIME_T? /c
5603:? /Fopre_plusudf.obj pre_plusudf.c
5603:? Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 8
5603:? 0x86
5603:? Copyright (C) Microsoft Corporation.? All rights reserved.
5603:? pre_plusudf.c
5603:?? cl /EHsc /D_CRT_SECURE_NO_DEPRECATE /DWIN32? /GS--D_USE_32BIT_TIME_T? /Fe
5603:? libudf_03fd_0.dll /LD plus.obj Teradata_new_delete.obj pre_plusudf.obj? @Fi
5603:? leList udf.lib msvcrt.lib
5603:? Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 8
5603:? 0x86
5603:? Copyright (C) Microsoft Corporation.? All rights reserved.
5603:? cl /link? /NODEFAULTLIB:libcmt.lib? /NODEFAULTLIB:libc.lib
5603:? Microsoft (R) Incremental Linker Version 9.00.30729.01
5603:? Copyright (C) Microsoft Corporation.? All rights reserved.
5603:? /out:libudf_03fd_0.dll
5603:? /dll
5603:? /implib:libudf_03fd_0.lib
5603:? /NODEFAULTLIB:libcmt.lib
5603:? /NODEFAULTLIB:libc.lib
5603:? plus.obj
5603:? Teradata_new_delete.obj
5603:? pre_plusudf.obj
5603:? udf.lib
5603:? msvcrt.lib
5603:???? Creating library libudf_03fd_0.lib and object libudf_03fd_0.exp
5603:? pre_plusudf.obj : error LNK2019: unresolved external symbol _plusudfrefere
5603:? nced in function _td_plusudf
5603:? libudf_03fd_0.dll : fatal error LNK1120: 1 unresolved externals
5603:? NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio9.0\V
5603:? C\bin\cl.EXE"' : return code '0x2'
5603:? Stop.
----------------------------------------------------------------
Thanks,
|