7 Replies - 4963 Views - Last Post: 09 May 2011 - 07:44 PM Rate Topic: -----

#1 and1dre  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 69
  • Joined: 30-March 09

No such file or directory

Posted 09 May 2011 - 06:34 PM

I'm getting this error when I try to compile:
fatal error: util/util.h: No such file or directory

I'm using Ubuntu 11.04 and using Eclipse. Anyone have an idea how to fix this?
Is This A Good Question/Topic? 0
  • +

Replies To: No such file or directory

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 4098
  • View blog
  • Posts: 12,682
  • Joined: 25-December 09

Re: No such file or directory

Posted 09 May 2011 - 06:51 PM

Please post the code causing this error. The util.h header file is not a standard include file. And the complete error message exactly as you see it in your development environment.


Jim

This post has been edited by jimblumberg: 09 May 2011 - 06:52 PM

Was This Post Helpful? 0
  • +
  • -

#3 and1dre  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 69
  • Joined: 30-March 09

Re: No such file or directory

Posted 09 May 2011 - 06:55 PM

View Postjimblumberg, on 09 May 2011 - 07:51 PM, said:

Please post the code causing this error. The util.h header file is not a standard include file. And the complete error message exactly as you see it in your development environment.


Jim


#include "util/util.h"


ERROR:
../testCheck.cpp:22:23: fatal error: util/util.h: No such file or directory

I'm trying to use google RE2 (http://code.google.com/p/re2/). I downloaded their files. I guess I need to link them to my project somehow and I'm not sure how to do that.

This post has been edited by and1dre: 09 May 2011 - 06:56 PM

Was This Post Helpful? 0
  • +
  • -

#4 r.stiltskin  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1833
  • View blog
  • Posts: 4,927
  • Joined: 27-December 05

Re: No such file or directory

Posted 09 May 2011 - 06:59 PM

View Postand1dre, on 09 May 2011 - 08:34 PM, said:

Anyone have an idea how to fix this?

The compiler can't find the header file util.h. It's not part of the C or C++ standard library, so it must be one of your files, or part of whatever project you're trying to compile. You'll have to find it and change your #include directive to the correct path.
Was This Post Helpful? 0
  • +
  • -

#5 r.stiltskin  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1833
  • View blog
  • Posts: 4,927
  • Joined: 27-December 05

Re: No such file or directory

Posted 09 May 2011 - 07:07 PM

The Google RE2 download page has an entire directory called util. Maybe you didn't download it. If you did, your #include statement has to give the correct path to dthe location where you saved that directory.
Was This Post Helpful? 0
  • +
  • -

#6 and1dre  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 69
  • Joined: 30-March 09

Re: No such file or directory

Posted 09 May 2011 - 07:11 PM

View Postr.stiltskin, on 09 May 2011 - 08:07 PM, said:

The Google RE2 download page has an entire directory called util. Maybe you didn't download it. If you did, your #include statement has to give the correct path to dthe location where you saved that directory.


Yup I got the directory. Would you happen to know how to set the path? I see there is bunch of include directories in /usr/include. I'm not sure where to place it.
Was This Post Helpful? 0
  • +
  • -

#7 r.stiltskin  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1833
  • View blog
  • Posts: 4,927
  • Joined: 27-December 05

Re: No such file or directory

Posted 09 May 2011 - 07:21 PM

How and where did you install re2? Did you follow the instructions here?

It's generally not a good idea to put things in /usr/include yourself unless you really know what you're doing. That directory should be kept for files that your distribution puts there.

I haven't used re3 or examined it's install configuration, but a good place to look is probably /usr/local/include or maybe /opt/re2.

And if not there, try this command
sudo find /usr -iname util.h
Was This Post Helpful? 1
  • +
  • -

#8 and1dre  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 69
  • Joined: 30-March 09

Re: No such file or directory

Posted 09 May 2011 - 07:44 PM

Yup I followed those instructions.
Its placed in /home/and/
I'll definitely look into those. THX for the tip!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1