Ошибка c1083 не удается открыть файл включение

15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

1

04.02.2014, 17:29. Показов 27638. Ответов 13


Студворк — интернет-сервис помощи студентам

Ошибка 1 error C1083: Не удается открыть файл включение: Zagolovotsnyj_loaded_ library.h: No such file or directory d:прога2014прогапробаreshenie_loaded_ librarydlltestdlltest.cpp 6 1 DLLtest

Прокоментируйте пожалуста.

Миниатюры

Не удается открыть файл включение. No such file or directory
 



0



3254 / 2056 / 351

Регистрация: 24.11.2012

Сообщений: 4,909

04.02.2014, 17:41

2

Файл находится в другом проекте и в другом каталоге. Чтобы он был виден, поправьте настройки проекта (пути к заголовочным файлам)



1



15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

04.02.2014, 19:07

 [ТС]

3

Свойства -> Конфигурация Свойства -> C / C + + -> Общие -> Дополнительные каталоги включения -> $(ProjectDir)D:Прога2014ПрогапробаReshenie_loaded_ libraryDebugloaded_ library.dll

Как ему указать еще? Может я что-то лишнеевписал или наоборот не вписал?



0



3254 / 2056 / 351

Регистрация: 24.11.2012

Сообщений: 4,909

04.02.2014, 19:11

4

Указать нужно каталог с исходниками, а вы пишете полный путь до dll.



1



15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

04.02.2014, 20:05

 [ТС]

5

А можете написать, где это в моем случае?



0



3254 / 2056 / 351

Регистрация: 24.11.2012

Сообщений: 4,909

04.02.2014, 20:09

6

У меня даже винды нет, чтобы проверить какая структура у проектов. Ну судя по тому, что вижу, путь к солюшену должен быть такой:
D:Прога2014ПрогапробаReshenie_loaded_ library
Соответственно, подключать файлы соседних проектов можно как
#include <ProjectName/file.h>
В данном случае это <loaded_library/Za…>



1



Dimka-novitsek

15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

04.02.2014, 21:19

 [ТС]

7

Может конечно я опять что-то напутал

C++
1
#include <loaded_ library/Zagolovotsnyj_loaded_ library.h>

Не выходит

Добавлено через 1 минуту
Ошибка 1 error C1083: Не удается открыть файл включение: loaded_ library/Zagolovotsnyj_loaded_ library.h: No such file or directory d:прога2014прогапробаreshenie_loaded_ librarydlltestdlltest.cpp 6 1 DLLtest
2 IntelliSense: не удается открыть источник файл «loaded_ library/Zagolovotsnyj_loaded_ library.h» d:прога2014прогапробаreshenie_loaded_ librarydlltestdlltest.cpp 6 1 DLLtest



0



3254 / 2056 / 351

Регистрация: 24.11.2012

Сообщений: 4,909

04.02.2014, 21:21

8

Какие-то пробелы лишние образовались.



1



15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

04.02.2014, 21:35

 [ТС]

9

хм!! Спасибо!! Я же его мышью скопировал, из относительного пути. Щас разберусь!!!

Добавлено через 5 минут
Представляете, из свойств, из относительного пути- так и копируется. Это не ошибка.

Добавлено через 3 минуты
Да!!! А вот если я открываю папку с проектом в компе проводником, так там пробела нету!! как он образовывается, не знаю! Вот это да.

Добавлено через 25 секунд
Но не компилируется в двух вариантах.

Миниатюры

Не удается открыть файл включение. No such file or directory
 



0



15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

05.02.2014, 00:44

 [ТС]

10

Вот



0



3254 / 2056 / 351

Регистрация: 24.11.2012

Сообщений: 4,909

05.02.2014, 06:41

11

В названиях каталога, солюшна и проекта пробелы… Просмотрите еще раз все внимательно.



1



15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

05.02.2014, 11:03

 [ТС]

12

Доброго утра!!Да я это видел. Пробел- это не ошибка. Я уже проект с пробелами не трогаю, а то будет тема как вернуть проект после переименования файлов.cpp b/h. Шучу конечно. Проект можно переписать минут за 20. Но пробел-не ошибка.



0



0x10

3254 / 2056 / 351

Регистрация: 24.11.2012

Сообщений: 4,909

05.02.2014, 11:29

13

Цитата
Сообщение от Dimka-novitsek
Посмотреть сообщение

