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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:56:50+00:00 2026-05-18T03:56:50+00:00

So I am trying to use LZO in my application. Here is how I

  • 0

So I am trying to use LZO in my application. Here is how I have included it:

#include "lzoconf.h"
#include "lzodefs.h"
#include "lzo1x.h"
/* portability layer */
static const char *progname = NULL;
#define WANT_LZO_MALLOC 1
#define WANT_XMALLOC 1
#include "portab.h"

Then in the application I do:

if (lzo_init() != LZO_E_OK)
{
    printf("internal error - lzo_init() failed !!!\n");
    printf("(this usually indicates a compiler bug - try recompiling\nwithout optimizations, and enable '-DLZO_DEBUG' for diagnostics)\n");
    return 4;
}

It compiles ok. No errors or warnings during compilation.

When I try to run my application though, there are two errors:

/home/richard/client/src/portab.h:145: undefined reference to `__lzo_align_gap'

Which points at this line in portab.h:

if (__lzo_align_gap(p, (lzo_uint) sizeof(lzo_align_t)) != 0)
{
    printf("%s: C library problem: malloc() returned mis-aligned pointer!\n", progname);
    exit(1);
}
return p;

And in my application:

/home/richard/client/src/main.cc:108: undefined reference to `__lzo_init_v2'

Which points to:

if (lzo_init() != LZO_E_OK)
{
    printf("internal error - lzo_init() failed !!!\n");
    printf("(this usually indicates a compiler bug - try recompiling\nwithout optimizations, and enable '-DLZO_DEBUG' for diagnostics)\n");
    return 4;
}

I have all the header files inside my source directory:

config.h
lzo1x.h
lzoconf.h
lzodefs.h
miniacc.h
portab.h
portab_a.h

What am I doing wrong?

I am compiling my application in Ubuntu 10.10 in Anjuta ide.

  • 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-18T03:56:51+00:00Added an answer on May 18, 2026 at 3:56 am

    Headers is not enough, you need to link to the libraries. Have you read the documentation?

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

Sidebar

Related Questions

Trying to use the getDependentRowset in a ZF application. I have the following relationship
I am trying use gem tire to search in my application. I have tables
Hi I'm trying use a datepicker on a field I have. I'm trying to
I have been trying use the edit_post_link() function to contain an image. All of
I'm a little confused here, I am trying use a partial view in a
I have a regex that I'm trying use to validate against strings. Trying to
I have a 3rd party DLL that I am trying to use in a
I am trying use Thread but i have some problem (I am beginner at
I'm trying use regular expression to convert special characters in an url. Here's my
I am trying use neo4j with Ruby on rails on Mac OSX. I have

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.