expected unqualified-id before '{'

Davide Prati's Avatar

Davide Prati

02 Apr, 2019 11:24 AM

I receive this weird error:

" error: expected unqualified-id before '{' token
         float far{0.0f};

You can see the full message here:

From an application that compiles on mac and win. The code is 18 lines long and looks absolutely legit to me:


Any hints?

  1. Support Staff 1 Posted by Owen McDonnell on 02 Apr, 2019 06:41 PM

    Owen McDonnell's Avatar

    What version of MSYS2 are you using in your successful local windows compilation?

  2. 2 Posted by Davide Prati on 03 Apr, 2019 07:35 AM

    Davide Prati's Avatar

    near and far are compiler directives on windows in minwindef.h

  3. Owen McDonnell closed this discussion on 03 Apr, 2019 05:34 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac