Original Post
Hi, I read NeHe's tutorial on the avi loading, and I tried to apply it to my project. He used this method to open the file void OpenAVI(LPCSTR szFile) // Opens An AVI File (szFile) { TCHAR title[100]; // Will Hold The Modified Window Title AVIFileInit(); // Opens The AVIFile Library // Opens The AVI Stream if (AVIStreamOpenFromFile(&pavi, szFile, streamtypeVIDEO, 0, OF_READ, NULL) !=0) { // An Error Occurred Opening The Stream MessageBox (HWND_DESKTOP, "Failed To Open The AVI Stream", "Error", MB_OK | MB_ICONEXCLAMATION); } AVIStreamInfo(pavi, ψ, sizeof(psi)); // Reads Information About The Stream Into psi width=psi.rcFrame.right-psi.rcFrame.left; // Width Is Right Side Of Frame Minus Left height=psi.rcFrame.bottom-psi.rcFrame.top; // Height Is Bottom Of Frame Minus Top lastframe=AVIStreamLength(pavi); // The Last Frame Of The Stream mpf=AVIStreamSampleToTime(pavi,lastframe)/lastframe; // Calculate Rough Milliseconds Per Frame bmih.biSize = sizeof (BITMAPINFOHEADER); // Size Of The BitmapInfoHeader bmih.biPlanes = 1; // Bitplanes bmih.biBitCount = 24; // Bits Format We Want (24 Bit, 3 Bytes) bmih.biWidth = 256; // Width We Want (256 Pixels) bmih.biHeight = 256; // Height We Want (256 Pixels) bmih.biCompression = BI_RGB; // Requested Mode = RGB hBitmap = CreateDIBSection (hdc, (BITMAPINFO*)(&bmih), DIB_RGB_COLORS, (void**)(&data), NULL, NULL); SelectObject (hdc, hBitmap); // Select hBitmap Into Our Device Context (hdc) pgf=AVIStreamGetFrameOpen(pavi, NULL); // Create The PGETFRAME Using Our Request Mode if (pgf==NULL) { // An Error Occurred Opening The Frame MessageBox (HWND_DESKTOP, "Failed To Open The AVI Frame", "Error", MB_OK | MB_ICONEXCLAMATION); } // Information For The Title Bar (Width / Height / Last Frame) wsprintf (title, "NeHe's AVI Player: Width: %d, Height: %d, Frames: %d", width, height, lastframe); SetWindowText(g_window->hWnd, title); // Modify The Title Bar } However, when I tried the same thing, these errors appeared. Can some one help?? Error 1 error LNK2019: unresolved external symbol _AVIStreamGetFrameOpen@8 referenced in function "void __cdecl OpenAVI(wchar_t const *)" (?OpenAVI@@YAXPB_W@Z) AppMain.obj Error 2 error LNK2019: unresolved external symbol _AVIStreamSampleToTime@8 referenced in function "void __cdecl OpenAVI(wchar_t const *)" (?OpenAVI@@YAXPB_W@Z) AppMain.obj Error 3 error LNK2019: unresolved external symbol _AVIStreamLength@4 referenced in function "void __cdecl OpenAVI(wchar_t const *)" (?OpenAVI@@YAXPB_W@Z) AppMain.obj Error 4 error LNK2019: unresolved external symbol _AVIStreamInfoW@12 referenced in function "void __cdecl OpenAVI(wchar_t const *)" (?OpenAVI@@YAXPB_W@Z) AppMain.obj Error 5 error LNK2019: unresolved external symbol _AVIStreamOpenFromFileW@24 referenced in function "void __cdecl OpenAVI(wchar_t const *)" (?OpenAVI@@YAXPB_W@Z) AppMain.obj Error 6 error LNK2019: unresolved external symbol _AVIFileInit@0 referenced in function "void __cdecl OpenAVI(wchar_t const *)" (?OpenAVI@@YAXPB_W@Z) AppMain.obj Error 7 error LNK2019: unresolved external symbol _DrawDibDraw@52 referenced in function "void __cdecl GrabAVIFrame(int)" (?GrabAVIFrame@@YAXH@Z) AppMain.obj Error 8 error LNK2019: unresolved external symbol _AVIStreamGetFrame@8 referenced in function "void __cdecl GrabAVIFrame(int)" (?GrabAVIFrame@@YAXH@Z) AppMain.obj