| | |
need help on linking error in C code!!
![]() |
•
•
Join Date: Sep 2008
Posts: 5
Reputation:
Solved Threads: 0
Hi guys,
i am having some problm while building my C code through VC++6.0. The following error i am getting while building:
--------------------Configuration: ReportVARS - Win32 Debug--------------------
Linking...
ReportVARS.obj : error LNK2001: unresolved external symbol _BTRV@24
PHCLUST.OBJ : error LNK2001: unresolved external symbol _BTRV@24
BTRVUTIL.OBJ : error LNK2001: unresolved external symbol _BTRV@24
Debug/ReportVARS.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
pls help me if any to get it resolve.
-----ishwar
i am having some problm while building my C code through VC++6.0. The following error i am getting while building:
--------------------Configuration: ReportVARS - Win32 Debug--------------------
Linking...
ReportVARS.obj : error LNK2001: unresolved external symbol _BTRV@24
PHCLUST.OBJ : error LNK2001: unresolved external symbol _BTRV@24
BTRVUTIL.OBJ : error LNK2001: unresolved external symbol _BTRV@24
Debug/ReportVARS.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
pls help me if any to get it resolve.
-----ishwar
•
•
Join Date: Sep 2008
Posts: 5
Reputation:
Solved Threads: 0
yes....i have included this file in ma proj.....thn after its throwing this error::
Deleting intermediate files and output files for project 'ReportVARS - Win32 Debug'.
--------------------Configuration: ReportVARS - Win32 Debug--------------------
Compiling...
ReportVARS.c
VALIDATE.C
ALLOC.C
BASENAME.C
BTRVUTIL.C
COBLUTIL.C
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(98) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(116) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(191) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(208) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
CPPPORT.C
DATE.C
FATAL.C
GETOPT.C
LEAPYEAR.C
LOG_DIAG.C
LOWERCAS.C
MISC.C
MONTHDAY.C
PHCLUST.C
REPORT.C
SKIPWHIT.C
STATUS.C
TODAY.C
TRUNC.C
UPPERCAS.C
BTRAPI.C
Linking...
BTRAPI.OBJ : error LNK2001: unresolved external symbol _WBRQSHELLINIT@4
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALL@28
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALLID@32
Debug/ReportVARS.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
PLS LOOK INTO THIS..
;---ISHWAR
Deleting intermediate files and output files for project 'ReportVARS - Win32 Debug'.
--------------------Configuration: ReportVARS - Win32 Debug--------------------
Compiling...
ReportVARS.c
VALIDATE.C
ALLOC.C
BASENAME.C
BTRVUTIL.C
COBLUTIL.C
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(98) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(116) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(191) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(208) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
CPPPORT.C
DATE.C
FATAL.C
GETOPT.C
LEAPYEAR.C
LOG_DIAG.C
LOWERCAS.C
MISC.C
MONTHDAY.C
PHCLUST.C
REPORT.C
SKIPWHIT.C
STATUS.C
TODAY.C
TRUNC.C
UPPERCAS.C
BTRAPI.C
Linking...
BTRAPI.OBJ : error LNK2001: unresolved external symbol _WBRQSHELLINIT@4
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALL@28
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALLID@32
Debug/ReportVARS.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
PLS LOOK INTO THIS..
;---ISHWAR
•
•
Join Date: Oct 2007
Posts: 305
Reputation:
Solved Threads: 43
Well since I don't have access to your code files, I don't know where all the functions are defined.
The first rule of being able to link correctly is that, you need to resolve ALL of your function references.
As you can clearly see you have not resolved the references to WBRQSHELLINIT, BTRCALL and BTRCALLID which are defined in BTRAPI.c
I would suggest for the sake of simplicity that you include all the necessary files in your current project.
Another option is to create a static library and put the source files for the functions you are using in there, compile that and link it to your main code.
The first rule of being able to link correctly is that, you need to resolve ALL of your function references.
As you can clearly see you have not resolved the references to WBRQSHELLINIT, BTRCALL and BTRCALLID which are defined in BTRAPI.c
I would suggest for the sake of simplicity that you include all the necessary files in your current project.
Another option is to create a static library and put the source files for the functions you are using in there, compile that and link it to your main code.
•
•
Join Date: Oct 2007
Posts: 305
Reputation:
Solved Threads: 43
If its not a standard windows library file, you need to know what software or package its in the context of, and locate it accordingly. Just finding that one library may not fix your link errors.. there may be other symbols in there which may be referenced in other libraries related to the software or package.
![]() |
Similar Threads
- C++ linking problem (C++)
- Linking Error (C++)
- Linking Error... (C++)
- Linking error messages when building program (C)
- Linking Error In C (C)
Other Threads in the C Forum
- Previous Thread: function in c...
- Next Thread: searching strings from the infile.
| Thread Tools | Search this Thread |
#include * adobe ansi api array asterisks binarysearch centimeter changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc csyntax database directory dynamic execv feet fgets file fork function getlasterror getlogicaldrivestrin givemetehcodez global grade gtkgcurlcompiling gtkwinlinux hacking hardware highest histogram ide include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue number odf opendocumentformat opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing segmentationfault sequential single socket socketprograming standard string systemcall threads turboc unix user voidmain() wab whythiscodecausesegmentationfault windows.h windowsapi





