<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi, all,<br>
<br>
My program (Fortran 90) uses the "trust region nonlinear least squares
problem" (<font color="#ff6666">dtrnlsp</font>) subroutines, how can I
setup cmake?<br>
<br>
There is a module that calls the <font color="#ff6666">dtrnlsp</font>
subroutines, and one main program uses that module. <br>
<br>
I have wrote the following statement in the CMakeLists.txt with module:<br>
"<br>
add_library(<module> <module source file>)<br>
<br>
set_target_properties(<module><br>
PROPERTIES<br>
LINK_FLAGS "-I${MKL_INCLUDE_DIRS} -Wl,--start-group
${MKL_LIBRARIES}/libmkl_solver_lp64_sequential.a
${MKL_LIBRARIES}/libmkl_core.a -Wl,--end-group"<br>
)<br>
"<br>
where MKL_INCLUDE_DIRS and MKL_LIBRARIES are set to the correct path.
The error output is:<br>
"<br>
......<br>
...... undefined reference to `dtrnlsp_init_'<br>
......<br>
"<br>
<br>
Best regards,<br>
<br>
DONG Li<br>
</tt>
</body>
</html>