Пробел- это не ошибка

Нет, но поскольку он мало заметен, может стать причиной. Некоторые вещи просто нельзя пропускать в проект. В частности спецсимволы в именах файлов. Не говорю уже о транслите.
Открыл текстовым редактором файл DLLtest.vcxproj и что вижу

XML
1
2
3
4
5
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">                                                        
  <ClCompile>
    <AdditionalIncludeDirectories>D:Прога2014ПрогапробаReshenie_loaded_ libraryDebugloaded_ library.dllinclude</AdditionalIncludeDirectories>
  </ClCompile>                                                                                                                         
</ItemDefinitionGroup>

Ну вот что это за кривой путь.



1



15 / 15 / 2

Регистрация: 26.04.2012

Сообщений: 1,091

06.02.2014, 18:13

 [ТС]

14

Спасибо.

Решение

Свойства -> Конфигурация Свойства -> C / C + + -> Общие -> Дополнительные каталоги включения -> D:Прога2014ПрогапробаReshenie_lo aded_ libraryDebugloaded_ library.dll
Я туда пробовал вписывать разное, почти с десятоквариатов, начиная от полного пути и по всякому. сечас у меня там
К стати, нашлись какие то т.н. Макросы, их довольно много. Кажется, я думаю, они-то как раз могут изменяться, если я перемещу решение в другое мкесто. Только скопировать я их не могу.
Макросы-сила!!!!!!!!!!!!!!!!!!!!! Кажется. это решение.

$(SolutionDir)loaded_ library



0



If the target «include» directory is added to «additiona includes» project property, then you really don’t need the path at all.

I mean, having:

myFolderproject
                 project.vcproj
                 source
                      myCode.cpp    <- compiling this one here?
                 data
                      myDb.foo
                 include            <- this DIR#1
                         foo1.h
                         myClass.h  <- this FILE#1
                         foo2.h
                         lib1
                              bar.h <- this FILE#2

if you added DIR#1 to «additional include directories», then:

#include "myClass.h"  // to include FILE#1
#include "lib1bar.h"  // to include FILE#2

should be enough.

In case you not added the path there, the following should work:

#include "includemyClass.h"  // to include FILE#1
#include "includelib1bar.h"  // to include FILE#2

If you added the path and the first does not work, but the second one works, then you added the path incorrectly — make absolutely sure that the file/folder structure is really the same as you think it is. Also, if you added relative path to the project, try changing it to absolute.

description title ms.date f1_keywords helpviewer_keywords ms.assetid

Learn more about: Fatal Error C1083

Fatal Error C1083

09/01/2017

C1083

C1083

97e52df3-e79c-4f85-8f1e-bbd1057d55e7

Fatal Error C1083

Cannot open filetype file: ‘file‘: message

The compiler generates a C1083 error when it can’t find a file it requires. There are many possible causes for this error. An incorrect include search path or missing or misnamed header files are the most common causes, but other file types and issues can also cause C1083. Here are some of the common reasons why the compiler generates this error.

The specified file name is wrong

The name of a file may be mistyped. For example,

#include <algorithm.h>

might not find the file you intend. Most C++ Standard Library header files do not have a .h file name extension. The <algorithm> header would not be found by this #include directive. To fix this issue, verify that the correct file name is entered, as in this example:

#include <algorithm>

Certain C Runtime Library headers are located in a subdirectory of the standard include directory. For example, to include sys/types.h, you must include the sys subdirectory name in the #include directive:

#include <sys/types.h>

The file is not included in the include search path

The compiler cannot find the file by using the search rules that are indicated by an #include or #import directive. For example, when a header file name is enclosed by quotation marks,

#include "myincludefile.h"

this tells the compiler to look for the file in the same directory that contains the source file first, and then look in other locations specified by the build environment. If the quotation marks contain an absolute path, the compiler only looks for the file at that location. If the quotation marks contain a relative path, the compiler looks for the file in the directory relative to the source directory.

If the name is enclosed by angle brackets,

#include <stdio.h>

the compiler follows a search path that is defined by the build environment, the /I compiler option, the /X compiler option, and the INCLUDE environment variable. For more information, including specific details about the search order used to find a file, see #include Directive (C/C++) and #import Directive.

