[Error] main.pas(84): Undeclared identifier: 'avi' [Error] main.pas(87): Incompatible types: 'IAVIStream' and 'PAVIStream' [Error] main.pas(90): Incompatible types: 'IAVIStream' and 'PAVIStream' [Error] main.pas(91): Incompatible types: 'IAVIStream' and 'PAVIStream' [Warning] main.pas(91): Combining signed and unsigned types - widened both operands [Error] main.pas(104): Incompatible types: 'IAVIStream' and 'PAVIStream' [Error] main.pas(228): Incompatible types: 'IGetFrame' and 'PGetFrame' [Warning] main.pas(229): Combining signed and unsigned types - widened both operands [Fatal Error] test.dpr(5): Could not compile used unit 'main.pas'
What happend...
_________________ Try to think first before you act....
Since line numbers absolutely don't match the code you could start by posting the real code. E.g. there is no identifier "avi" in the whole code.
If this is really the code you probably have some kind of compiler cache problem. Try to delete all temporary files generated by the compiler and try again.
Registriert: Fr Mai 28, 2010 13:28 Beiträge: 25 Wohnort: Ελλάδα -- Greece
Programmiersprache: Delphi, FreePascal
Coolcat hat geschrieben:
Since line numbers absolutely don't match the code you could start by posting the real code. E.g. there is no identifier "avi" in the whole code.
If this is really the code you probably have some kind of compiler cache problem. Try to delete all temporary files generated by the compiler and try again.
procedure TForm1.BuildFont(pFontName: String); var Font : HFONT; begin FontBase := glGenLists(96); Font := CreateFont(16, 0, 0, 0, FW_MEDIUM, 0, 0, 0, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, FF_DONTCARE or DEFAULT_PITCH, PChar(pFontName)); SelectObject(DC, Font); wglUseFontBitmaps(DC, 0, 256, FontBase); DeleteObject(Font) end;
procedure TForm1.OpenAVI(szFile: LPCSTR); var bmi: BITMAPINFO; begin AVIFileInit; // P?ipravi' knihovnu AVIFile na pouz(iti' if AVIStreamOpenFromFile(pavi,szFile,streamtypeVIDEO,0,OF_READ,nil) <> 0 then // Otev?e AVI proud
MessageBox(HWND_DESKTOP,'Failed To Open The AVI Stream','Error',MB_OK or MB_ICONEXCLAMATION); // Chybova' AVIStreamInfo(pavi,psi,sizeof(psi)); VideoWidth := psi.rcFrame.Right - psi.rcFrame.Left; VideoHeight := psi.rcFrame.Bottom - psi.rcFrame.Top; lastframe := AVIStreamLength(pavi); mpf := AVIStreamSampleToTime(pavi,lastframe) div lastframe; with bmih do begin biSize := sizeof(BITMAPINFOHEADER); biPlanes := 1; biBitCount := 24; biWidth := 256; biHeight := 256; biCompression := BI_RGB; end; bmi.bmiHeader := bmih; h_bitmap := CreateDIBSection(VDC,bmi,DIB_RGB_COLORS,data,0,0); SelectObject(VDC,h_bitmap); pgf := AVIStreamGetFrameOpen(pavi,nil); if pgf = nil then MessageBox(HWND_DESKTOP,'Failed To Open The AVI Frame','Error',MB_OK or MB_ICONEXCLAMATION);
end;
procedure TForm1.PrintText(pX, pY: Integer; const pText: String); begin if (pText = '') then exit; glPushAttrib(GL_LIST_BIT); glRasterPos2i(pX, pY); glListBase(FontBase); glCallLists(Length(pText), GL_UNSIGNED_BYTE, PChar(pText)); glPopAttrib; end;
procedure TForm1.xUpdate(milliseconds: DWORD); begin Inc(next,milliseconds); frame := next div mpf; if frame >= lastframe then begin frame := 0; next := 0; end; end;
end.
How can i erase the compiler cache ?
_________________ Try to think first before you act....
Do you have a stack trace of the access violation? If not, you could use a debugger to find the exact location in your code. When working without debugger you could write some debug message on standard output to track down the error.
I can't help you with the problem itself, I have no idea what you are doing there, except that it has obviously something to do with AVI streams.
Zitat:
How can i erase the compiler cache ?
I have no idea how to do that on Delphi. I'm using qmake/GCC on Linux...there you just have to call "make clean" and possibly regenerate your makefile. However, Delphi does probably not use Makefiles...but if I had to guess...a button somewhere near the compile button labeled "clean" or "recompile".
Registriert: Fr Mai 28, 2010 13:28 Beiträge: 25 Wohnort: Ελλάδα -- Greece
Programmiersprache: Delphi, FreePascal
Coolcat hat geschrieben:
Do you have a stack trace of the access violation? If not, you could use a debugger to find the exact location in your code. When working without debugger you could write some debug message on standard output to track down the error.
i use the debugger and i get this message in this line
[Warning] main.pas(92): Combining signed and unsigned types - widened both operands [Hint] main.pas(187): Value assigned to 'Left_Min' never used [Warning] main.pas(230): Combining signed and unsigned types - widened both operands
Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.