www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Exported Symbol Error

reply Venix <venix cbpu.com> writes:
I was attempting to convert over the gltext & freetype libraries. I 
created a freetype module for D. And ported most of gltext's syntax. So 
everything compiles. But when linking I get this message.

  Error 42: Symbol Undefined _FT_Done_Face

The function name is FT_Done_Face and thats the symbol name within the 
dll as shown by pexports.
It's reprensented in the module like this.

extern (Windows)
{
     export FT_Error
     FT_Done_Face( FT_Face face );
}

I have also tried every other extern type. Moved the extern type infront 
fo the export. Removed the export.  Nothing removes the leading _ on the 
symbol name.
Any help on how I can remove the _ from the symbol name.
Nov 04 2005
parent reply Venix <venix cbpu.com> writes:
Venix wrote:
 I was attempting to convert over the gltext & freetype libraries. I 
 created a freetype module for D. And ported most of gltext's syntax. So 
 everything compiles. But when linking I get this message.
 
  Error 42: Symbol Undefined _FT_Done_Face
 
 The function name is FT_Done_Face and thats the symbol name within the 
 dll as shown by pexports.
 It's reprensented in the module like this.
 
 extern (Windows)
 {
     export FT_Error
     FT_Done_Face( FT_Face face );
 }
 
 I have also tried every other extern type. Moved the extern type infront 
 fo the export. Removed the export.  Nothing removes the leading _ on the 
 symbol name.
 Any help on how I can remove the _ from the symbol name.

with codeblocks and using dlink with it. I don't realy understand the whole prepending an _ to the symbol names. But if when i use implib to create the import lib for freetype I add /system which. /system Prepend '_' to exported internal names (NT system DLL) Somehow that applies to my project. Not sure what it means by exported internal. I could use some clarification on that and how to stop it would be nice. But I'll attempt to get the examples up and running for gltext soon and see if it causes me any other grief.
Nov 04 2005
parent Kyle Furlong <kylefurlong gmail.com> writes:
Venix wrote:
 Venix wrote:
 
 I was attempting to convert over the gltext & freetype libraries. I 
 created a freetype module for D. And ported most of gltext's syntax. 
 So everything compiles. But when linking I get this message.

  Error 42: Symbol Undefined _FT_Done_Face

 The function name is FT_Done_Face and thats the symbol name within the 
 dll as shown by pexports.
 It's reprensented in the module like this.

 extern (Windows)
 {
     export FT_Error
     FT_Done_Face( FT_Face face );
 }

 I have also tried every other extern type. Moved the extern type 
 infront fo the export. Removed the export.  Nothing removes the 
 leading _ on the symbol name.
 Any help on how I can remove the _ from the symbol name.

Found a solution. This prolly concerns anyone whos been toying around with codeblocks and using dlink with it. I don't realy understand the whole prepending an _ to the symbol names. But if when i use implib to create the import lib for freetype I add /system which. /system Prepend '_' to exported internal names (NT system DLL) Somehow that applies to my project. Not sure what it means by exported internal. I could use some clarification on that and how to stop it would be nice. But I'll attempt to get the examples up and running for gltext soon and see if it causes me any other grief.

Terra over at dsource.org already ported FT. Dunno if you care, but you could check out Trevor and JJR's work over there.
Nov 04 2005