LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Warning: Creating a DLL with no exports. No import libraries will be created.

I been receiving the error: Warning: Creating a DLL with no exports. No import libraries will be created while trying to make a simple Dll. I have read http://forums.ni.com/ni/board/message?board.id=180&thread.id=11389 and looked at code which works. However, I cannot create a library. The code consist of two files: BertTeststandPassing.c and BertTeststandPassing.h.
 
BertTeststandPassing.c
 
#define  DLL_Export   __declspec(dllexport)
#include <ansi_c.h>
#include <utility.h>
#include "BertTeststandPassing.h"
#ifdef _CVI_DLL_ 
int __stdcall DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
 switch (fdwReason)
        {
        case DLL_PROCESS_ATTACH:
            if (InitCVIRTE (hinstDLL, 0, 0) == 0)
                return 0;     /* out of memory */
            break;
        case DLL_PROCESS_DETACH:
            CloseCVIRTE ();
            break;
  case DLL_THREAD_DETACH:
 
   break;
        }
 return 1;
}
// end DllMain
int __stdcall DllEntryPoint (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
 /* Included for compatibility with Borland */
 return DllMain (hinstDLL, fdwReason, lpvReserved);
}
#endif
int DLL_Export test( ){
 return 0;
}
 
BertTeststandPassing.h
 

/************** Static Function Declarations **************/
#define  DLL_Export  __declspec(dllexport) 
typedef struct
 {
 int  frame_number;
 int  word_number;
 int  expected_data;
 int  actual_data;
 } Bit_Error_Record;
/************** Global Variable Declarations **************/
/************** Global Function Declarations **************/
extern int __stdcall DllMain(HINSTANCE hinstDLL,
                             DWORD fdwReason, LPVOID lpvReserved);
extern int __stdcall DllEntryPoint(HINSTANCE hinstDLL,
                                   DWORD fdwReason, LPVOID lpvReserved);
extern int __decspec(dllexport) __cdecl test(void);
My company typically uses __export __cdecl instead of __decspec(dllexport).
 
Thanks a head of time. 🙂
 
~kat
 
0 Kudos
Message 1 of 4
(3,661 Views)
I use

DLLEXPORT DLLSTDCALL  in the exported function declaration and definition and it works fine.  These are defined by CVI.

Menchar
0 Kudos
Message 2 of 4
(3,618 Views)

Oh, I found the problem. It wasn't in the code. I needed to select the H file which the library will be based on. It's in

Build > Target Settings > Change > Then Select H file.

Thanks for the help. 🙂

0 Kudos
Message 3 of 4
(3,609 Views)
We always use "Symbols marked for export".  NI recommends using an include (i.e. header) file to identify the exported functions, but we've never gotten that to work for us.  It may be that we usually include a type library and function panel and this complicates things.
 
Menchar


Message Edited by menchar on 03-10-2008 11:01 AM
0 Kudos
Message 4 of 4
(3,605 Views)