undefined reference to `ICOpen@12'

Windows specific questions.
Post Reply
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

undefined reference to `ICOpen@12'

Post by vdecampo »

Can anyone explain to me why I am getting this error?

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)
Thanks
-Vince
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Post by KristopherWindsor »

I get another error. :-/

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)
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

Try using FBC 0.20.0...
Sisophon2001
Posts: 1706
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Post by Sisophon2001 »

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
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

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 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.
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Post by DrV »

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.
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

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.
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.

-Vince
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

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:
fbc test.bas -l vfw32
(vfw32 linked manually since it's obviously not #inclib'ed by that headers)
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

dkl 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:
fbc test.bas -l vfw32
(vfw32 linked manually since it's obviously not #inclib'ed by that headers)
Thank you for pointing that out. I had not even thought about manually adding inclib! :0
Post Reply