need help on linking error in C code!!

Reply

Join Date: Sep 2008
Posts: 5
Reputation: ishwarverma is an unknown quantity at this point 
Solved Threads: 0
ishwarverma ishwarverma is offline Offline
Newbie Poster

need help on linking error in C code!!

 
0
  #1
Sep 11th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 305
Reputation: stilllearning has a spectacular aura about stilllearning has a spectacular aura about 
Solved Threads: 43
stilllearning stilllearning is offline Offline
Posting Whiz

Re: need help on linking error in C code!!

 
0
  #2
Sep 11th, 2008
You need to find out where the function BTRV is defined and then link to that library or object file.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: ishwarverma is an unknown quantity at this point 
Solved Threads: 0
ishwarverma ishwarverma is offline Offline
Newbie Poster

Re: need help on linking error in C code!!

 
0
  #3
Sep 11th, 2008
its defined in BTRAPI.C program,......but i dont hav any library file/.obj file for the same and compilation of this BTRAPI.C file is successful but while building it...its throwing the same error.

pls suggets....

----ishwar
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 305
Reputation: stilllearning has a spectacular aura about stilllearning has a spectacular aura about 
Solved Threads: 43
stilllearning stilllearning is offline Offline
Posting Whiz

Re: need help on linking error in C code!!

 
0
  #4
Sep 11th, 2008
Is BRTAPI.c present in the same VC++ project as your other files ReportVARS.c , PHCLUST.c and BTRVUTIL.c ?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: ishwarverma is an unknown quantity at this point 
Solved Threads: 0
ishwarverma ishwarverma is offline Offline
Newbie Poster

Re: need help on linking error in C code!!

 
0
  #5
Sep 11th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 305
Reputation: stilllearning has a spectacular aura about stilllearning has a spectacular aura about 
Solved Threads: 43
stilllearning stilllearning is offline Offline
Posting Whiz

Re: need help on linking error in C code!!

 
0
  #6
Sep 11th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: ishwarverma is an unknown quantity at this point 
Solved Threads: 0
ishwarverma ishwarverma is offline Offline
Newbie Poster

Re: need help on linking error in C code!!

 
0
  #7
Sep 11th, 2008
Can i get WBTRCALL.LIB from somewhere ?? bcoz it includes those fxns what error is reflecting here.
any idea pls suggest!!


----ishwar
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 305
Reputation: stilllearning has a spectacular aura about stilllearning has a spectacular aura about 
Solved Threads: 43
stilllearning stilllearning is offline Offline
Posting Whiz

Re: need help on linking error in C code!!

 
0
  #8
Sep 11th, 2008
Have you tried doing a search for it on your system(s) ?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: ishwarverma is an unknown quantity at this point 
Solved Threads: 0
ishwarverma ishwarverma is offline Offline
Newbie Poster

Re: need help on linking error in C code!!

 
0
  #9
Sep 11th, 2008
yep!...i hav trie on net....but its not thr??/,.......so m askin u guys.......??
if possiblee.......
well anyways ....if i get this .lib file .....ma prblm maight get solve ......i guesss!!
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 305
Reputation: stilllearning has a spectacular aura about stilllearning has a spectacular aura about 
Solved Threads: 43
stilllearning stilllearning is offline Offline
Posting Whiz

Re: need help on linking error in C code!!

 
0
  #10
Sep 11th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC