Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

C++ Problem: "fatal error: device.h: No such file or directory:

c++ problem device.h

  • Please log in to reply
3 replies to this topic

#1 maryeliezka

maryeliezka

    CC Lurker

  • New Member
  • Pip
  • 4 posts
  • Programming Language:C++, Pascal
  • Learning:Java, C++, (Visual) Basic, Python, Ruby, Delphi/Object Pascal

Posted 14 September 2012 - 05:51 PM

Got a serious problem here. I was trying to compile a bresenham algorithm program using header ::


#include "device.h"


I got an error:

bresenham.cpp:1:20: fatal error: device.h: No such file or directory
compilation terminated.


Even it's the same when i wrote like this too:

#include <device.h>


I went checking the header file's existence. I found a lots of them using gnome-search-tool. I was trying to compile using windows compiler, it's still the same. What happen with this header file actually?
  • 0

#2 kernelcoder

kernelcoder

    CC Devotee

  • Expert Member
  • PipPipPipPipPipPip
  • 990 posts
  • Location:Dhaka
  • Programming Language:C, Java, C++, C#, Visual Basic .NET
  • Learning:Objective-C, PHP, Python, Delphi/Object Pascal

Posted 14 September 2012 - 06:22 PM

Simply the compiler is not able to find the header file 'device.h'.

What do you mean by "I found a lots of them using gnome-search-tool. I was trying to compile using windows compiler..."? You mean you are able to compile without error on Linux but you are getting error on Windows? if yes, hat compiler you are suing on Windows, Or, are you compiling with Visual Studio? And last, which library/component the 'device.h' header should be in?
  • 0

#3 maryeliezka

maryeliezka

    CC Lurker

  • New Member
  • Pip
  • 4 posts
  • Programming Language:C++, Pascal
  • Learning:Java, C++, (Visual) Basic, Python, Ruby, Delphi/Object Pascal

Posted 14 September 2012 - 07:19 PM

You mean you are able to compile without error on Linux but you are getting error on Windows? if yes, hat compiler you are suing on Windows Or, are you compiling with Visual Studio?




bresenham.cpp:1:20: fatal error: device.h: No such file or directory
compilation terminated.

^
^
I thought i have stated that i got error in linux, also in windows. I often find out that i often fail compiling in linux, so i thought maybe there are more header files there, or it's easier to find header there. So, i'm not suing anyone here :) I'm using Dev-cpp to compile in windows.


And last, which library/component the 'device.h' header should be in


From what i saw in the compiler error message:
void lineBres ()
abs and setPixel

CMIIW, i'm still noob here, sorry...
  • 0

#4 Smilex

Smilex

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 76 posts
  • Location:Faroe Islands
  • Programming Language:C, C++, PHP, Python, JavaScript, Lua, Others
  • Learning:Objective-C, PHP, Python, Assembly, Bash

Posted 24 September 2012 - 04:05 AM

This might not add much, but could you try to change #include "device.h" to #include "linux/device.h" and compile under Linux?
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download