Friday, August 18th 2017, 4:32pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

SvenKBach

Beginner

Date of registration: Feb 22nd 2016

Posts: 4

1

Tuesday, March 14th 2017, 3:37pm

Wstrict-prototypes

Hi!

Since switching to SES v3.12 I have started to encounter compiling error:

C/C++ Source code

1
'-Wstrict-prototypes' is valid for C/ObjC but not for C++

I have a project where I mix up C++ and C, so any extern "C" allocation declarations ending up with this compiler error.
When following multiple threads about this, I have hit the suggestion that one should somehow disable this flag at the global compiler settings - source .

I get the same error for -Wno-strict-prototypes.
I am using gnu11 and gnu++1y compiler standards.

Is there any workaround for this?

Cheers!

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 352

2

Thursday, March 30th 2017, 11:20am

Hi,

To prevent this error you will need to remove the compiler warning option -Wstrict-prototypes instead of negating it with -Wnostrict-prototypes
The option is most commonly set on sloution level or project level in your project in the option Additional C/C++ Compiler Options.

Once you removed the option you can re-add it to the Additional C Compiler Only Options

Best regards
Johannes