Author |
Message |
Chris Dohert #1 / 8
|
Unresolved external ... referenced from ...
All, I am trying to build a rather simple C app using Borland 6. (1 source file which makes reference to 4 Sybase .h files.) I am able to compile without any problems, but when I try to link it I get this error: [Linker Error] Unresolved external '_dbfcmd' referenced from C:\DBTEST\DBTEST2.OBJ I make numerous calls to a function called 'dbfcmd', not '_dbfcmd'. In fact there is not a file anywhere on my entire hardrive that contains a call to '_dbfcmd'. I have a .lib file that when I run tlib on it, shows the function 'dbfcmd'. The directory that this .lib file is stored in is include in my lib path. Any ideas what could be causing such strangeness? Thanks,
Huntsman Cancer Institute
|
Sat, 02 Apr 2005 02:31:19 GMT |
|
|
Angela d.S #2 / 8
|
Unresolved external ... referenced from ...
"Chris Doherty" wrote Quote: > [Linker Error] Unresolved external '_dbfcmd' referenced from > C:\DBTEST\DBTEST2.OBJ
---] snip [--- Quote: > Any ideas what could be causing such strangeness?
You will need to link against the appropriate library.
|
Sat, 02 Apr 2005 02:49:43 GMT |
|
|
Chris Dohert #3 / 8
|
Unresolved external ... referenced from ...
Angela, Thanks for your response. I think that I am linking against the appropriate library. I have the directory that contains the correct library file in my library path. Is there anything more that I need to do? Thanks, Chris
Quote: > "Chris Doherty" wrote > > [Linker Error] Unresolved external '_dbfcmd' referenced from > > C:\DBTEST\DBTEST2.OBJ > ---] snip [--- > > Any ideas what could be causing such strangeness? > You will need to link against the appropriate library.
|
Sat, 02 Apr 2005 03:05:50 GMT |
|
|
Emmanuel Delahay #4 / 8
|
Unresolved external ... referenced from ...
Quote: >> > [Linker Error] Unresolved external '_dbfcmd' referenced from >> > C:\DBTEST\DBTEST2.OBJ >> ---] snip [--- >> > Any ideas what could be causing such strangeness? >> You will need to link against the appropriate library. > Thanks for your response. I think that I am linking against the > appropriate library. I have the directory that contains the correct > library file in my library path. Is there anything more that I need > to do?
Is the 'dbfcmd()' function defined public (w/out 'static') ? Is the name of the function definition correct ? -- -ed- emdel at noos.fr ~]=[o FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/ C-library: http://www.dinkumware.com/htm_cl/index.html "Mal nommer les choses c'est ajouter du malheur au monde." -- Albert Camus.
|
Sat, 02 Apr 2005 03:25:43 GMT |
|
|
Angela d.S #5 / 8
|
Unresolved external ... referenced from ...
"Chris Doherty" wrote Quote: > Thanks for your response. I think that I am linking against the appropriate > library. I have the directory that contains the correct library file in my > library path. Is there anything more that I need to do?
Yes. Having the name of a directory containing a library within your library path only makes it possible for your linker to find that library. But you will still have to instruct the linker to actually use a particular library in resolving symbols therein. The linker really does not consider all libraries found via the library path in resolving symbols. What way to instruct a linker to use a particular library in resolving symbols depends upon the specific linker. E.g. for gcc the option -lm would make the linker link against the math library. Consult the documentation of your linker for any specifics regarding this. --- aDs
|
Sat, 02 Apr 2005 03:26:13 GMT |
|
|
Artie Gol #6 / 8
|
Unresolved external ... referenced from ...
Quote:
> Angela, > Thanks for your response. I think that I am linking against the appropriate > library. I have the directory that contains the correct library file in my > library path. Is there anything more that I need to do?
Maybe. The operation of your particular IDE, however, is off topic here. Please refer your question to an appropriate forum. HTH, --ag Quote:
>>"Chris Doherty" wrote >>>[Linker Error] Unresolved external '_dbfcmd' referenced from >>>C:\DBTEST\DBTEST2.OBJ >>---] snip [--- >>>Any ideas what could be causing such strangeness? >>You will need to link against the appropriate library.
-- Artie Gold -- Austin, Texas
|
Sat, 02 Apr 2005 03:27:23 GMT |
|
|
CBFalcone #7 / 8
|
Unresolved external ... referenced from ...
Quote:
> I am trying to build a rather simple C app using Borland 6. (1 > source file which makes reference to 4 Sybase .h files.) I am > able to compile without any problems, but when I try to link it > I get this error: > [Linker Error] Unresolved external '_dbfcmd' referenced from > C:\DBTEST\DBTEST2.OBJ > I make numerous calls to a function called 'dbfcmd', not > '_dbfcmd'. In fact there is not a file anywhere on my entire > hardrive that contains a call to '_dbfcmd'. I have a .lib file > that when I run tlib on it, shows the function 'dbfcmd'. The > directory that this .lib file is stored in is include in my lib > path.
Your problem is with system configuration, and has to do with what prepends the '_' to what symbols, etc. It has nothing to do with the C language, and we can do nothing except try to point you to an appropriate group. In this case that would be something with either Borland or Sybase in the name, where you *MAY* find someone knowledgeable on this particular problem. Another alternative might be to read your manuals. --
Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
|
Sat, 02 Apr 2005 04:23:55 GMT |
|
|
Morris Dove #8 / 8
|
Unresolved external ... referenced from ...
Quote:
> I am trying to build a rather simple C app using Borland 6. (1 source file > which makes reference to 4 Sybase .h files.) I am able to compile without > any problems, but when I try to link it I get this error: > [Linker Error] Unresolved external '_dbfcmd' referenced from > C:\DBTEST\DBTEST2.OBJ > I make numerous calls to a function called 'dbfcmd', not '_dbfcmd'. In fact > there is not a file anywhere on my entire hardrive that contains a call to > '_dbfcmd'. I have a .lib file that when I run tlib on it, shows the > function 'dbfcmd'. The directory that this .lib file is stored in is > include in my lib path. > Any ideas what could be causing such strangeness?
Chris... I haven't used a Borland C compiler for quite a while, but I think there's an option to add - or not add - underscores to function names. Check your compile options. -- Morris Dovey West Des Moines, Iowa USA
|
Sat, 02 Apr 2005 12:37:50 GMT |
|
|