Hi, all,

My program (Fortran 90) uses the "trust region nonlinear least squares
problem" (dtrnlsp) subroutines, how can I setup cmake?

There is a module that calls the dtrnlsp subroutines, and one main
program uses that module.

I have wrote the following statement in the CMakeLists.txt with module:
"
add_library(<module> <module source file>)

set_target_properties(<module>
PROPERTIES
LINK_FLAGS "-I${MKL_INCLUDE_DIRS} -Wl,--start-group
${MKL_LIBRARIES}/libmkl_solver_lp64_sequential.a
${MKL_LIBRARIES}/libmkl_core.a -Wl,--end-group"
)
"
where MKL_INCLUDE_DIRS and MKL_LIBRARIES are set to the correct path.
The error output is:
"
......
...... undefined reference to `dtrnlsp_init_'
......
"

Best regards,

DONG Li
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to