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

Ask A Question

Stats

  • Questions 292k
  • Answers 292k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Your assumption that Java requires a virtual machine is incorrect… May 13, 2026 at 6:15 pm
  • Editorial Team
    Editorial Team added an answer We successful implemented a hack to circumvent this limitation, in… May 13, 2026 at 6:15 pm
  • Editorial Team
    Editorial Team added an answer Not a pure selector, but how about: var depth =… May 13, 2026 at 6:15 pm

Related Questions

I am running Mac OS X 10.5.8. I have installed Python 2.6 from the
I am trying to cross compile a version of my software for a 64bit
The documentation of the Python readline module says Availability: Unix. However, it doesn't appear
I've got the following installed through MacPorts on MacOS X 10.5.6: py25-sqlite3 @2.5.4_0 (active)
I have some guys here who have code that needs to be compiled with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.