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 8501053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:06:18+00:00 2026-06-11T01:06:18+00:00

My app.cpp: #include app.h #include <EGL/egl.h> #include <EGL/eglext.h> void Java_com_geek_hello_FilterStack_nativeEglSetFenceAndWait(JNIEnv* env, jobject thiz) {

  • 0

My app.cpp:

#include "app.h"


#include <EGL/egl.h>
#include <EGL/eglext.h>

void
Java_com_geek_hello_FilterStack_nativeEglSetFenceAndWait(JNIEnv* env, jobject thiz) {
  EGLDisplay display = eglGetCurrentDisplay();

  // Create a egl fence and wait for egl to return it.
  // Additional reference on egl fence sync can be found in:
  // http://www.khronos.org/registry/vg/extensions/KHR/EGL_KHR_fence_sync.txt
  EGLSyncKHR fence = eglCreateSyncKHR(display, EGL_SYNC_FENCE_KHR, NULL);
  if (fence == EGL_NO_SYNC_KHR) {
    return;
  }
  ...

When I run ndk-build, it fails finding methods present in egl.h and .so is not created. Here’s the log:

app.cpp:31:72: error: 'eglCreateSyncKHR' was not declared in this scope 

followed by all KHR methods that belong to

Here’s Android.mk

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

#LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES
LOCAL_CFLAGS = -Wno-psabi

LOCAL_SRC_FILES := app.cpp

#LOCAL_SHARED_LIBRARIES := libcutils libEGL

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE := libapp
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2

include $(BUILD_SHARED_LIBRARY)
  • 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-11T01:06:19+00:00Added an answer on June 11, 2026 at 1:06 am

    You need to add:

    #define EGL_EGLEXT_PROTOTYPES
    

    before your #include lines (well, specifically before including EGL/eglext.h).

    Also (and it looks like you’re already doing this), you need to be building against at least API 14, since that’s the first API level exposing this function in the public API.

    EDIT: or just uncomment the line in your Android.mk that reads:

    #LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a c++ app, with the following main.cpp: 1: #include <stdio.h> 2: #include
I tried to write a simple Qt application like this: main.cpp : #include <QApplication>
App I'm working on uses ARC. I wanted it to process large files, so
/app/config/parameters.ini [parameters] database_driver = pdo_mysql database_host = localhost database_port = database_name = my_dbname database_user
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
app.get('/', function (req, res) { res.render('home.jade', { results: req.session.value }); }); What i would
My app will no longer run under Snow Leopard, even though it was originally
My app got rejected by Apple three times, all with the same rejection letter,
The app I am working on is supporting android 2.3 upwards. As the download
My app runs fine on my machine (of course/famous last words). However, when deploying

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.