Меню

Ошибка с1010 visual studio

Permalink

Cannot retrieve contributors at this time

description title ms.date f1_keywords helpviewer_keywords ms.assetid

Learn more about: Fatal Error C1010

Fatal Error C1010

09/03/2019

C1010

C1010

dfd035f1-a7a2-40bc-bc92-dc4d7f456767

unexpected end of file while looking for precompiled header. Did you forget to add ‘#include name‘ to your source?

Remarks

An include file specified by /Yu isn’t listed in the source file. This option is enabled by default in many Visual Studio C++ project types. The default include file specified by this option is pch.h, or stdafx.h in Visual Studio 2017 and earlier.

In the Visual Studio environment, use one of the following methods to resolve this error:

  • Make sure you haven’t inadvertently deleted, renamed, or removed the pch.h header file or pch.cpp source file from the current project. (In older projects, these files may be named stdafx.h and stdafx.cpp.)

  • Make sure the pch.h or stdafx.h header file is included before any other code or preprocessor directives in your source files. (In Visual Studio, this header file is specified by the Precompiled Header File project property.)

  • You can turn off precompiled header use. If you turn off precompiled headers, it may severely impact build performance.

To turn off precompiled headers

To turn off precompiled header use in a project, follow these steps:

  1. In the Solution Explorer window, right-click the project name, and then choose Properties to open the project Property Pages dialog.

  2. In the Configuration drop-down, select All Configurations.

  3. Select the Configuration properties > C/C++ > Precompiled Headers property page.

  4. In the property list, select the drop-down for the Precompiled Header property, and then choose Not Using Precompiled Headers. Choose OK to save your changes.

  5. In the Solution Explorer window, right-click the pch.cpp source file in your project. (In older projects, the file may be named stdafx.cpp.) Choose Exclude from Project to remove it from the build.

  6. Use the Build > Clean solution menu command for each configuration you build, to delete any project_name.pch files in your intermediate build directories.

See also

Precompiled header files
/Yc (Create precompiled header file)
/Yu (Use precompiled header file)

RRS feed

  • Remove From My Forums
  • Question

  • fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add ‘#include «stdafx.h»‘ to your source?

    I am using Visual Studio 2005 Academic Edition.

    I clicked «Tool»=>Options=>Debugging=>Edit and Continue.

    Let «Allow precomping» unchecked then.

    Why does this error occury?

    Thanks! 

Answers

  • «Did you forget to add #include «stdafx.h» to your source»?

All replies

  • «Did you forget to add #include «stdafx.h» to your source»?

  • I have generated source code and was trying to compile in release mode (instead of debug).  I got this error.  Putting in the #include «stdafx.h» does not fix the problem.  Anyone know what is going on and why I am getting this error in Release mode and not in Debug mode?

  • I figured out what the problem was.  The entire project needed to be marked as ‘Not Using Precompiled Headers’ in the property pages.  This is under the ‘Configuration Properties’->C/C++->’Precompiled Headers’.  You could just single out the one file if you wanted to also.

    I then was getting some linker unresolved external errors after doing that.  Make sure you also check for any libraries that need to be linked against.  I had (NOINHERIT) in my Additional Dependencies field of the properties.  That field is under the ‘Configuration Properties’->Linker->Input.

    Just wanted to put on the board what I found in case anyone else has these easy setup issues.  These things are different from what I am used to or at least in different places.

    • Proposed as answer by

      Friday, October 7, 2011 7:40 PM

  • Where is

    ‘Configuration Properties’?

    Thanks

    • Proposed as answer by
      Prizzy29
      Monday, October 26, 2009 7:27 AM

  •  The Steve340 wrote:

    I have generated source code and was trying to compile in release mode (instead of debug).  I got this error.  Putting in the #include «stdafx.h» does not fix the problem.  Anyone know what is going on and why I am getting this error in Release mode and not in Debug mode?


  • Once the C++ is open in a project = Tools/options/”edit/countine” you click on the left side / and then close to the bottom is the option to add or remove ‘Precompiled Headers’

    I had an issue, where there ‘Precompiled Headers’ came out of no where, I didn’t even chose it but, I googled the issue and came up with the site. An I read the idea’s on here an searched for it in C++ search and it told me how to do. An I thought I would share the little info.

    • Proposed as answer by
      SANJAY KHACHANE
      Wednesday, June 6, 2012 10:58 AM
    • Unproposed as answer by
      SANJAY KHACHANE
      Wednesday, June 6, 2012 10:59 AM
    • Proposed as answer by
      SANJAY KHACHANE
      Wednesday, June 6, 2012 10:59 AM

  • Go To 

    I am using Visual Studio 2010.

    Clicked New Project —> Visual C++ —> Win32 Console Application —>

    Enter Name Of Application—> Click Ok

    Show «Win32 Application Wizard» — > Click Next —>

    In Scrine Show 

    Additional options: 

    Empty project 
    Export symbols 
    Precompiled header 

    Untick Precompiled Header

    then Finished It

    • Edited by
      SANJAY KHACHANE
      Wednesday, June 6, 2012 11:08 AM

  • Hi..ardmore,

    I was having same problem, but solved it by following manner..

    Open property of that particular page and  go to confi. Property -> c/c++ -> precompiled headers -> set this value to “Not using precompiled Headers”

    • Edited by
      Mayur.Dabhi
      Thursday, September 20, 2012 11:06 AM

  • Thank you soo much.. its works fine steve


Содержание

  1. Fatal Error C1010
  2. Remarks
  3. To turn off precompiled headers
  4. Name already in use
  5. cpp-docs / docs / error-messages / compiler-errors-1 / fatal-error-c1010.md
  6. Неустранимая ошибка C1010
  7. Комментарии
  8. Отключение предкомпилированных заголовков
  9. Visual studio fatal error c1010
  10. Answered by:
  11. Question
  12. Answers
  13. All replies
  14. Visual studio fatal error c1010
  15. Answered by:
  16. Question
  17. Answers
  18. All replies

Fatal Error C1010

unexpected end of file while looking for precompiled header. Did you forget to add ‘#include name‘ to your source?

An include file specified by /Yu isn’t listed in the source file. This option is enabled by default in many Visual Studio C++ project types. The default include file specified by this option is pch.h, or stdafx.h in Visual Studio 2017 and earlier.

In the Visual Studio environment, use one of the following methods to resolve this error:

Make sure you haven’t inadvertently deleted, renamed, or removed the pch.h header file or pch.cpp source file from the current project. (In older projects, these files may be named stdafx.h and stdafx.cpp.)

Make sure the pch.h or stdafx.h header file is included before any other code or preprocessor directives in your source files. (In Visual Studio, this header file is specified by the Precompiled Header File project property.)

You can turn off precompiled header use. If you turn off precompiled headers, it may severely impact build performance.

To turn off precompiled header use in a project, follow these steps:

In the Solution Explorer window, right-click the project name, and then choose Properties to open the project Property Pages dialog.

In the Configuration drop-down, select All Configurations.

Select the Configuration properties > C/C++ > Precompiled Headers property page.

In the property list, select the drop-down for the Precompiled Header property, and then choose Not Using Precompiled Headers. Choose OK to save your changes.

Источник

Name already in use

cpp-docs / docs / error-messages / compiler-errors-1 / fatal-error-c1010.md

  • Go to file T
  • Go to line L
  • Copy path
  • Copy permalink

Copy raw contents

Copy raw contents

Fatal Error C1010

unexpected end of file while looking for precompiled header. Did you forget to add ‘#include name‘ to your source?

An include file specified by /Yu isn’t listed in the source file. This option is enabled by default in many Visual Studio C++ project types. The default include file specified by this option is pch.h, or stdafx.h in Visual Studio 2017 and earlier.

In the Visual Studio environment, use one of the following methods to resolve this error:

Make sure you haven’t inadvertently deleted, renamed, or removed the pch.h header file or pch.cpp source file from the current project. (In older projects, these files may be named stdafx.h and stdafx.cpp.)

Make sure the pch.h or stdafx.h header file is included before any other code or preprocessor directives in your source files. (In Visual Studio, this header file is specified by the Precompiled Header File project property.)

You can turn off precompiled header use. If you turn off precompiled headers, it may severely impact build performance.

To turn off precompiled headers

To turn off precompiled header use in a project, follow these steps:

In the Solution Explorer window, right-click the project name, and then choose Properties to open the project Property Pages dialog.

In the Configuration drop-down, select All Configurations.

Select the Configuration properties > C/C++ > Precompiled Headers property page.

In the property list, select the drop-down for the Precompiled Header property, and then choose Not Using Precompiled Headers. Choose OK to save your changes.

Источник

Неустранимая ошибка C1010

