Hi, I'm trying to implement my own access method, which uses c++
framework for saving tuples. The framework consists of set of
functions, which are implemented in win32 dll.
All the functions which are desired by PG (ambuild, aminsert, ...) are
implemented and functional. But when I want to use any of the
functions from dll so there's problem when loading the dll in
dynloader. It says that function can't be found (in the time of
loading the dll).
I do following steps:

1. Compiling the dll in Microsoft Visual Studio.
2. Creating the def file (in mingw32):

   impdef rtreewrapper.def rtreewrapper.dll

   which yealds in the folowing def file:

LIBRARY     RTREEWRAPPER.DLL

EXPORTS
    f_cRTreeItem_GetSize          = [EMAIL PROTECTED]             
    f_cRTreeLeafItem_GetSize      = [EMAIL PROTECTED]         
    f_cRTreeLeafItem_size         = [EMAIL PROTECTED]            
    f_header                      = [EMAIL PROTECTED]                         
    f_header_ComputeNodeSize      = [EMAIL PROTECTED]         
    f_header_CreateSpaceDescriptor= [EMAIL PROTECTED]      
    f_header_GetSpaceDescriptor_GetDimension= [EMAIL PROTECTED]      
    f_header_GetSpaceDescriptor_SetBitSize= [EMAIL PROTECTED]      
    f_header_SetLeafNodeItemSize  = [EMAIL PROTECTED]      
    f_header_SetNodeItemSize      = [EMAIL PROTECTED]         
    f_leafitem1                   = [EMAIL PROTECTED]                      
    f_leafitem                    = [EMAIL PROTECTED]                       
    f_leafitem_GetTuple_GetValue_GenerateRandom= [EMAIL PROTECTED]      
    f_leafitem_Resize             = [EMAIL PROTECTED]                
    f_timer                       = [EMAIL PROTECTED]                          
    f_timer_Print                 = [EMAIL PROTECTED]                    
    f_timer_Start                 = [EMAIL PROTECTED]                    
    f_timer_Stop                  = [EMAIL PROTECTED]                     
    f_tree                        = [EMAIL PROTECTED]                           
    f_tree_Close                  = [EMAIL PROTECTED]                     
    f_tree_Create                 = [EMAIL PROTECTED]                   
    f_tree_Find                   = [EMAIL PROTECTED]                      
    f_tree_GetQueryStatistics_GetCounter_GetValue= [EMAIL PROTECTED]      
    f_tree_GetQueryStatistics_GetCounter_Reset= [EMAIL PROTECTED]      
    f_tree_Insert                 = [EMAIL PROTECTED]                    
    f_tree_PrintInfo              = [EMAIL PROTECTED]

3. Creating the .a file from dll by using:

   dlltool --dllname rtreewrapper.dll --def rtreewrapper.def --output-lib 
rtreewrapper.a

4. Compiling the whole AM module with makefile containing following line:

   OBJS =       atomrtget.o atomrtree.o atomrtscan.o atomrtcostestimate.o 
rtreewrapper.a

5. Copy the dll to the bin directory (when I let it in the contrib
directory, where also the libatomrtree.dll file with the AM functions
is, so it writes out, that the modul can't be found, when loading it).

6. When there is "void *header = f_header()" anywhere in the source,
so when trying to load the dll (when I try to create the index), it
writes out, that "function can't be found" (I got czech version, so I'm
not sure, what the message is in english).


Does anybody got any hint, where the problem could be? I really can't
find it:((

Thanks.

David Hoksza
   

   


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to