Author Topic: Undefined Reference to functions, that CAN be found  (Read 5397 times)

Offline Carola

  • Single posting newcomer
  • *
  • Posts: 6
  • FEMfemme
Undefined Reference to functions, that CAN be found
« on: August 26, 2009, 02:17:01 pm »
Hi!

I'm using GNU's gsl-library, which I installed and configured in C::B,
When I try to build, C::B gives me the following error messages:

Code
||=== HH, Debug ===|
obj\Debug\main.o||In function `_Z21singular_value_decompv':|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5194|undefined reference to `_gsl_matrix_alloc'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5197|undefined reference to `_gsl_matrix_set'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5203|undefined reference to `_gsl_matrix_alloc'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5204|undefined reference to `_gsl_vector_alloc'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5205|undefined reference to `_gsl_vector_alloc'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5207|undefined reference to `_gsl_linalg_SV_decomp'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5210|undefined reference to `_gsl_matrix_calloc'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5212|undefined reference to `_gsl_vector_get'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5212|undefined reference to `_gsl_matrix_set'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5219|undefined reference to `_gsl_matrix_get'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5228|undefined reference to `_gsl_matrix_get'|
D:\2 - Bouwkunde\070901 - MSc Bouwkunde aan TUe\PROJ FEM-Tool\1 - Programma HH\main.cpp|5237|undefined reference to `_gsl_matrix_get'|
||=== Build finished: 12 errors, 0 warnings ===|

When I right-click on the function, and choose:
Find declaration of: "gsl_matrix_alloc"
it can. And simply opens the header file in which it is stated.
Which I interpret as the library being configured correctly (true?).

So why are they "undifined references"?
Any suggestions?
Cheers, Carola

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Undefined Reference to functions, that CAN be found
« Reply #1 on: August 26, 2009, 02:25:45 pm »
When I right-click on the function, and choose:
Find declaration of: "gsl_matrix_alloc"
it can. And simply opens the header file in which it is stated.
Which I interpret as the library being configured correctly (true?).

So why are they "undifined references"?
Any suggestions?
Cheers, Carola

No !

Header files and link-libraries are not the same.

You should read a book about how a compiler, linker etc works.

Be aware, that this is not a general programming forum.
Your question has nothing to do with C::B and therefore violates our forum rules.

Topic locked !!