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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:35:09+00:00 2026-05-13T11:35:09+00:00

gcc 4.4.2 I have installed apache runtime portable. apr-1.3.9 ./configure make make test make

  • 0

gcc 4.4.2

I have installed apache runtime portable. apr-1.3.9

./configure
make
make test
make install

Everything installed fine.

I have in my /usr/local/apr/lib all the libraries and the includes in the following /usr/local/apr/include/apr-1

I have a simple main.c program to test:

#include <stdio.h>
#include <apr.h>

int main(void)
{
    printf(" == Start of program ==\n");

    return 0;
}

And my makefile:

OBJECT_FILES = main.o

CC = gcc
CFLAGS = -Wall -g -D_LARGEFILE64_SOURCE

LIBS_PATH = -L/usr/local/apr/lib
INC_PATH = -I/usr/local/apr/include/apr-1

LIBS = -lapr-1

test_apr: $(OBJECT_FILES)
    $(CC) $(CFLAGS) $(OBJECT_FILES) $(LIBS_PATH) $(INC_PATH) $(LIBS) -o test_apr

main.o: main.c
    $(CC) -c $(CFLAGS) $(INC_PATH) $(LIBS_PATH) $(INC_PATH) main.c  

However, when I try and compile I get the following error:

gcc -c -I/usr/local/apr/include/apr-1 -L/usr/local/apr/lib -I/usr/local/apr/include/apr-1 main.c    
In file included from main.c:3:
/usr/local/apr/include/apr-1/apr.h:285: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_off_t’
make: *** [main.o] Error 1
make: Target `test_apr' not remade because of errors.

However, I don’t understand this as the header file is called apr.h in the apr-1 folder and the libary I am linking with is called libapr-1.so

I know my paths are correct I have double check them. So can’t understand why I can’t link them.

Many thanks for any advice,

  • 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-13T11:35:10+00:00Added an answer on May 13, 2026 at 11:35 am

    My crystal ball tells me that you need to run add -D_LARGEFILE64_SOURCE to CFLAGS, or if you’re on linux: the command getconf LFS_CFLAGS gives you an exact list of CFLAGS to add to your existing CFLAGS for large file support.

    Finally, you should actually use apr-1-config --cflags to get a list of compiler flags if possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed the gcc compiler from this sudo apt-get install build-essential command and
I currently have the gcc4.7 and the gcc4.7-base, etc., packages installed but GCC seems
i have redhat with gcc 4.1.1 i have compile as gcc test.c and give
gcc 4.4.2 c89 I have a function that has to run (config_relays). It make
On Windows XP I've installed Eclipse CDT. I've installed cygwin including make, gcc, g++,
How do I compile my C++ programs in Cygwin. I have gcc installed. What
I have installed GCC-10.7-v2.pkg found at https://github.com/kennethreitz/osx-gcc-installer/downloads And I have removed Xcode completely following
I have installed mingW to use gcc, platform windows 7. I am trying to
I'm having a seemingly silly problem with my gcc compiler. I have installed MinGW
I have installed MinGW in Windows Vista, so I can use gcc but it

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.