If your include files are in another directory relative to your source directory, and you use a relative path in your include directives, you must use double quotes instead of angle brackets. For example, if your header file myheader.h is in a subdirectory of your project sources named headers, then this example fails to find the file and causes C1083:

#include <headersmyheader.h>

but this example works:

#include "headersmyheader.h"

Relative paths can also be used with directories on the include search path. If you add a directory to the INCLUDE environment variable or to your Include Directories path in Visual Studio, do not also add part of the path to the include directives. For example, if your header is located at pathexampleheadersmyheader.h, and you add pathexampleheaders to your Include Directories path in Visual Studio, but your #include directive refers to the file as

#include <headersmyheader.h>

then the file is not found. Use the correct path relative to the directory specified in the include search path. In this example, you could change the include search path to pathexample, or remove the headers path segment from the #include directive.

Third-party library issues and vcpkg

If you see this error when you are trying to configure a third-party library as part of your build, consider using vcpkg, a C++ package manager, to install and build the library. vcpkg supports a large and growing list of third-party libraries, and sets all the configuration properties and dependencies required for successful builds as part of your project.

The file is in your project, but not the include search path

Even when header files are listed in Solution Explorer as part of a project, the files are only found by the compiler when they are referred to by an #include or #import directive in a source file, and are located in an include search path. Different kinds of builds might use different search paths. The /X compiler option can be used to exclude directories from the include search path. This enables different builds to use different include files that have the same name, but are kept in different directories. This is an alternative to conditional compilation by using preprocessor commands. For more information about the /X compiler option, see /X (Ignore Standard Include Paths).

To fix this issue, correct the path that the compiler uses to search for the included or imported file. A new project uses default include search paths. You may have to modify the include search path to add a directory for your project. If you are compiling on the command line, add the path to the INCLUDE environment variable or the /I compiler option to specify the path to the file.

To set the include directory path in Visual Studio, open the project’s Property Pages dialog box. Select VC++ Directories under Configuration Properties in the left pane, and then edit the Include Directories property. For more information about the per-user and per-project directories searched by the compiler in Visual Studio, see VC++ Directories Property Page. For more information about the /I compiler option, see /I (Additional Include Directories).

The command line INCLUDE or LIB environment is not set

When the compiler is invoked on the command line, environment variables are often used to specify search paths. If the search path described by the INCLUDE or LIB environment variable is not set correctly, a C1083 error can be generated. We strongly recommend using a developer command prompt shortcut to set the basic environment for command line builds. For more information, see Build C/C++ on the Command Line. For more information about how to use environment variables, see How to: Use Environment Variables in a Build.

The file may be locked or in use

If you are using another program to edit or access the file, it may have the file locked. Try closing the file in the other program. Sometimes the other program can be Visual Studio itself, if you are using parallel compilation options. If turning off the parallel build option makes the error go away, then this is the problem. Other parallel build systems can also have this issue. Be careful to set file and project dependencies so build order is correct. In some cases, consider creating an intermediate project to force build dependency order for a common file that may be built by multiple projects. Sometimes antivirus programs temporarily lock recently changed files for scanning. If possible, consider excluding your project build directories from the antivirus scanner.

The wrong version of a file name is included

A C1083 error can also indicate that the wrong version of a file is included. For example, a build could include the wrong version of a file that has an #include directive for a header file that is not intended for that build. For example, certain files may only apply to x86 builds, or to Debug builds. When the header file is not found, the compiler generates a C1083 error. The fix for this problem is to use the correct file, not to add the header file or directory to the build.

The precompiled headers are not yet precompiled

When a project is configured to use precompiled headers, the relevant .pch files have to be created so that files that use the header contents can be compiled. For example, the pch.cpp file (stdafx.cpp in Visual Studio 2017 and earlier) is automatically created in the project directory for new projects. Compile that file first to create the precompiled header files. In the typical build process design, this is done automatically. For more information, see Creating Precompiled Header Files.

Additional causes

  • You have installed an SDK or third-party library, but you have not opened a new developer command prompt window after the SDK or library is installed. If the SDK or library adds files to the INCLUDE path, you may need to open a new developer command prompt window to pick up these environment variable changes.

  • The file uses managed code, but the compiler option /clr is not specified. For more information, see /clr (Common Language Runtime Compilation).

  • The file is compiled by using a different /analyze compiler option setting than is used to precompile the headers. When the headers for a project are precompiled, all should use the same /analyze settings. For more information, see /analyze (Code Analysis).

  • The file or directory was created by the Windows Subsystem for Linux, per-directory case sensitivity is enabled, and the specified case of a path or file does not match the case of the path or file on disk.

  • The file, the directory, or the disk is read-only.

  • Visual Studio or the command line tools do not have sufficient permissions to read the file or the directory. This can happen, for example, when the project files have different ownership than the process running Visual Studio or the command line tools. Sometimes this issue can be fixed by running Visual Studio or the developer command prompt as Administrator.

  • There are not enough file handles. Close some applications and then recompile. This condition is unusual under typical circumstances. However, it can occur when large projects are built on a computer that has limited physical memory.

Example

The following example generates a C1083 error when the header file "test.h" does not exist in the source directory or on the include search path.

// C1083.cpp
// compile with: /c
#include "test.h"   // C1083 test.h does not exist
#include "stdio.h"  // OK

For information about how to build C/C++ projects in the IDE or on the command line, and information about setting environment variables, see Projects and build systems.

See also

  • MSBuild Properties

Python 3.5.3

Устанавливаю с помощью pip: pip install twisted

Проблема возникает с компилятором С++ в Visual Studio, командой cl.exe.

Текст исключения:

creating buildtemp.win-amd64-3.5Releasesrctwistedtest
E:GamesVStudioVCbincl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -Ic:python353include -Ic:python353include /Tcsrc/twisted/test/raiser.c /Fobuildtemp.win-amd64-3.5Releasesrc/twisted/test/raiser.obj
raiser.c
c:python353includepyconfig.h(68): fatal error C1083: Не удается открыть файл включение: io.h: No such file or directory
error: command 'E:\Games\VStudio\VC\bin\cl.exe' failed with exit status 2



 ----------------------------------------
Command "c:python353python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\MYPABEi\AppData\Local\Temp\pip-build-hcmi2wbn\twisted\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersMYPABEiAppDataLocalTemppip-dgx2m4il-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersMYPABEiAppDataLocalTemppip-build-hcmi2wbntwisted

Ошибка: fatal error C1083: Не удается открыть файл включение: io.h: No such file or directory

Я так понимаю, что компилятор не может найти нужные библиотеки? И непонятно где он их ожидает найти.

Тем не менее где они расположены я вкурсе.

Подскажите, пожалуйста, как указать компилятору, где они находятся.

посмотри есть ли файл по этому пути и к примеру на какой папке в этом пути облом (почти наверняка 14.31.31103 называется по другому)
можно конечно поковырять реестр вручную и найти почему пути там неверные стоят но это потребует кучу усилий.

я не знаю почему у тебя это произошло но переустановка или починка (кнопка repair в инсталяторе) должна решать такие проблемы

совет, если repair не работает (точнее отрабатывает но проблема остается) удалить полностью всю студию, после пройтись по установка удаление программ и там удалить все что так или иначе качается ее (скорее там будут остатки от sql и возможно патчи), смотри просто по дате установки, все компоненты должны быть примерно с одной датой

перед этим по уму нужно бы конфигурацию забакапить, есть такая опция в установщике, позже импортируешь, но есть у меня на этот счет сомнения

https://docs.microsoft.com/ru-ru/visualstudio/inst…

затем удали в реестре ветки, относящиеся к студии (надеюсь у тебя других версий нет) HKCUSoftwareMicrosoftVisualStudio и HKLMSoftwareMicrosoftVisualStudio затем можно вручную удалить оставшиеся файлы студии в program files и по уму надо пройтись по отсутствующим компонентам и их тоже разрегистрировать каким-нибудь клианером (я пользуюсь майрокофтовским sysinternails autoruns он показывает какие записи в реестре ссылаются в никуда)

по уму еще надо в appdata профиля пользователя почистить от кучи файлов (там будут и кеши nuget например)

вот тут нагуглилась майкрософтоваская утилита по удалению остатков студии

и уже после этого, перезагрузивишсь, убедившись что все остатки студии удалены, заново запусти установку

Возможно, вам также будет интересно:

  • Ошибка c1075 не найдена несоответствующая лексема
  • Ошибка c1075 на сузуки гранд витара
  • Ошибка c1061 сузуки гранд витара
  • Ошибка c1061 suzuki grand vitara
  • Ошибка c1050 фиат дукато 250

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии