Bizarre linker message.

Bizarre linker message.

Post by Roddy Prat » Fri, 23 Dec 2005 07:23:57


[Linker Error] Error: Unresolved external '' referenced from E:\PROGRAM
FILES\LMD2004\LIB\D10\LMDEL50_D10.LIB|ElEdits

Anybody seen anything like this?? A missing external symbol with no name...!

(BTW, this is using elpack 5 from LMD - I've asked them about this also...)

- Roddy
 
 
 

Bizarre linker message.

Post by Ed Mulro » Fri, 23 Dec 2005 09:33:11

That error often comes from one of the files given to the linker having a
file name or one of the directory name elements containing a character which
is a command delimiter such as a plus, '+'. most often a directory name of
"C++".

Many people coming from one of the Unix operating systems or from Linux seem
to favor the use of "C++" for a directory name.

. Ed

 
 
 

Bizarre linker message.

Post by Roddy Prat » Fri, 23 Dec 2005 21:21:28


Not the problem in this case - the Pascal module in question had this:-

function LoadLibrary16(LibraryName: PChar): THandle; stdcall; external
kernel32 index 35;
procedure FreeLibrary16(HInstance: THandle); stdcall; external kernel32
index 36;

It compiles fine, BUT the structure pane flags up the use of the 'index'
syntax as an error.

However, the LIB file generated references unnamed symbols, hence the
problem above.

- Roddy
 
 
 

Bizarre linker message.

Post by Ed Mulro » Sun, 25 Dec 2005 01:15:47

Which compiler and version are you using?

. Ed
 
 
 

Bizarre linker message.

Post by Roddy Prat » Sun, 25 Dec 2005 01:20:59


BDS2006 10.0.2166.28377 Update 1

- Roddy
 
 
 

Bizarre linker message.

Post by Rudy Velth » Sun, 25 Dec 2005 01:24:46


Can happen if your external is linked by index instead of by name.
--
Rudy.Velthuis {TeamB} http://www.yqcomputer.com/

"Where humor is concerned there are no standards - no one can say what
is good or bad, although you can be sure that everyone will."
-- John Kenneth Galbraith (1908- )
 
 
 

Bizarre linker message.

Post by Rudy Velth » Sun, 25 Dec 2005 01:30:51


There you are: linked by index. I'd guess that these externals are
missing in the current kernel32. <looking on XP> Indeed, these are not
part of kernel32.dll anymore.

So either the code that uses them is modified, and the declarations are
removed, or you will have to find something else.
--
Rudy.Velthuis {TeamB} http://www.yqcomputer.com/

"In the End, we will remember not the words of our enemies, but the
silence of our friends."
- Martin Luther King Jr. (1929-1968)
 
 
 

Bizarre linker message.

Post by Roddy Prat » Sun, 25 Dec 2005 02:06:50


Thanks Rudy - yup, that code is well broken!

However, because the 'index' technique is using the DLL ordinal rather than
name, I think the linker has no way of knowing that those entries have been
removed. So I guess if you try and make a library use a DLL function by
index, you'll ALWAYS get the error??

Maybe "index" should just be discontinued from the language - it looks like
the structure pane thinks this has happened already...

- Roddy
 
 
 

Bizarre linker message.

Post by Rudy Velth » Sun, 25 Dec 2005 03:03:46


Not sure. You could try with a valid function index. Index seems to have
issues, in Delphi 2006.


The structure pane also has issues. Error Insight is not perfect. It
seems to use the wrong library paths for some projects.

--
Rudy.Velthuis {TeamB} http://www.yqcomputer.com/

"Computer dating is fine, if you're a computer."
-- Rita May Brown.