непредвиденный конец файла при поиске предкомпилированного заголовка. Вы забыли добавить имя #include в источник?

Комментарии

Включаемый файл, указанный параметром /Yu , не указан в исходном файле. Этот параметр включен по умолчанию во многих типах проектов Visual Studio C++. Файл включения по умолчанию, заданный этим параметром, — pch.h или stdafx.h в Visual Studio 2017 и более ранних версиях.

В среде Visual Studio используйте один из следующих методов для устранения этой ошибки:

Убедитесь, что вы не случайно удалили, не переименовали или не удалили файл заголовка pch.h или исходный файл pch.cpp из текущего проекта. (В более старых проектах эти файлы могут называться stdafx.h и stdafx.cpp.)

Убедитесь, что файл заголовка pch.h или stdafx.h включен перед любым другим кодом или директивами препроцессора в исходных файлах. (В Visual Studio этот файл заголовка задается свойством проекта предварительно скомпилированного файла заголовка .)

Вы можете отключить использование предкомпилированного заголовка. Отключение предкомпилированных заголовков может серьезно повлиять на производительность сборки.

Отключение предкомпилированных заголовков

Чтобы отключить использование предкомпилированного заголовка в проекте, выполните следующие действия.

В окне Обозреватель решений щелкните правой кнопкой мыши имя проекта и выберите пункт Свойства, чтобы открыть диалоговое окно Страницы свойств проекта.

В раскрывающемся списке Конфигурация выберите Все конфигурации.

Выберите страницу свойств Свойства> конфигурацииC/C++>Предкомпилированные заголовки.

В списке свойств выберите раскрывающийся список для свойства Precompiled Header (Предкомпилированные заголовки ), а затем выберите Не использовать предкомпилированные заголовки. Выберите ОК для сохранения внесенных изменений.

Источник

Visual studio fatal error c1010

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

i included an vb dll into vc++. When i compiled i am getting this error.

fatal error C1010: unexpected end of file while looking for precompiled header directive in the .c file produced from the idl file.

i included comdef.h and header file produced by midl compiler to the source file. i had the dll file in the same directory of vc++ project folder. Any thing need to be set here ?

Answers

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Hi, I’m a beginer to VC++. I wrote the following code. When compils it it shows «fatal error C1010: unexpected end of file while looking for precompiled header directive». when I included the stdafx.h it shows 3 erros where as 1 before. I tried all the headerfile setting under project->settings->c/c++,but it doesnot work. I’m using visual studio 6.0. Sir please help me.
Thanks in advance.

int_stdcall WinMain(
HINSTANCE hInstancs,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
<
MessageBox(0,»Hello»,»Hello»,0);
return(0);
>

Источник

Visual studio fatal error c1010

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

i included an vb dll into vc++. When i compiled i am getting this error.

fatal error C1010: unexpected end of file while looking for precompiled header directive in the .c file produced from the idl file.

i included comdef.h and header file produced by midl compiler to the source file. i had the dll file in the same directory of vc++ project folder. Any thing need to be set here ?

Answers

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Hi, I’m a beginer to VC++. I wrote the following code. When compils it it shows «fatal error C1010: unexpected end of file while looking for precompiled header directive». when I included the stdafx.h it shows 3 erros where as 1 before. I tried all the headerfile setting under project->settings->c/c++,but it doesnot work. I’m using visual studio 6.0. Sir please help me.
Thanks in advance.

int_stdcall WinMain(
HINSTANCE hInstancs,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
<
MessageBox(0,»Hello»,»Hello»,0);
return(0);
>

Источник

Добавлено 27 марта 2021 в 12:55

В этом разделе мы рассмотрим некоторые из распространенных проблем, с которыми, похоже, начинающие программисты сталкиваются с довольно высокой вероятностью. Это не исчерпывающий список проблем компиляции или запуска программ, а скорее прагматичный список решений самых основных проблем. Если у вас есть предложения по другим вопросам, которые могут быть добавлены в этот список, опубликуйте их в разделе комментариев ниже.

Общие проблемы во время выполнения

Вопрос: При выполнении программы окно консоли мигает, а затем сразу закрывается.


Сначала добавьте или убедитесь, что следующие строки находятся в верхней части вашей программы (пользователи Visual Studio должны убедиться, что эти строки появляются после #include "pch.h" или #include "stdafx.h", если таковые существуют):

#include <iostream>
#include <limits>

Во-вторых, добавьте следующий код в конец функции main() (прямо перед оператором return):

// сбрасываем все флаги ошибок
std::cin.clear();
// игнорируем любые символы во входном буфере, пока не найдем новую строку
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), 'n');
// получаем от пользователя еще один символ
std::cin.get();

Это заставит вашу программу ждать, пока пользователь нажмет любую клавишу, прежде чем продолжить, что даст вам время изучить вывод вашей программы, прежде чем ваша операционная система закроет окно консоли.

Другие решения, такие как обычно предлагаемое system("pause"), могут работать только в определенных операционных системах, и их следует избегать.

Более старые версии Visual Studio могут не приостанавливаться, когда программа запускается в режиме Начать с отладкой (Start With Debugging) (F5). Попробуйте запустить в режиме Начать без отладки (Start Without Debugging) (Ctrl + F5).

Вопрос: Я запустил свою программу, получил окно, но ничего не выводится.


Выполнение может блокировать ваш антивирус. Попробуйте временно отключить его и посмотрите, не в этом ли проблема.

Вопрос: Моя программа компилируется, но работает некорректно. Что не так?


Отладьте ее! Советы по диагностике и отладке программ приведены далее в главе 3.

Общие проблемы времени компиляции

Вопрос: Когда я компилирую свою программу, я получаю ошибку о неразрешенном внешнем символе _main или _WinMain@16


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

Есть несколько вещей, которые нужно проверить:

  1. Содержит ли ваш код функцию с именем main?
  2. Правильно ли написано имя main?
  3. Когда вы компилируете свою программу, видите ли вы, что файл, содержащий функцию main(), компилируется? Если нет, либо переместите функцию main() в другой файл, либо добавьте этот файл в свой проект (для получения дополнительной информации о том, как это сделать, смотрите урок «2.7 – Программы с несколькими файлами кода»).
  4. Вы точно создали консольный проект? Попробуйте создать новый консольный проект.

Вопрос: Я пытаюсь использовать функциональность C++11/14/17/XX, но она не работает.


Если у вас старый компилятор, он может не поддерживать эти более свежие дополнения к языку. В этом случае обновите свой компилятор.

В случае с современными IDE/компиляторами ваш компилятор может по умолчанию использовать более старый стандарт языка. Мы рассмотрим, как изменить стандарт языка в уроке «0.12 – Настройка компилятора: выбор стандарта языка».

Вопрос: При попытке использовать cin, cout или endl компилятор говорит, что cin, cout или endl являются «необъявленными идентификаторами».


Во-первых, убедитесь, что вы включили следующую строку в верхней части файла:

#include <iostream>

Во-вторых, убедитесь, что каждое использование cin, cout и endl имеет префикс «std::«. Например:

std::cout << "Hello world!" << std::endl;

Если это не решит вашу проблему, возможно, ваш компилятор устарел или установка повреждена. Попробуйте переустановить и/или обновить компилятор до последней версии.

Вопрос: При попытке использовать endl для завершения напечатанной строки компилятор говорит, что end1 является «необъявленным идентификатором».


Убедитесь, что вы не перепутали букву l (нижний регистр L) в endl с цифрой 1. endl – это все буквы. Убедитесь, что ваш редактор использует шрифт, который проясняет разницу между строчной буквой L, заглавной i и цифрой 1. Кроме того, во многих шрифтах, не предназначенных для программирования, можно легко перепутать заглавную букву o и цифру ноль.

Проблемы с Visual Studio

Вопрос: При компиляции с помощью Microsoft Visual C++ вы получаете фатальную ошибку C1010 с сообщением типа «c:vcprojectstest.cpp(263) :fatal error C1010: unexpected end of file while looking for precompiled header directive» (неожиданный конец файла при поиске директивы предварительно скомпилированного заголовка).


Эта ошибка возникает, когда компилятор Microsoft Visual C++ настроен на использование предварительно скомпилированных заголовков, но один (или несколько) ваших файлов кода C++ не включает #include "stdafx.h" или #include "pch.h" в качестве первой строки кода файла.

Предлагаемое нами решение – отключить предварительно скомпилированные заголовки, как это сделано в уроке «0.7 – Компиляция вашей первой программы».

Если вы хотите, чтобы предварительно скомпилированные заголовки были включены, чтобы решить эту проблему, просто найдите файл(ы), вызывающий ошибку (в приведенной выше ошибке виновником является test.cpp), и добавьте следующую строку в самом верху файла):

