- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
In attached solution, when the extension of C code file is "*.cpp", the mixed C++/F program can be compiled succesfully. But, when it has a "*.c" extension, it gives a syntax error. How could fix this problem? My C code files all have the "*.c" extension? any idea?
Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
C++ and C have much in common, but they are still different languages. The extern "C" linkage specification in your C++ code isn't valid C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes...I got it. thanks.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page