Russian Qt Forum

Qt => Вопросы новичков => Тема начата: saim от Июля 15, 2013, 12:20



Название: machine/endian.h: No such file or directory
Отправлено: saim от Июля 15, 2013, 12:20
Здравствуйте !! Помогите кто в силах .
При сборке LLVM + Clang вернее выдернутых отдельных модулей, не находит файла.
Проект собираю под QtCreator c помощью CMake (указывая CMakeLists.txt как файл проекта).
Файл лежит в директории ../llvm/include/..
Эта директория подключается (на сколько я понял) в файле CMakeLists.txt , код приведённый в прикреплённом файле

С ув. Илья


Название: Re: machine/endian.h: No such file or directory
Отправлено: Bepec от Июля 15, 2013, 14:06
У меня к вам просьба.

90% тут собравшихся русские, уважайте пожалуйста их (и меня). Если вам позволяют религиозные взгляды и вы не умеете/можете писать на русском, переводите с мовы на русский на великолепном сайте http://translate.google.ru/ .

По делу - а он у вас там лежит, этот файл?


Название: Re: machine/endian.h: No such file or directory
Отправлено: saim от Июля 29, 2013, 12:03
Здравствуйте !

В исходном файле :
Код:
00001 //===- llvm/Support/Host.h - Host machine characteristics --------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // Methods for querying the nature of the host machine.
00011 //
00012 //===----------------------------------------------------------------------===//
00013
00014 #ifndef LLVM_SUPPORT_HOST_H
00015 #define LLVM_SUPPORT_HOST_H
00016
00017 #include "llvm/ADT/StringMap.h"
00018
00019 #if defined(__linux__) || defined(__GNU__)
00020 #include <endian.h>
00021 #else
00022 #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
00023 #include <machine/endian.h>
00024 #endif
00025 #endif
00026
00027 #include <string>
00028
00029 namespace llvm {
00030 namespace sys {
00031
00032 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
00033   static const bool IsBigEndianHost = true;
00034 #else
00035   static const bool IsBigEndianHost = false;
00036 #endif
00037
00038   static const bool IsLittleEndianHost = !IsBigEndianHost;
00039
00040   /// getDefaultTargetTriple() - Return the default target triple the compiler
00041   /// has been configured to produce code for.
00042   ///
00043   /// The target triple is a string in the format of:
00044   ///   CPU_TYPE-VENDOR-OPERATING_SYSTEM
00045   /// or
00046   ///   CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM
00047   std::string getDefaultTargetTriple();
00048
00049   /// getProcessTriple() - Return an appropriate target triple for generating
00050   /// code to be loaded into the current process, e.g. when using the JIT.
00051   std::string getProcessTriple();
00052
00053   /// getHostCPUName - Get the LLVM name for the host CPU. The particular format
00054   /// of the name is target dependent, and suitable for passing as -mcpu to the
00055   /// target which matches the host.
00056   ///
00057   /// \return - The host CPU name, or empty if the CPU could not be determined.
00058   std::string getHostCPUName();
00059
00060   /// getHostCPUFeatures - Get the LLVM names for the host CPU features.
00061   /// The particular format of the names are target dependent, and suitable for
00062   /// passing as -mattr to the target which matches the host.
00063   ///
00064   /// \param Features - A string mapping feature names to either
00065   /// true (if enabled) or false (if disabled). This routine makes no guarantees
00066   /// about exactly which features may appear in this map, except that they are
00067   /// all valid LLVM feature names.
00068   ///
00069   /// \return - True on success.
00070   bool getHostCPUFeatures(StringMap<bool> &Features);
00071 }
00072 }
00073
00074 #endif

а именно строка : 00023 #include <machine/endian.h>
при сборке под Windows не видит пишет: No such file or directory ... (при сборке под Ubuntu - ok)
Кто стыкался с данной проблемой помогите , думаю дело в самом файле и в том что скорее всего под Windows нужен другой хидер...

Заранее спасибо !!


Название: Re: machine/endian.h: No such file or directory
Отправлено: Bepec от Июля 29, 2013, 12:08
Найдите этот файл на вашем компьютере. Запомните этот путь.

Попробуйте открыть в IDE этот файл - в контекстном меню при нажатии на хедер должна быть строчка что-то типа "перейти к файлу $вашИнклуд$".

Посмотрите переменные окружения/IDE/файла проекта - есть ли путь к папке в которой находится папка machine или нет. Если нет - добавьте.

PS спасибо за перевод ^.^