Note that there are some explanatory texts on larger screens.

plurals
  1. POUnexpected errors in Visual Studio include files
    primarykey
    data
    text
    <p>I've converted some legacy Fortran code to C using the f2c converter (<a href="http://www.netlib.org/f2c/" rel="nofollow">f2c</a>), and I've created a Visual Studio 10 solution using Cmake on Windows 7 (64-bit). I've also had to link my C++ program (test.cpp, containing my main function) with the f2c library (built on my system using nmake). Although I've worked extensively with CMake and Visual Studio, after compiling the program I'm now receiving a number of cryptic errors related to the header files shipped with Visual Studio:</p> <pre><code>2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(141): error C2059: syntax error : '(' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(141): error C2059: syntax error : '-' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(141): error C2059: syntax error : ')' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2027: use of undefined type '_Ty' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2226: syntax error : unexpected type 'std::complex&lt;_Other&gt;' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2988: unrecognizable template declaration/definition 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2059: syntax error : '-' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2065: '_Ty' : undeclared identifier 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2059: syntax error : ')' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(263): error C2065: '_Ty' : undeclared identifier 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(263): error C2065: '_Ty' : undeclared identifier 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(264): error C2143: syntax error : missing ';' before '{' 2&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(264): error C2447: '{' : missing function header (old-style formal list?) </code></pre> <p>Creating a Visual Studio solution file from scratch doesn't seem to work very well either, and I am still receiving the same errors. What can I do to track down the issue with these errors? Obviously something is wrong with the files that I've included or written, but what could it be? The errors don't immediately point to a certain section of the code, so debugging is challenging.</p> <p>Here is a link to the f2c.h header file (<a href="http://www.netlib.org/f2c/f2c.h" rel="nofollow">f2c.h</a>). I've added </p> <pre><code>#ifdef __cplusplus extern "C" { #endif </code></pre> <p>to the top and</p> <pre><code>#ifdef __cplusplus } #endi </code></pre> <p>to the bottom of this header file, since my test.cpp is a C++ program.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload