Code: Select all
#Include "win\vfw.bi"
#Define FCC(a,b,c,d) mmioFourCC(asc(a),asc(b),asc(c),asc(d))
Var hCodec = ICOpen(FCC("V","I","D","C"), FCC("M","P","G","4"), ICMODE_FASTCOMPRESS)
-Vince
Code: Select all
#Include "win\vfw.bi"
#Define FCC(a,b,c,d) mmioFourCC(asc(a),asc(b),asc(c),asc(d))
Var hCodec = ICOpen(FCC("V","I","D","C"), FCC("M","P","G","4"), ICMODE_FASTCOMPRESS)
Code: Select all
Command executed:
"C:\Program Files\FreeBASIC\fbc.exe" "C:\FreeBasic\Source\fcc.bas" -lang fb -mt
Compiler output:
C:/Program Files/FreeBASIC/inc/win/vfw.bi(708) error 14: Expected identifier, found 'Delete' in 'Delete as function (byval as IAVIStream ptr, byval as LONG, byval as LONG) as HRESULT'
Results:
Compilation failed
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.18.3 (12-28-2007) for win32 (target:win32)
OS: Windows 2000 (build 2195, Service Pack 4)
I am an experienced user which is why this error makes no sense. This is a function thats been standard in Windows since Win95. Don't these libs come with the FB install? I have the DLLs because I use this function with VB with no problem.Sisophon2001 wrote:I thinkk you are an experienced user, so I would have expected that you could solve this problem yourself, or at least tell us what you tried. Obviously the compiler can not find the function you used, so why can it not find it? Do you have the DLL in your system? Do you have the required library?
Garvan
I copied every lib from there and I still get the same error. Oh well, I need to find another solution. I will leave this for when I have more time, or to a more experienced user.DrV wrote:According to the MSDN page for ICOpen, you should link with vfw32, but apparently FB doesn't ship that library; try using the one from the MinGW w32api package.
(vfw32 linked manually since it's obviously not #inclib'ed by that headers)fbc test.bas -l vfw32
Thank you for pointing that out. I had not even thought about manually adding inclib! :0dkl wrote:I copied libavicap32.a (seems to be #inclib'ed by the vfw header) and libvfw32.a (for the ICOpen function) from MinGW\lib to FreeBASIC\lib\win32 and it compiled without problems using this command line:(vfw32 linked manually since it's obviously not #inclib'ed by that headers)fbc test.bas -l vfw32