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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:02:53+00:00 2026-06-15T23:02:53+00:00

When I try to build my application I get linker error undefined reference to

  • 0

When I try to build my application I get linker error undefined reference to (..). All functions that were not found are imported from meschach library. In my opinion library is properly installed:

whereis libmeschach
libmeschach: /lib/libmeschach.so /usr/lib/libmeschach.so /lib64/libmeschach.so

My SCons file:

import os
import sys
import functools

PROJECT_ROOT = os.path.curdir
doc_path = functools.partial(os.path.join, PROJECT_ROOT, 'doc')
src_path = functools.partial(os.path.join, PROJECT_ROOT, 'src')
out_path = functools.partial(os.path.join, PROJECT_ROOT, 'build')

cpp_flags = {
    'linux2' : '-Wall -Wextra -pedantic -fopenmp -O3',
    'win32'  : '/w /MD /openmp'
}

env = Environment(ENV=os.environ,CPPFLAGS=cpp_flags[sys.platform])    
env.VariantDir(variant_dir=out_path(),src_dir=src_path())

env.Program(target=out_path('cholesky'), source=Glob(out_path('*.cpp')), LIBS=['m'])

I use Arch Linux 64bit.

Edit: I replaced SCons with Makefile but error still remains:

CC=g++
CFLAGS=-c -Wall -Wextra -pedantic -I./externals/include
LIB=./externals/lib/meschach.a -lm

all: cholesky

cholesky: cholesky.o equation.o testing.o profiler.o parallelCholeskyTest.o matrix.o
$(CC) cholesky.o equation.o testing.o profiler.o parallelCholeskyTest.o matrix.o -o 
    main $(LIB)

 cholesky.o:
$(CC) $(CFLAGS) src/cholesky.cpp

 equation.o: matrix.o
$(CC) $(CFLAGS) src/equation.cpp

 matrix.o:
$(CC) $(CFLAGS) src/matrix.cpp

 testing.o:
$(CC) $(CFLAGS) src/testing.cpp

 profiler.o:
$(CC) $(CFLAGS) src/profiler.cpp

 parallelCholeskyTest.o:
$(CC) $(CFLAGS) src/parallelCholeskyTest.cpp
  • 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-15T23:02:55+00:00Added an answer on June 15, 2026 at 11:02 pm

    Ok. I solved it. This library cannot be included as a C++ library and you have to wrap each #include with extern "C" { }. Here you can find more about this issue: C-library not linking using gcc/g++

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

Sidebar

Related Questions

In my application i get image from server and those image build animation.this all
i try to build a app that is in landsscape mode all the time.
I am planning to build an application that will get a large amount of
I try to build simple Java EE application that uses JPA + EJB3 and
I am trying to build an application that would fetch the events from a
when trying to build my application with toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1. I get an error in the
When I try to export my android application, I get this error message.. [2012-05-02
I try to build a JSF 2.0 Web application which is using libraries including
I try build wrap panel with vertical buttons. Every button consist from image and
Im try to build my plugins that sit in a seperate directory on the

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.