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

  • Home
  • SEARCH
  • 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 7492389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:25:43+00:00 2026-05-29T16:25:43+00:00

How do i link up or use multiple .c files in the Android.mk file?

  • 0

How do i link up or “use” multiple .c files in the Android.mk file?

It currently looks like this

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := ndk_demo
LOCAL_SRC_FILES := gnutls-3.0.12/lib/debug.c
include $(BUILD_SHARED_LIBRARY)

However, when i try and ndk-build it, it always throws this error

Compile thumb  : ndk_demo <= debug.c
In file included from jni/gnutls-3.0.12/lib/debug.c:25:
jni/gnutls-3.0.12/lib/gnutls_int.h:52:43: error: u64.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:57:24: error: gl/memxor.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:84:27: error: gnutls/gnutls.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:85:29: error: gnutls/abstract.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:86:20: error: system.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:202:24: error: gnutls_mem.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:219:24: error: gnutls_mpi.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:230:24: error: gnutls_str.h: No such file or directory
In file included from jni/gnutls-3.0.12/lib/debug.c:25:
jni/gnutls-3.0.12/lib/gnutls_int.h:276: error: expected specifier-qualifier-list before 'gnutls_handshake_description_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:307: error: expected specifier-qualifier-list before 'gnutls_datum_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:350: error: expected specifier-qualifier-list before 'gnutls_credentials_type_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:361: error: expected specifier-qualifier-list before 'gnutls_pk_params_st'
jni/gnutls-3.0.12/lib/gnutls_int.h:418:29: error: gnutls_hash_int.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:419:31: error: gnutls_cipher_int.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:420:29: error: gnutls_compress.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_int.h:459: error: expected specifier-qualifier-list before 'gnutls_kx_algorithm_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:506: error: expected specifier-qualifier-list before 'gnutls_datum_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:527: error: expected specifier-qualifier-list before 'gnutls_cipher_algorithm_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:543: error: 'GNUTLS_MAX_ALGORITHM_NUM' undeclared here (not in a function)
jni/gnutls-3.0.12/lib/gnutls_int.h:584: error: expected specifier-qualifier-list before 'bigint_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:591: error: expected specifier-qualifier-list before 'gnutls_dh_params_t'
jni/gnutls-3.0.12/lib/gnutls_int.h:657: error: expected specifier-qualifier-list before 'gnutls_buffer_st'
jni/gnutls-3.0.12/lib/gnutls_int.h:882: error: expected ')' before 'session'
jni/gnutls-3.0.12/lib/gnutls_int.h:897: warning: parameter names (without types) in function declaration
jni/gnutls-3.0.12/lib/gnutls_int.h:898: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_gnutls_get_adv_version'
jni/gnutls-3.0.12/lib/gnutls_int.h:903: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_gnutls_protocol_get_version'
jni/gnutls-3.0.12/lib/gnutls_int.h:911: error: expected ')' before 'session'
In file included from jni/gnutls-3.0.12/lib/debug.c:26:
jni/gnutls-3.0.12/lib/gnutls_errors.h:26:24: error: gnutls_int.h: No such file or directory
jni/gnutls-3.0.12/lib/gnutls_errors.h:27:27: error: gnutls_global.h: No such file or directory
In file included from jni/gnutls-3.0.12/lib/debug.c:26:
jni/gnutls-3.0.12/lib/gnutls_errors.h:51: error: expected ')' before 'const'
jni/gnutls-3.0.12/lib/gnutls_errors.h:58: error: expected declaration specifiers or '...' before 'bigint_t'
In file included from jni/gnutls-3.0.12/lib/debug.c:29:
jni/gnutls-3.0.12/lib/debug.h:24: error: expected ')' before 'handshake'
jni/gnutls-3.0.12/lib/debug.h:25: error: expected declaration specifiers or '...' before 'bigint_t'
jni/gnutls-3.0.12/lib/debug.c:67: error: expected ')' before 'handshake'
make: *** [obj/local/armeabi/objs/ndk_demo/gnutls-3.0.12/lib/debug.o] Error 1

How do i include files like u64.h into the Android.mk so that it won’t throw a No such file or directory error? Or am i going about this the wrong way?

  • 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-05-29T16:25:44+00:00Added an answer on May 29, 2026 at 4:25 pm

    If you want to specify several c files, the syntax is like this:

    LOCAL_SRC_FILES := \
        my_c_file1.c \
        my_c_file1.c \
        my_c_file2.c \
        my_last_c_file.c
    

    Add the path to your header files into the make file with this directive:

    LOCAL_C_INCLUDES := \
        /my_path1_to_h_files/ \
        /my_path2_to_h_files/ \
        /my_pathN_to_h_files/
    

    And if your module uses some shared libraries to link then you can add this:

    LOCAL_SHARED_LIBRARIES := \
        lib1 \
        lib2 \
        lib3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I make this link use the child selector without changing or removing
I would like to replace the default malloc at link time to use a
Use case: user clicks the link on a webpage - boom! load of files
how to link multiple form in android eclipse?* Do i have to make multiple
What lib can i use to upload multiple files with the ability to see
I have a global that I would like to share across multiple files. Lets
I have found some info on the subject ( like this link) , but
In the .csrpoj file, If I have <Compile Include=c:\path\File1.cs> <Link>Dir1\File1.cs</Link> </Compile> Then Visual Studio
I'm trying to use the new multiple=multiple attribute allowable on elements. So far this
when we use Expires header for text files like js, css, contents are cached

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.