If you read my post "Tga" earlier about the image library i am creating that relates to this post as well. This time I am having a problem somewhere that I can't find. The two errors I get are both Unresolved External errors for the function DBIL_Initialize() and the function DBIL_DeInitialize() because those are the only two I'm calling from the DLL. Here is my code, please help.
"Main.h" (Where I import from DLL)
"Main.cpp" (I'm just posting where I have the problem)Code:#include <windows.h> #include <ddraw.h> #define DLLEXP __declspec(dllexport) #pragma comment(lib,"ddraw.lib") #pragma comment(lib,"dxguid.lib") #define g_szClassName "CLASS!" // Image Types For DBIL_LoadImage() Function #define BITMAP_IMAGE_FILE 0x00AA #define TARGA_IMAGE_FILE 0x00BB // Methods Of Display For DBIL_DisplayImage() Function #define NORMAL_IMAGE 0x00AAAA #define TRANSPARENT_IMAGE 0x00AABB #define BACKGROUND_IMAGE 0x00AACC #define PORTION_IMAGE 0x00AADD enum { ePrimary, eBack, eMaxSurfaces, }; typedef struct { BYTE IDLength; BYTE ColorMapType; BYTE ImageType; WORD CMapStart; WORD CMapLength; BYTE CMapDepth; WORD XOffset; WORD YOffset; WORD Width; WORD Height; BYTE PixelDepth; BYTE ImageDescriptor; } TGA_Header; typedef struct { HWND hWnd; RECT Rect; HANDLE Compatible; HANDLE Old; HDC Front; HDC Back; HDC Bitmap; } BUFFER; typedef struct { LPDIRECTDRAW2 Interface; LPDIRECTDRAWSURFACE Surfaces[eMaxSurfaces]; LPDIRECTDRAWCLIPPER Clipper; } TRANS_IMAGE; LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); DLLEXP HBITMAP DBIL_LoadImage(HINSTANCE, LPSTR, UINT, UINT); DLLEXP bool DBIL_Initialize(BUFFER, TRANS_IMAGE, HWND); DLLEXP bool DBIL_DisplayImage(BUFFER, HBITMAP, UINT, INT, INT, RECT, TRANS_IMAGE); DLLEXP bool DBIL_DeInitialize(BUFFER, TRANS_IMAGE); DLLEXP bool DBIL_ClearScreen(HDC, RECT, INT);
Code:#include "Main.h" ........................... case WM_CREATE: DBIL_Initialize(pBuffer, pTrans, hWnd); break; ........................... case WM_DESTROY: DBIL_DeInitialize(pBuffer, pTrans); PostQuitMessage(0); break; ...........................



LinkBack URL
About LinkBacks


