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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:44:35+00:00 2026-06-17T11:44:35+00:00

I’m a dummy regarding C build tools, so I have a forked project to

  • 0

I’m a dummy regarding C build tools, so I have a forked project to which I want to add a dynamically linked library:

https://github.com/iem-projects/ncview/tree/26c3549d165dc6047dc37db252062fd73eb9282c

Basically, what I need is to include liblo. There is all kinds of voodoo going on for the existing libraries of the project (netcdf for example).

I am trying to follow this manual which basically says, I should add stuff to configure.in and Makefile.am, then run autoreconf, autoconf, and automake, then ./configure and finally make.

This I added to configure.in:

# OSC support
PKG_CHECK_MODULES(LIBLO, liblo >= 0.26)

And this I added to Makefile.am:

bin_PROGRAMS = ncview

ncview_LDADD = $(LIBLO_LIBS)

Now configure is at least successfully checking for that library:

checking for LIBLO... yes

But make doesn’t include the library with the linker it seems:

$ make
make  all-recursive
Making all in src
/usr/bin/gcc-4.2 -I/usr/X11/include -g -O2   -L/opt/local/lib -lnetcdf -lSM -lICE \
-L/usr/X11/lib -R/usr/X11/lib -lX11  -L/usr/X11/lib -R/usr/X11/lib  -Wl,-rpath,  -o \
ncview  ncview.o file.o util.o do_buttons.o file_netcdf.o view.o do_print.o \
epic_time.o interface.o x_interface.o dataedit.o display_info.o plot_xy.o utils.o \
range.o printer_options.o overlay.o filesel.o set_options.o plot_range.o udu.o \
SciPlot.o RadioWidget.o cbar.o utCalendar2_cal.o calcalcs.o colormap_funcs.o \
make_tc_data.o stringlist.o handle_rc_file.o   -lm -L/opt/local/lib -lnetcdf -lXaw \
-lXt  -L/usr/X11/lib -R/usr/X11/lib -lSM -lICE -L/usr/X11/lib -R/usr/X11/lib -lX11  \
-L/usr/X11/lib -R/usr/X11/lib  -lpng 

Undefined symbols:
  "_lo_address_new", referenced from:
      _main in ncview.o
  "_lo_send_internal", referenced from:
      _main in ncview.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

So it links the old libraries (netcdf, X11), but doesn’t pick up the one I added (liblo)

This whole makefile business is black magic to me, so any clues as to why the library doesn’t get linked is welcome.


Solution:

The the hint of AC_SUBST, and looking again closer at the way the other libraries were integrated, I managed to get it working. Nothing had to be added to Makefile.am. In configure.in (aka configure.ac), the following was added:

# OSC support
PKG_CHECK_MODULES(LIBLO, liblo >= 0.26)
LIBSsave=$LIBS
CFLAGSsave=$CFLAGS
CFLAGS=$LIBLO_CFLAGS
LIBS=$LIBLO_LIBS
# AC_MSG_CHECKING([for liblo OSC library])
# AC_MSG_RESULT()
# AC_CHECK_LIB(LIBLO,lo_address_new,[],[libloWorks=no])
echo "liblo OSC library: $LIBLO_LIBS"
AC_SUBST(LIBLO_CFLAGS)  # si?
AC_SUBST(LIBLO_LIBS)
LIBS+=$LIBSsave
CFLAGS+=$CFLAGSsave
  • 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-17T11:44:36+00:00Added an answer on June 17, 2026 at 11:44 am

    After PKG_CHECK_MODULES, the variables LIBIO_CFLAGS and LIBIO_LIBS should be defined. At this point, you should add:

    AC_SUBST(LIBIO_CFLAGS)
    AC_SUBST(LIBIO_LIBS)
    

    to the configure.ac file. The Makefile.am then needs to make use of these substitutions:

    ncview_CPPFLAGS = $(LIBIO_CFLAGS)
    ncview_LDADD = $(LIBIO_LIBS)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is

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.