Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:52:25+00:00 2026-06-04T12:52:25+00:00

I’ve converted some legacy Fortran code to C using the f2c converter ( f2c

  • 0

I’ve converted some legacy Fortran code to C using the f2c converter (f2c), 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:

2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(141): error C2059: syntax error : '('
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(141): error C2059: syntax error : '-'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(141): error C2059: syntax error : ')'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2027: use of undefined type '_Ty'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2226: syntax error : unexpected type 'std::complex<_Other>'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2988: unrecognizable template declaration/definition
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2059: syntax error : '-'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2065: '_Ty' : undeclared identifier
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(250): error C2059: syntax error : ')'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(263): error C2065: '_Ty' : undeclared identifier
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(263): error C2065: '_Ty' : undeclared identifier
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(264): error C2143: syntax error : missing ';' before '{'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xcomplex(264): error C2447: '{' : missing function header (old-style formal list?)

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.

Here is a link to the f2c.h header file (f2c.h). I’ve added

#ifdef __cplusplus
extern "C" {
#endif

to the top and

#ifdef __cplusplus
 }
#endi

to the bottom of this header file, since my test.cpp is a C++ program.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:52:26+00:00Added an answer on June 4, 2026 at 12:52 pm

    It seems the problem is that f2c.h defines a number of macros, including some for math functions such as abs. These macros cause problems when those same identifiers are encountered in the standard headers.

    For this reason, I recommend that you always include f2c.h as the last header in the file (or #undef the conflicting macros before including other files).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.