#include "pch.h"

В более старых версиях Visual Studio используется stdafx.h вместо pch.h, поэтому, если pch.h не решает проблему, попробуйте stdafx.h.

Обратите внимание, что для программ с несколькими файлами каждый файл кода C++ должен начинаться с этой строки.

Кроме того, вы можете отключить предварительно скомпилированные заголовки.

Вопрос: Visual Studio выдает следующую ошибку: «1MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function «int __cdecl invoke_main(void)» (?invoke_main@@YAHXZ)» (неразрешенный внешний символ _WinMain@16).


Скорее всего, вы создали не консольное приложение, а графическое приложение Windows. Создайте заново свой проект и убедитесь, что вы создали его как консольный проект Windows (или Win32).

Вопрос: Когда я компилирую свою программу, я получаю предупреждение «Cannot find or open the PDB file» (не могу найти или открыть файл PDB).


Это предупреждение, а не ошибка, поэтому оно не должно повлиять на вашу программу. Однако она раздражает. Чтобы исправить это, перейдите в меню Debug (Отладка) → Options and Settings (Параметры) → Symbols (Символы) и установите флажок Microsoft Symbol Server (Сервер символов Microsoft).

Прочее

Вопрос: У меня есть еще одна проблема, которую я не могу понять. Как я могу быстро получить ответ?


По мере обучения у вас, несомненно, будут возникать вопросы или неожиданные проблемы. Что делать дальше, зависит от вашей проблемы. Но в целом есть несколько вещей, которые вы можете попробовать.

Сначала спросите Google. Найдите хороший способ сформулировать свой вопрос и выполните поиск в Google. Если вы получили сообщение об ошибке, вставьте точное сообщение в Google, используя кавычки. Скорее всего, кто-то уже задавал тот же вопрос, и вы найдете ответ.

Если это не поможет, спросите на сайте вопросов и ответов. Существуют веб-сайты, предназначенные для вопросов и ответов о программировании, например, Stack Overflow. Попробуйте разместить там свой вопрос. Не забудьте подробно описать, в чем заключается ваша проблема, и включить всю необходимую информацию, например, какую ОС и какую IDE вы используете.

Теги

