I would be grateful if someone can help a poor Delphi programmer. I need to use a DLL provided by someone else to carry out a simple fire-and-forget action.
I have been provided with two files :
aiqsdkif.lib
aiqsdkif.dll
which I know contain the three routines I need namely :
InstallAIQ();
UninstallAIQ();
RebuildMasterTickerList();
There are two files that I have cloned fromthose provided to me :
AIQSDK.h :
---------------------------------------------------------------------
#ifndef __AIQSDK_H
#define __AIQSDK_H
#ifdef _WIN32
# ifndef _AIQSDK_
# define AIQSDKAPI __declspec( dllimport )
# else
# define AIQSDKAPI __declspec( dllexport )
# endif
#else
# define AIQSDKAPI
#endif
#ifdef __cplusplus
extern "C" {
#endif
AIQSDKAPI void FAR PASCAL InstallAIQ();
AIQSDKAPI void FAR PASCAL UninstallAIQ();
AIQSDKAPI BOOL FAR PASCAL RebuildMasterTickerList();
#ifdef __cplusplus
};
#endif
#endif //__AIQSDK_H
---------------------------------------------------------------------
SDKTest.cpp
---------------------------------------------------------------------
#include "windows.h"
#include <stdio.h>
#include <conio.h>
#include "aiqsdk.h"
int main(int argc, char* argv[])
{
InstallAIQ();
RebuildMasterTickerList();
UninstallAIQ();
return 0;
}
---------------------------------------------------------------------
The program compiles but fails to link with the messages :
Linking...
SDKtest.obj : error LNK2001: unresolved external symbol __imp__UninstallAIQ@0
SDKtest.obj : error LNK2001: unresolved external symbol __imp__RebuildMasterTickerList@0
SDKtest.obj : error LNK2001: unresolved external symbol __imp__InstallAIQ@0
Debug/Test1.exe : fatal error LNK1120: 3 unresolved externals
I guess there must be some way of linking in the .lib or dll files
But I am afraid I use Visual C++ (6) so little I do not know what to do.
I have been provided with two files :
aiqsdkif.lib
aiqsdkif.dll
which I know contain the three routines I need namely :
InstallAIQ();
UninstallAIQ();
RebuildMasterTickerList();
There are two files that I have cloned fromthose provided to me :
AIQSDK.h :
---------------------------------------------------------------------
#ifndef __AIQSDK_H
#define __AIQSDK_H
#ifdef _WIN32
# ifndef _AIQSDK_
# define AIQSDKAPI __declspec( dllimport )
# else
# define AIQSDKAPI __declspec( dllexport )
# endif
#else
# define AIQSDKAPI
#endif
#ifdef __cplusplus
extern "C" {
#endif
AIQSDKAPI void FAR PASCAL InstallAIQ();
AIQSDKAPI void FAR PASCAL UninstallAIQ();
AIQSDKAPI BOOL FAR PASCAL RebuildMasterTickerList();
#ifdef __cplusplus
};
#endif
#endif //__AIQSDK_H
---------------------------------------------------------------------
SDKTest.cpp
---------------------------------------------------------------------
#include "windows.h"
#include <stdio.h>
#include <conio.h>
#include "aiqsdk.h"
int main(int argc, char* argv[])
{
InstallAIQ();
RebuildMasterTickerList();
UninstallAIQ();
return 0;
}
---------------------------------------------------------------------
The program compiles but fails to link with the messages :
Linking...
SDKtest.obj : error LNK2001: unresolved external symbol __imp__UninstallAIQ@0
SDKtest.obj : error LNK2001: unresolved external symbol __imp__RebuildMasterTickerList@0
SDKtest.obj : error LNK2001: unresolved external symbol __imp__InstallAIQ@0
Debug/Test1.exe : fatal error LNK1120: 3 unresolved externals
I guess there must be some way of linking in the .lib or dll files
But I am afraid I use Visual C++ (6) so little I do not know what to do.