undefined reference to `ICOpen@12'

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

undefined reference to `ICOpen@12'

Postby vdecampo » Oct 07, 2008 1:04

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:

Postby KristopherWindsor » Oct 07, 2008 2:42

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

Postby vdecampo » Oct 07, 2008 12:41

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

Postby Sisophon2001 » Oct 07, 2008 13:45

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

Postby vdecampo » Oct 07, 2008 14:20

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:

Postby DrV » Oct 07, 2008 16:09

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

Postby vdecampo » Oct 07, 2008 16:28

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: 3221
Joined: Jul 28, 2005 14:45
Location: Germany

Postby dkl » Oct 07, 2008 20:31

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

Postby vdecampo » Oct 07, 2008 23:04

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

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 5 guests