Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/06/2008, 14:45
antonio_fregon
 
Fecha de Ingreso: junio-2007
Mensajes: 4
Antigüedad: 16 años, 10 meses
Puntos: 0
Ayuda Urgente Con El Error Lnk2001

Hola a todos:

Les comento que estoy haciendo un programa .C en Visual C++ que lo que hace es una conexión a un Informix a través de un ODBC
Las librerías que utilicé para hacer este programa fueron las siguientes:
#include <windows.h>
#include <sqlext.h>
Es necesario que la manera de compilar este programa sea a través de un archivo de tipo .mak (la verdad es que yo no sé mucho de estos archivos y creo que ahí está mi problema, pero no estoy seguro)
según yo, el programa en C, ya está listo, sin embargo al momento de ejecutar en línea de comando la siguiente instruccion:

nmake /e /a /f \archiv~1\lansa\x_win95\x_lansa\SOURCE\u_bif413.ma k SRCROOT=\ARCHIV~1\LANSA\X_WIN95\X_LANSA TRGROOT=\ARCHIV~1\LANSA\X_WIN95\X_LANSA

ME ARROJA LA SIGUIENTE SALIDA CON LOS SIGUIENTES ERRORES:

Creating library \ARCHIV~1\LANSA\X_WIN95\X_LANSA\execute\U_BIF413.l ib and object \ARCHIV~1\LANSA\X_WIN95\X_LANSA\execute\U_BIF413.e xp

U_BIF413.obj : error LNK2001: unresolved external symbol _SQLGetData@24
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLFetch@4
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLNumericResultCols@8
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLExecDirec@12
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLConnect@28
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLSetConnectOption@12
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLAllocConnect@8
U_BIF413.obj : error LNK2001: unresolved external symbol _SQLAllocEnv@4
\ARCHIV~1\LANSA\X_WIN95\X_LANSA\execute\U_BIF413.d ll : fatal error LNK1120: 9 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop

DE HECHO SI SE FIJAN, LOS ERRORES EN SI, NO ME LOS MARCA POR EL HECHO DE COMPILAR EL PROGRAMA, SINO QUE ME LOS MARCA EN ARCHIVO U_BIF413.obj (que en ese momento se está creando)

el archivo de tipo .mak que estoy utilizando me lo pasaron y su contenido es el siguiente:

COFLAGS=/c /J /G6 /GD /MD /Zp1 /I"$(MSDEVDIR)\include"

# The defines from WIN32_LEAN_AND_MEAN and beyond cause the compile time to be reduced.
#
WIN32SPEED=/DWIN32_LEAN_AND_MEAN
X_LANSA=/DX_W95 /DX_LX /DX_MSVC
#
# The X_16BIT_COMPILER define is a misnoma, it just causes the source code
# to be conditionally compiled in small chunks to get around compiler
# limitations. Hence the define has been named "SPLIT".
# This will probably not be needed for MSVC.
#
SPLIT=/DX_32
#
# Bring them altogether...
DEFINES=$(COFLAGS) $(X_LANSA) $(SPLIT) $(WIN32SPEED)

# Add the debugger Options...


!IFDEF X_DEBUG

# Visual C++ Debugging
CFL=/Od /Zi /W3 /DX_DEBUG $(DEFINES)

!ELSE

# RDML/X Debug. NO MSVC Debugging!
CFL=/O1 /W3 $(DEFINES)
!ENDIF

#************************************************* *******************
#* Common Variables
#************************************************* *******************
BIFNAM=U_BIF413
OBJDIR=$(TRGROOT)\object
INCDIR=$(SRCROOT)\source
DLLDIR=$(TRGROOT)\execute
CURRSRCDIR=$(SRCROOT)\source
PRIMSRCDIR=$(SRCROOT)\source
IMPDIR=$(TRGROOT)\execute
PCINC=$(SRCROOT)\..\..\include
PCINCW=$(SRCROOT)\..\..\include\win
COMPINC=$(SRCROOT)\..\..\lp\src

#************************************************* *******************
#* Linker Debugger Flags
#************************************************* *******************
!IFDEF X_DEBUG

# Visual C++ Debugging
X_LINKER_DEBUG=/DEBUG /DEBUGTYPE:CV

!ELSE

# NO MSVC Debugging!
X_LINKER_DEBUG=/nologo

!ENDIF

#************************************************* *******************
#* Link Output File
#************************************************* *******************
$(DLLDIR)\$(BIFNAM).DLL: $(IMPDIR)\X_FUNMS.LIB \
$(IMPDIR)\X_PDFMS.LIB \
$(IMPDIR)\X_UIMMS.LIB \
$(IMPDIR)\X_PIMMS.LIB \
$(IMPDIR)\X_DBMMS.LIB \
$(IMPDIR)\X_BIFMS.LIB \
$(CURRSRCDIR)\$(BIFNAM).DEF \
$(OBJDIR)\$(BIFNAM).OBJ
link $(X_LINKER_DEBUG) @<<
/MACHINE:IX86
/COMMENT:"LANSA User Defined BIF"
"$(OBJDIR)\$(BIFNAM).obj"
/OUT:"$(DLLDIR)\$(BIFNAM).dll"
/DEF:"$(CURRSRCDIR)\$(BIFNAM).DEF"
"$(DLLDIR)\x_funms.lib"
"$(DLLDIR)\x_pdfms.lib"
"$(DLLDIR)\x_uimms.lib"
"$(DLLDIR)\x_pimms.lib"
"$(DLLDIR)\x_dbmms.lib"
"$(DLLDIR)\x_bifms.lib"
"user32.lib"
/DLL
<<

#************************************************* *******************
#* Modules
#************************************************* *******************
$(OBJDIR)\$(BIFNAM).OBJ: $(PRIMSRCDIR)\$(BIFNAM).C
cl $(CFL) /DX_MODULE_COMPONENT_MAIN /I"$(INCDIR)" /I"$(PCINC)" /Fo"$(OBJDIR)\$(BIFNAM).OBJ" "$(PRIMSRCDIR)\$(BIFNAM).C"



ME PODRÍAN AYUDAR A ENCONTRAR LA SOLUCIÓN A MI PROBLEMA?
DE ANTEMANO MUCHAS GRACIAS A TODOS