Home > Blockchain >  How can I resolve this compile error in Visual Studio 2015?
How can I resolve this compile error in Visual Studio 2015?

Time:10-28

I am trying to compile enter image description here

So, what should I do to resolve this?

EDIT: After following Robert's instructions, the errors related to Flex/Bison are gone. Thanks to him.

But, now, I see that the application is not finding Boost, even though it is installed already.

1>------ Rebuild All started: Project: CFortranTranslator, Configuration: Debug x64 ------
1>  Process "for90.y" bison file
1>  Process "for90.l" flex file
1>  lazygen.cpp
1>  gen_variable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_vardef.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_type.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_suite.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_stmt.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_select.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_program.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_paramtable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_label.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_io.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_if.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_function.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_feature.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_exp.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_doc.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_do.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_dimenslice.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_config.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_callable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  Generating Code...
1>  Compiling...
1>  gen_attr_describer.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_arraybuilder.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  gen_common.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  Variable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  tokenizer.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  parser.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  Intent.cpp
1>  Function.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  attribute.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  main.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  simple_lexer.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  for90.tab.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\src\grammar\for90.tab.cpp': No such file or directory
1>  getopt2.cpp
1>  develop.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1>  forstdio.cpp
1>  forlang.cpp
1>  forfilesys.cpp
1>  for90std.cpp
1>  farray.cpp
1>  Generating Code...
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

EDIT-2:

I resolved Boost-issue.

Now, I am having the following error:

for90.tab.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\src\grammar\for90.tab.cpp': No such file or directory

CodePudding user response:

Open the file:

... \CFortranTranslator\src\grammar\custom_build_rules\win_flex_bison_custom_build.props
  1. Go to line 16,17,18 which reads

       <CommandLineTemplate>
       start /B /WAIT /D "%(RootDir)%(Directory)" win_bison.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)"
       exit /b %errorlevel%</CommandLineTemplate>
    

Replace with (only 1 line):

  <CommandLineTemplate>start /B /WAIT /D "%(RootDir)%(Directory)" win_bison.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)" &amp; exit /b %errorlevel%</CommandLineTemplate>
  1. On (now) lines 34,35,36:

       <CommandLineTemplate>
       start /B /WAIT /D "%(RootDir)%(Directory)" win_flex.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)"
       exit /b %errorlevel%</CommandLineTemplate>
    

Replace with (only 1 line):

  <CommandLineTemplate>start /B /WAIT /D "%(RootDir)%(Directory)" win_flex.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)" &amp; exit /b %errorlevel%</CommandLineTemplate>
  1. Save the file and BUILD
  • Related