Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
August 11, 2009 win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
i work on a win32 application. i try to access my web camera. when i use this api funtion; capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0); i get this error: Error: undefined identifier capCreateCaptureWindow my compile comman is: dmd webcam.d gdi32.lib advapi32.lib what am i doing wrong? how can i acces my web cam? |
August 11, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ivan Boritsky | On Tue, Aug 11, 2009 at 6:10 PM, Ivan Boritsky<nibble_20@gmx.com> wrote: > i work on a win32 application. i try to access my web camera. > when i use this api funtion; > capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0); > > i get this error: > Error: undefined identifier capCreateCaptureWindow > > my compile comman is: > dmd webcam.d gdi32.lib advapi32.lib > > what am i doing wrong? how can i acces my web cam? The Windows headers that come with Phobos are extremely incomplete. Try the WindowsApi bindings project instead: http://dsource.org/projects/bindings/wiki/WindowsApi |
August 12, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ivan Boritsky | Ivan Boritsky wrote: > i work on a win32 application. i try to access my web camera. > when i use this api funtion; > capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0); That should be: WS_VISIBLE | WS_CHILD. > > i get this error: > Error: undefined identifier capCreateCaptureWindow You need a header module that imports the function. Try the vfw.d module at the project Jarrett pointed you to. > > my compile comman is: > dmd webcam.d gdi32.lib advapi32.lib You'll also need vfw32.lib, which isn't part of the DMD distribution, but will be on your system if you've downloaded the Platform SDK - in which case, you'll need to run it through coffimplib (ftp://ftp.digitalmars.com/coffimplib.zip). > > what am i doing wrong? how can i acces my web cam? |
August 12, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | thank u very much. it works fine. |
August 13, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | John C Wrote:
> Ivan Boritsky wrote:
> > i work on a win32 application. i try to access my web camera.
> > when i use this api funtion;
> > capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0);
>
> That should be: WS_VISIBLE | WS_CHILD.
>
> >
> > i get this error:
> > Error: undefined identifier capCreateCaptureWindow
>
> You need a header module that imports the function. Try the vfw.d module at the project Jarrett pointed you to.
>
> >
> > my compile comman is:
> > dmd webcam.d gdi32.lib advapi32.lib
>
> You'll also need vfw32.lib, which isn't part of the DMD distribution, but will be on your system if you've downloaded the Platform SDK - in which case, you'll need to run it through coffimplib (ftp://ftp.digitalmars.com/coffimplib.zip).
Hi John,
I also downloaded the said win32 zip but don't know how to compile to lib or dll,doesn't need to compile? or how to compile?
Thanks.
Regards,
Sam
|
August 13, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sam Hu | Sam Hu Wrote:
> John C Wrote:
>
> > Ivan Boritsky wrote:
> > > i work on a win32 application. i try to access my web camera.
> > > when i use this api funtion;
> > > capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0);
> >
> > That should be: WS_VISIBLE | WS_CHILD.
> >
> > >
> > > i get this error:
> > > Error: undefined identifier capCreateCaptureWindow
> >
> > You need a header module that imports the function. Try the vfw.d module at the project Jarrett pointed you to.
> >
> > >
> > > my compile comman is:
> > > dmd webcam.d gdi32.lib advapi32.lib
> >
> > You'll also need vfw32.lib, which isn't part of the DMD distribution, but will be on your system if you've downloaded the Platform SDK - in which case, you'll need to run it through coffimplib (ftp://ftp.digitalmars.com/coffimplib.zip).
>
>
> Hi John,
>
> I also downloaded the said win32 zip but don't know how to compile to lib or dll,doesn't need to compile? or how to compile?
>
> Thanks.
> Regards,
> Sam
Huh? You just run
coffimplib -f vfw32.lib
and specify the .lib on your build command line - something like:
dmd webcam vfw32.lib
|
August 14, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | John C Wrote: > Sam Hu Wrote: > > > John C Wrote: > > > > > Ivan Boritsky wrote: > > > > i work on a win32 application. i try to access my web camera. > > > > when i use this api funtion; > > > > capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0); > > > > > > That should be: WS_VISIBLE | WS_CHILD. > > > > > > > > > > > i get this error: > > > > Error: undefined identifier capCreateCaptureWindow > > > > > > You need a header module that imports the function. Try the vfw.d module at the project Jarrett pointed you to. > > > > > > > > > > > my compile comman is: > > > > dmd webcam.d gdi32.lib advapi32.lib > > > > > > You'll also need vfw32.lib, which isn't part of the DMD distribution, but will be on your system if you've downloaded the Platform SDK - in which case, you'll need to run it through coffimplib (ftp://ftp.digitalmars.com/coffimplib.zip). > > > > > > Hi John, > > > > I also downloaded the said win32 zip but don't know how to compile to lib or dll,doesn't need to compile? or how to compile? > > > > Thanks. > > Regards, > > Sam > > Huh? You just run > > coffimplib -f vfw32.lib > > and specify the .lib on your build command line - something like: > > dmd webcam vfw32.lib Hi John, Thank you.I have win2003 SDK+vc++2008 EX installed in my machine.When I tried the winsamp.d in the example folder of dmd(ver2031): />coffimplib -f vfw32.lib />dmd winsamp.d gdi32.lib vfw32.lib winsamp.def ** also tried bud winsamp.d gdi32.lib vfw32.lib I got below error: F:\laguangeD\WindowsApi-CMakeD\demo>bud winsampw.d -cleanup gid32.lib vfw32.lib OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. mpr.lib Warning 2: File Not Found mpr.lib imm32.lib Warning 2: File Not Found imm32.lib lz32.lib Warning 2: File Not Found lz32.lib rpcns4.lib Warning 2: File Not Found rpcns4.lib What's that?Was I missing something? Regards, Sam |
August 14, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sam Hu | Sam Hu wrote:
> John C Wrote:
>
>> Sam Hu Wrote:
>>
>>> John C Wrote:
>>>
>>>> Ivan Boritsky wrote:
>>>>> i work on a win32 application. i try to access my web camera.
>>>>> when i use this api funtion;
>>>>> capCreateCaptureWindow("cam", WS_VISIBLE + WS_CHILD, 10, 10,266, 252, hWnd, 0);
>>>> That should be: WS_VISIBLE | WS_CHILD.
>>>>
>>>>> i get this error:
>>>>> Error: undefined identifier capCreateCaptureWindow
>>>> You need a header module that imports the function. Try the vfw.d module at the project Jarrett pointed you to.
>>>>
>>>>> my compile comman is:
>>>>> dmd webcam.d gdi32.lib advapi32.lib
>>>> You'll also need vfw32.lib, which isn't part of the DMD distribution, but will be on your system if you've downloaded the Platform SDK - in which case, you'll need to run it through coffimplib (ftp://ftp.digitalmars.com/coffimplib.zip).
>>>
>>> Hi John,
>>>
>>> I also downloaded the said win32 zip but don't know how to compile to lib or dll,doesn't need to compile? or how to compile?
>>>
>>> Thanks.
>>> Regards,
>>> Sam
>> Huh? You just run
>>
>> coffimplib -f vfw32.lib
>>
>> and specify the .lib on your build command line - something like:
>>
>> dmd webcam vfw32.lib
>
> Hi John,
>
> Thank you.I have win2003 SDK+vc++2008 EX installed in my machine.When I tried the winsamp.d in the example folder of dmd(ver2031):
>
> />coffimplib -f vfw32.lib
> />dmd winsamp.d gdi32.lib vfw32.lib winsamp.def
> ** also tried bud winsamp.d gdi32.lib vfw32.lib
>
> I got below error:
>
> F:\laguangeD\WindowsApi-CMakeD\demo>bud winsampw.d -cleanup gid32.lib vfw32.lib OPTLINK (R) for Win32 Release 8.00.1
> Copyright (C) Digital Mars 1989-2004 All rights reserved.
> mpr.lib
> Warning 2: File Not Found mpr.lib
> imm32.lib
> Warning 2: File Not Found imm32.lib
> lz32.lib
> Warning 2: File Not Found lz32.lib
> rpcns4.lib
> Warning 2: File Not Found rpcns4.lib
>
> What's that?Was I missing something?
>
> Regards,
> Sam
Those are warnings, not errors. Ignore them, it will compile anyway.
|
August 17, 2009 Re: win32 capCreateCaptureWindow problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | John C Wrote:
> Those are warnings, not errors. Ignore them, it will compile anyway.
Ah ..yes.It work .BTW,just cfw32.lib is needed,no need gdi32.lib to compile.
Thank you so much!
Regards,
Sam
|
Copyright © 1999-2021 by the D Language Foundation