Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 objbase.h not found :angry:
Index -> Programming, C++ -> C++ Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Geostigma




PostPosted: Sat May 26, 2007 11:07 pm   Post subject: objbase.h not found :angry:

I'm starting to get really upset with trying learn how to program in c++ and using libraries. Well openGL is a big bust because of the lack of GLaux and support and the fact its not used any more and now I can't even use direct X because it can't find this mystical objbase.h file that even if you make one by copy and pasting the code from the net its not good enough for Visual studio express 05.

Wtf is up. I just want something to work so I can build on it and learn it. Not much use when its broken.


code:
------ Build started: Project: windows_primer, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D9040 : ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
windows_primer.cpp
c:\documents and settings\andrew\my documents\visual studio 2005\projects\include\d3d9.h(40) : fatal error C1083: Cannot open include file: 'objbase.h': No such file or directory
Build log was saved at "file://c:\Program Files\Microsoft Visual Studio 8\files\dxtest\windows_primer\Debug\BuildLog.htm"
windows_primer - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


c:

//
// windows_primer.cpp - Windows Primer
//
// Copyright 2004 by Ken Paulson
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the Drunken Hyena License.  If a copy of the license was
// not included with this software, you may get a copy from:
// http://www.drunkenhyena.com/docs/DHLicense.txt
//
#define WIN32_LEAN_AND_MEAN          // Exclude rarely-used stuff from Windows headers
#include "C:\Documents and Settings\Andrew\My Documents\Visual Studio 2005\Projects\Include\d3dx9.h"
#include "../common/dhWindow.h"
#include "../common/dhUtility.h"
#include "C:\Documents and Settings\Andrew\My Documents\Visual Studio 2005\Projects\common\objbase.h"

// This is causes the required libraries to be linked in, the same thing can
// be accomplished by adding it to your compiler's link list
// (Project->Settings->Link in VC++), but I prefer this method.
#pragma comment(lib,"dxerr9.lib")

// Forward declarations for all of our functions, see their definitions for more detail
LRESULT CALLBACK default_window_proc(HWND p_hwnd,UINT p_msg,WPARAM p_wparam,LPARAM p_lparam);

// The name of our application.  Used for window and MessageBox titles and error reporting
const char *g_app_name="Windows Primer";

// Our screen/window size.  A better app would allow the user to choose the
// sizes.  I'll do that in a later tutorial, for now this is good enough.
const int g_width=640;
const int g_height=480;

// Our global flag to track whether we should quit or not.  When it becomes true, we clean
// up and exit.
bool g_app_done=false;


//******************************************************************************************
// Function:WinMain
// Whazzit:The entry point of our application
//******************************************************************************************
int APIENTRY WinMain(HINSTANCE ,HINSTANCE ,LPSTR ,int ){
bool fullscreen;
HWND window=NULL;
HRESULT hr;

   // Prompt the user, Full Screen?  Windowed?  Cancel?
   fullscreen=dhAskFullscreen(g_app_name);


   // Build our window.
   hr=dhInitWindow(fullscreen,g_app_name,g_width,g_height,default_window_proc,&window);
   if(FAILED(hr)){
      return 0;
   }


   //Loop until the user aborts (closes the window,presses the left mouse button or hits a key)
   while(!g_app_done){
     
      dhMessagePump();   //Check for window messages

   }

   //Close down our window
   dhKillWindow(&window);

   //Exit happily
   return 0;
}

//******************************************************************************************
// Function:default_window_proc
// Whazzit:This handles any incoming Windows messages and sends any that aren't handled to
//         DefWindowProc for Windows to handle.
//******************************************************************************************
LRESULT CALLBACK default_window_proc(HWND p_hwnd,UINT p_msg,WPARAM p_wparam,LPARAM p_lparam){
   
   switch(p_msg){
      case WM_KEYDOWN:     // A key has been pressed, end the app
         if (p_wparam == VK_ESCAPE) {
            g_app_done = true;
            return 0;
         }
         break;
      case WM_CLOSE:       //User hit the Close Window button, end the app
      case WM_LBUTTONDOWN: //user hit the left mouse button
         g_app_done=true;
         return 0;
   }
   
   return (DefWindowProc(p_hwnd,p_msg,p_wparam,p_lparam));
   
}


