Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / compiler error, directshow Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
drewdaman

January 28, 2005, 09:39 AM

hello everyone,

i was just going through a directshow tutorial here on flipcode at http://www.flipcode.com/articles/article_directshow01.shtml. there is a sample project there. i have installed directx sdk 9 successfully. when it asked whether it should install retail or debug, i selected debug which is what a bunch of websites suggested i should do if i intend to develop anything with directshow. when i try to compile the project, i get an error:

  1.  
  2. Compiling...
  3. DShowTut1.cpp
  4. c:directtestixr-source codedshowtut1dshowtut1.cpp(6) : fatal error C1083: Cannot open include file: 'streams.h': No such file or directory
  5. Error executing cl.exe.
  6.  
  7. DShowTut1.obj - 1 error(s), 0 warning(s)
  8.  


now, it also says in the tutorial: "If you plan on compiling this, be sure you've installed the DirectX Media SDK, and included strmbasd.lib (debug) or strmbase.lib (retail) so it compiles correctly."

i have installed the directx media sdk, but i'm not sure how to include strmbasd.lib. i tried the usual #include and #include "blah" but then i got teh same complier error i mentioned above, except it was for strmbasd.lib. does anyone know how to correctly include teh required file?

thanks! i'm a totally directshow newbie and i would really appreciate any help getting started.. i'm sure all you directshow gurus out there remember that directshow is not easy to learn!!! :)

i also have another more general question. what i want to do is to be able to view a webcam over teh internet. so, i have a computer with a webcam at home, i go on vacation, i want to be able to log into my home computer and view the webcam. is there an easier way to do this than using directshow? im very new to this type of programming in general! everything i read on the web seemed to suggest taht directshow is the way to go. but if anyone knows of an easier way, please let me know! i'm pretty good with sockets now, and i can write some stuff using sockets if its necessary.

thanks again. any help appreciated.

 
Steven Don

January 28, 2005, 01:49 PM

Add the folder "C:dxsdksamplesMultimediaDirectShowBaseClasses" to your compiler include folders (assuming you installed the DirectX SDK and its samples into C:dxsdk -- adjust accordingly).

 
Steven Don

January 28, 2005, 01:52 PM

Oh, and to link to a library, go to the project's settings, find the "link" tab and add the library to the "object/library modules" list.

You'll also need to add the folder I mentioned in my post above to your library path.

 
drewdaman

February 02, 2005, 10:46 AM

Thanks for replying Steven. I apologize for replying to my own post so late, but i've been away! I had already "done" that.. but it seems that instead of "C:dxsdksamplesC++DirectShowBaseClasses", i just had "C:dxsdksamplesC++" somehow (you might notice that i have "C++" instead of "Multimedia"- i saw somewhere that this has changed for sdk 9)! i am sure i told it to put the whole thing in there.. i'm not sure exactly how this happened! so, it finds streams.h now.

I do have another problem i was hoping to bother you guys with now! you guys are going to think i'm sooo lame! but i'm fresh out of school and i've never had to deal with all these strange vc++ settings! lol....

i found this thing online.. it adds a wizard to vc++ and its supposed to make things a lot easier for newbies like me. its available at http://www.ifp.uiuc.edu/~chenyq/research/Utils/DxVideoAppWiz/DxVideoAppWiz.html. so, it generates some code, i guess much like the MFC appwizard does. now my problem (fortunately) is not directly related to this appwizard. i installed it, generated a new app and tried to build it. the error i get is:

  1.  
  2. LINK : fatal error LNK1104: cannot open file "C:DXSDK\samplesMultimediaDirectShowBaseClassesDebugstrmbasd.lib"
  3. Error executing link.exe.
  4.  
  5.  


I looked for strmbasd.lib. The above path is slightly incorrect.
Instead of Debug, it is in a folder called Debug_Unicode. I changed
that in the project settings and got the exact same error, except this
time it said 'Debug_Unicode' instead of 'Debug'.

I have not done any work with .lib files in the past. the file shows
up with a windows logo. the filename shows no extension, but when i
move the mouse over the file, it says it is of type .lib. the file is
1.88 mb.

I am also copying and pasting some steps that i took to get this stuff to work, just so you guys know where i am! These steps are available in a (large!) pdf at http://www.cs.ucf.edu/~lspencer/vid_app.pdf. i also indicate where in the pdf the steps are described.

"Build C:DX90SDKsamplesC++DirectShow
BaseClasses. (Load .dsw and build for
Debug and Release libraries)" (slide 6 of the pdf)


"Under Tools->Options->Directories->Include Files,
add C:DXSDKSamplesC++
DirectShowBaseclasses so it can find streams.h" (slide 6 of the pdf)


"Make sure C:DX90SDKinclude is first in the list." (slide 6 of the pdf)

(In fact, i even tried to put "C:DXSDKSamplesC++
DirectShowBaseclasses" second in the list, just below
"C:DX90SDKinclude"- that did not help either!)

"In "Additional include directories" change "Multimedia"
to "C++". (The location of streams.h changed in DX9.)" (slide 12 of the pdf)



Do you guys think there might be a problem with my installation or do you think i'm just doing something totally wrong?

I really appreciate you guys helping me out!
Thanks a lot!
Drew.

 
Steven Don

February 02, 2005, 04:26 PM

There's another problem in there. It says "C:DXSDK\..." (double backslash). Try making that into a single backslash.

The "Debug_Unicode" version is created when you build for Unicode (big surprise). This shouldn't be a problem if your app is also built for Unicode.

That the location has changed to "C++" is because the DX9 SDK is now built vor Visual Studio .NET and includes samples for other languages than C++, whereas the old versions were for Visual Studio 6.

 
Julien Houllier

February 03, 2005, 09:34 AM

I prefer to use the preprocessor command :

#pragma comment(lib, "mylib.lib")

than setting the linked lib in the project's settings. That is clearer for re-using parts of code in another projects without missing important linkings

 
Steven Don

February 03, 2005, 05:27 PM

As do I. Bear in mind that that is a Visual-C specific feature, though.

 
Julien Houllier

February 04, 2005, 02:42 AM

Yes it is, but settings in the project's configuration pages are also VC++ specific...

 
This thread contains 8 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.