1
#include <math.h>
#include <stdlib.h>
#include "snipmath.h"
#include <stdio.h>
#include "prec.h"
#include <mpir.h>
#include <mpfr.h>

I have a .c file in my project in Visual Studio and I have included the above headers. All the headers have no errors except the prec.h line. I have tried including its path in "Additional Include Directories". Why cant it open this particular source file?

alk
  • 69,737
  • 10
  • 105
  • 255
  • 2
    Does your account have the rights to read it? – alk Feb 13 '14 at 14:29
  • What error is displayed ? Does the prec.h file exist ? If yes in which directory ? In which directory is snipmath.h ? – Jabberwocky Feb 13 '14 at 14:58
  • Yes it does exist. Both prec.h and snipmath.h are in the same directory. The error displayed is:cannot open source file – user3306419 Feb 13 '14 at 15:13
  • Have you tried to open prec.h in your editor ? – Jabberwocky Feb 13 '14 at 16:02
  • How is the error displayed **exactly** ? With VS2012 it would be something like: `error C1083: Cannot open include file: 'myheaderfile.h': No such file or directory s:\MyProject\myfile.cpp 3` – Jabberwocky Feb 13 '14 at 16:06
  • fatal error C1083: Cannot open include file: 'prec.h': No such file or directory – user3306419 Feb 13 '14 at 16:27
  • Try the [procmon utility](http://technet.microsoft.com/en-us/sysinternals/bb896645) from microsoft. This allows you to monitor all file activity on your computer. This will show you in which directory the compiler tries to open the prec.h file. – Jabberwocky Feb 14 '14 at 08:01

1 Answers1

0

3 solutions:

  1. While hovering on file name look where it is located. You should give full address if prec.h is outside project folder.

  2. move prec.h to your local project folder

  3. configure visual studio to look for your .h files in your custom folder

dinomoth
  • 86
  • 6