C++ / CppFAQLearnCppДля начинающихОбучениеПрограммирование

    msm.ru

    Нравится ресурс?

    Помоги проекту!

    !
    Правила раздела Visual C++ / MFC / WTL (далее Раздела)

    >
    Ошибка C1010 при сборке Release

    • Подписаться на тему
    • Сообщить другу
    • Скачать/распечатать тему



    Сообщ.
    #1

    ,
    07.03.07, 13:45

      Junior

      *

      Рейтинг (т): нет

      Здравствуйте!
      Делаю диалоговое приложение на MFC.
      При сборке релиз версии получаю ошибки:
      fatal error C1010: unexpected end of file while looking for precompiled header directive
      Когда Debug собирал, то включил опцию Not using precompiled headers в сишных файлах, присоединенных к проекту и это решило проблему.
      А что делать с Release?


      LuckLess



      Сообщ.
      #2

      ,
      07.03.07, 13:50

        Цитата Onysio @ 07.03.07, 13:45

        Когда Debug собирал, то включил опцию Not using precompiled headers в сишных файлах, присоединенных к проекту и это решило проблему.
        А что делать с Release?

        варианты :
        0. Самый верный вариант — использовать таки кнопку ПОИСК — она не зря выведена в верхнюю менюшку!!!!
        1. Тоже отключить прекомпилед хидеры.
        2. писать include «stdafx.h» в каждом cpp-шнике, первой!!!! строчкой (строчки выше могут быть чем угодно, фактически они опускаются, так что выше можно смело писать комменты или еще что.. главное не код и не другие инклуды, так как они компилятором будут пропущены)

        Сообщение отредактировано: LuckLess — 07.03.07, 13:50

        Guru

        ElcnU



        Сообщ.
        #3

        ,
        07.03.07, 13:52

          Moderator

          *******

          Рейтинг (т): 823

          у тя стоит в начале каждого срр

          ExpandedWrap disabled

            #include «stdafx.h»

          ?

          протормозил:)

          Сообщение отредактировано: ElcnU — 07.03.07, 13:53


          BlackEmperor



          Сообщ.
          #4

          ,
          07.03.07, 13:52

            Сори за глупый впрос: а в релиз версии тож не забыл это отключить? :)


            Onysio



            Сообщ.
            #5

            ,
            07.03.07, 13:57

              Junior

              *

              Рейтинг (т): нет

              Вроде все пробовал:
              — в релиз тоже Not using precompiled headers;
              — пробовал включить #include «stdafx.h» в файлы .с, но тогда пишет, что fatal error C1853: ‘Release/FileName.pch’ is not a precompiled header file created with this compiler


              BlackEmperor



              Сообщ.
              #6

              ,
              07.03.07, 13:58

                грохни всю папку релиз и пересобери …


                Onysio



                Сообщ.
                #7

                ,
                07.03.07, 13:59

                  Junior

                  *

                  Рейтинг (т): нет

                  У меня просто много функций в .с файлах, которые я присоединил к проекту…

                  Добавлено 07.03.07, 14:01
                  не помогло…


                  BlackEmperor



                  Сообщ.
                  #8

                  ,
                  07.03.07, 14:04

                    Ну как еще кривой вариант, переименовать все файлы с *.c на *.cpp …


                    Onysio



                    Сообщ.
                    #9

                    ,
                    07.03.07, 14:09

                      Junior

                      *

                      Рейтинг (т): нет

                      Ага, как раз сам это сделал:) Но очень геморно, что теперь вылезло много ошибок типа:
                      error C2440: ‘initializing’ : cannot convert from ‘void *’ to ‘unsigned short *’
                      И их не одна и не две… Пока в ручную поприводить типы, можно и мозгом двинуться. Может, есть варианты?


                      alexander.stoyan



                      Сообщ.
                      #10

                      ,
                      07.03.07, 14:14

                        на каждом Си-шном файле в Solution explorer правой кнопкой -> Properties -> C/C++ ->Precompiler Headers -> (установить поле «Create/User Precompiler Headers» в «Not using precompiler headers»).

                        и не нужно переименовывать :whistle:

                        Добавлено 07.03.07, 14:16
                        и, соответственно, поубирать в Си-шных «#include «stdafx.h»


                        BlackEmperor



                        Сообщ.
                        #11

                        ,
                        07.03.07, 14:16

                          Цитата alexander.stoyan @ 07.03.07, 14:14

                          и не нужно переименовывать :whistle:

                          ну кому, как, а мне так проще переименовать…
                          1) удаляем с проекта все *.c файлы
                          2) ren *.c *.cpp
                          3) присоединяем все новые фалы (переименованные) к проекту и все …


                          alexander.stoyan



                          Сообщ.
                          #12

                          ,
                          07.03.07, 14:18

                            Цитата BlackEmperor @ 07.03.07, 14:16

                            ну кому, как, а мне так проще переименовать…

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


                            BlackEmperor



                            Сообщ.
                            #13

                            ,
                            07.03.07, 14:21

                              Цитата alexander.stoyan @ 07.03.07, 14:18

                              Цитата BlackEmperor @ 07.03.07, 14:16

                              ну кому, как, а мне так проще переименовать…

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

                              Может и так а может и нет ;)


                              Onysio



                              Сообщ.
                              #14

                              ,
                              07.03.07, 14:22

                                Junior

                                *

                                Рейтинг (т): нет

                                alexander.stoyan более чем прав, что править прийдется очень долго… Not using precompiler headers — для релиза у меня не помагает, может, где-то надо именно для релиза настроить?


                                BlackEmperor



                                Сообщ.
                                #15

                                ,
                                07.03.07, 14:24

                                  Цитата Onysio @ 07.03.07, 14:22

                                  может, где-то надо именно для релиза настроить?

                                  На вкладке пропертей выбираешь активную конфигурация Release и для нее настраиваешь

                                  0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)

                                  0 пользователей:

                                  • Предыдущая тема
                                  • Visual C++ / MFC / WTL
                                  • Следующая тема

                                  Рейтинг@Mail.ru

                                  [ Script execution time: 0,0487 ]   [ 16 queries used ]   [ Generated: 30.01.23, 16:04 GMT ]  

                                  0 0 голоса
                                  Рейтинг статьи
                                  Подписаться
                                  Уведомить о
                                  guest

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

                                  А вот еще интересные материалы:

                                • Яшка сломя голову остановился исправьте ошибки
                                • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
                                • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
                                • Ошибка с0899 шевроле эпика
                                • Ошибка с0711 субару трибека