//******************************************************************************************
// Function:InitVolatileResources
// Whazzit: Initialize resources that need to re-created on a device reset
//******************************************************************************************
void InitVolatileResources(void){

   //There is nothing to do here in this lesson, but later lessons will use these functions
   //and discuss their use


}
//******************************************************************************************
// Function:FreeVolatileResources
// Whazzit:Free resources that need to re-created on a device reset
//******************************************************************************************
void FreeVolatileResources(void){

   //There is nothing to do here in this lesson, but later lessons will use these functions
   //and discuss their use

}
Sponsor
Sponsor
Sponsor
sponsor
rdrake




PostPosted: Sun May 27, 2007 12:18 am   Post subject: RE:objbase.h not found :angry:

You probably need to tell Visual Studio where to look for the objects.

First hit on Google: here.
Mazer




PostPosted: Sun May 27, 2007 8:37 am   Post subject: RE:objbase.h not found :angry:

For the record, OpenGL is quite widely used. Glaux is not, and this is one of the reasons why many people consider the NeHe tutorials (especially the first few) to be utter shit.

EDIT: Since I know you're trying to figure out graphics, I'd recommend checking out this tutorial I posted. Regrettably, I didn't discuss the problems with the nehe tutorials much. Graphics programming can be a bitch to learn because there's so much out there that you won't understand that it's easy to learn things the wrong way and screw yourself over even more.
wtd




PostPosted: Sun May 27, 2007 10:30 am   Post subject: Re: RE:objbase.h not found :angry:

Mazer @ Sun May 27, 2007 9:37 pm wrote:
Graphics programming can be a bitch to learn because there's so much out there that you won't understand that it's easy to learn things the wrong way and screw yourself over even more.


Combine that with masses of dubious online C and C++ instructional materials and you have a double whammy.
Geostigma




PostPosted: Sun May 27, 2007 9:25 pm   Post subject: RE:objbase.h not found :angry:

..... I have to find a base folder that has all these .h files... I got all the directx crap working but im missing everything else.


objbase.h rpc.h .... this is just blamb....

------ Build started: Project: windows_primer, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D9040 : ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
dhWindow.cpp
c:\program files\microsoft directx sdk (april 2007)\common\header\dhwindow.h(16) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
dhUtility.cpp
c:\program files\microsoft directx sdk (april 2007)\common\source\dhutility.cpp(12) : fatal error C1083: Cannot open include file: 'atlstr.h': No such file or directory
windows_primer.cpp
c:\program files\microsoft directx sdk (april 2007)\include\objbase.h(12) : fatal error C1083: Cannot open include file: 'rpc.h': No such file or directory
Generating Code...
Build log was saved at "file://c:\Program Files\Microsoft Visual Studio 8\files\dxtest\windows_primer\Debug\BuildLog.htm"
windows_primer - 3 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========[/code]

I also don't know how to find this link option to add these libraries that maybe from one of the links i should add.
shell32.lib
gdi32.lib
kernel32.lib
user32.lib
comdlg32.lib
ole32.lib
oleaut32.lib
advapi32.lib

[code]
rdrake




PostPosted: Sun May 27, 2007 10:20 pm   Post subject: RE:objbase.h not found :angry:

Am I to understand you installed the DirectX SDK?
Martin




PostPosted: Mon May 28, 2007 8:36 am   Post subject: RE:objbase.h not found :angry:

Do yourself a favour and buy a book. I recommend this. At under $21, you can't go wrong. I worked through it and I was very impressed.
Geostigma




PostPosted: Mon May 28, 2007 9:34 am   Post subject: Re: objbase.h not found :angry:

Obviously I DL'd the Direct X SDK. It wouldn't work period and would give me ::cant find D3dx.h :: I don't know how buying a book is supposed to help me manage all the files and link them together or find what im missing. This is just fusterating beyond anything
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Mon May 28, 2007 11:20 am   Post subject: RE:objbase.h not found :angry:

I haven't read the book myself, but perhaps the book will give you instructions on how to do it? Just getting your nose all out of joint because you don't get the answer handed to you on a silver platter isn't going to help. rdrake gave you a link straight to a page which may help you solve your problem.
Martin




PostPosted: Mon May 28, 2007 3:14 pm   Post subject: Re: objbase.h not found :angry:

Geostigma @ Mon 28 May, 23:34 wrote:
Obviously I DL'd the Direct X SDK. It wouldn't work period and would give me ::cant find D3dx.h :: I don't know how buying a book is supposed to help me manage all the files and link them together or find what im missing. This is just fusterating beyond anything


My point was just that online tutorials tend to be very poor, and books tend to be written by Ph.D's who know what they are talking about. You need to learn the basics before you can get into the advanced stuff, and trying to skip over that without understanding will only lead you to frustration later. This is not meant to discourage you. If you're serious about learning how to do graphics, you should do it right. Pretend that you know nothing, and start from the beginning. Make it a goal to understand every line of code that you write. Every programmer in the world started with a simple Hello World, and there is no shame in that.

Buy this book on SDL. It teaches you how to use SDL for graphics, sound and input. It's short, so you can probably blow through it in a few weeks. Then get the OpenGL book that I recommended. Together they'll set you back $57 + shipping (which is free if you get them together). In a month you'll be a better programmer than you would after a year of going through those online tutorials that you don't understand. Remember that the goal should be to understand, not to simply create a cool game. That will come with understanding.
Geostigma




PostPosted: Mon May 28, 2007 3:45 pm   Post subject: RE:objbase.h not found :angry:

Now I feel like I'm starting to repeat my self about getting help. I'm not asking you to serve me things on the silver platter. I took that link rdrake posted, found the answer to one problem but not another. I don't like the idea about buying books to learn X thing because the only problem is setting up everything so it compiles. I have checked off things that people and the official MS website said to have before starting up programing for DirectX and i made sure that i have re read things to make sure I'm not forgetting anything.

Sure ill buy books on how to do X thing, I have a book on C++ that I read daily and i play around with it. I have a good concept about it, but I'm a person who likes to play with graphics and I want to be able to do something before wasting money on something because I wont read it. I rather it be an investment
Martin




PostPosted: Mon May 28, 2007 4:03 pm   Post subject: RE:objbase.h not found :angry:

Okay, I'm sorry. Your problem is that your include directories aren't set up properly. This is possibly from the #include "C:\Documents and Settings\Andrew\My Documents\Visual Studio 2005\Projects\Include\d3dx9.h" line. I don't have Windows, but this is likely what's causing the linker error. Try looking around the project properties for an include directories option, and add "C:\Documents and Settings\Andrew\My Documents\Visual Studio 2005\Projects\Include" to it.

EDIT: I think Project -> Properties -> Linker -> Additional Library Directories might do the trick.
Geostigma




PostPosted: Mon May 28, 2007 4:54 pm   Post subject: RE:objbase.h not found :angry:

Quote:
EDIT: I think Project -> Properties -> Linker -> Additional Library Directories might do the trick.



This does not exsist in VC 2005. However there is a project options where you include the directories of the libraries, source and headder files but its not called a linker. I have the Direct X libraries set up properly now because I don't have any issues with it. I think my problem is im missing the window's server SDK. First hit I got on google
Mazer




PostPosted: Mon May 28, 2007 6:03 pm   Post subject: RE:objbase.h not found :angry:

Why would you need that?
Geostigma




PostPosted: Mon May 28, 2007 6:14 pm   Post subject: RE:objbase.h not found :angry:

Because VC 2005 Express is a pile of notworkingness. Apparently I can't do any sort of programming with Direct x with it because its missing a lot of H files that only VC 2003 the full blown version has.

code:
------ Build started: Project: windows_primer, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D9040 : ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
dhUtility.cpp
c:\program files\microsoft directx sdk (april 2007)\common\source\dhutility.cpp(12) : fatal error C1083: Cannot open include file: 'atlstr.h': No such file or directory
Build log was saved at "file://c:\Program Files\Microsoft Visual Studio 8\files\dxtest\windows_primer\Debug\BuildLog.htm"
windows_primer - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


'atlstr.h is an example of a file that only VC 03 offers because the way the Direct X sdk is. I installed the windows SDK and now I have all my problems fixed with OpenGL (minus GLaux) and direct X (minus core header files) So unless theres a work around I'll have to get 03.

EDIT: Wait, why does it matter the site i uses spacifically says VS 2005 ... I'm lost
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 28 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: