Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Compile with C++ main and Fortran module

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Compile with C++ main and Fortran module


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Compile with C++ main and Fortran module
  • Date: Mon, 25 Oct 2010 12:40:01 +0200
  • Organization: GeometryFactory

On Monday 25 October 2010 09:23:08 stevepny wrote:
> ADD_LIBRARY(mom2_io ${FORT_TEST_SRCS} )
> ADD_LIBRARY(mom2_elf ${CXX_TEST_SRCS} )
>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
>
> # Link the o files
> target_link_libraries(mom2_elf mom2_io)

This command target_link_libraries(mom2_elf mom2_io) says that your library
"mom2_elf" will be linked with the library "mom2_io". If you intended to link
all your executables with those two libraries, the command is:

link_libraries(mom2_elf mom2_io)

This ones is about all targets that are declared after.

> Linking CXX executable local_clib
> CMakeFiles/local_clib.dir/local_clib.cpp.o: In function `main':
> local_clib.cpp:(.text+0xb1b): undefined reference to `get_nobs_letkf'
> local_clib.cpp:(.text+0x1323): undefined reference to `read_obs_letkf'
> local_clib.cpp:(.text+0x1f69): undefined reference to `write_obs_letkf'
> local_clib.cpp:(.text+0x20f7): undefined reference to `write_obs_letkf'
> collect2: ld returned 1 exit status
> make[2]: *** [local_clib] Error 1
> make[1]: *** [CMakeFiles/local_clib.dir/all] Error 2
> make: *** [all] Error 2

What libraries define those functions (read|write)_nobs_letkf ?

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page