React-native: RCTHasFontHandlerSet(); This function definition is not a protoype

Created on 1 May 2018  路  10Comments  路  Source: facebook/react-native

https://github.com/wix/react-native-navigation/issues/3019

After updating to React Native v0.55.2 and above it has a build issue with React Native Navigation:

/MyApp/node_modules/react-native/React/Views/RCTFont.h:21:37: This function declaration is not a prototype

/MyApp/node_modules/react-native-navigation/lib/ios/RCTHelpers.m:4:9: In file included from /MyApp/node_modules/react-native-navigation/lib/ios/RCTHelpers.m:4:

There does not seem to be any way to fix in RNN, I believe the bug only shows up due to RNN using the RCTFont.h functions.

There is an easy fix: RCTHasFontHandlerSet(); -> RCTHasFontHandlerSet(void);

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 9.5.0
Yarn: 1.3.2
npm: 5.7.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.3 => 0.55.3

Steps to Reproduce

Created a fresh react native 0.55.2 project and only install React Native Navigation. The error "This function declaration is not a prototype" message occurs.

Downgrading to React Native 0.54.4 builds fine.

Expected Behavior

Compile without error

Actual Behavior

Compiles with error

Locked

Most helpful comment

Hey,

It looks the commit didn't succeed, and this issue still persists on the 0.55.4.

We are still facing the same issue.

All 10 comments

Hey,

It looks the commit didn't succeed, and this issue still persists on the 0.55.4.

We are still facing the same issue.

Confirming that this issue is still happening in 0.55.4 for me as well, please re-open!

Same for me

Same here.

Same here.

the suggested fix "RCTHasFontHandlerSet(void);" doesn't work for me either. Where should I change it? I tried RCTFont.h without success

Same problem here using 0.55.4

It happened here too.
RCTHasFontHandlerSet(void) fixed.

Hello, your pull-request hasn't been merged, why are this issue and the PR closed?

Was this page helpful?
0 / 5 - 0 ratings