You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got it running. I don't know why, but for the static build it is necessary that the linking step is conducted by the c++ compiler instead of the fortran compiler. This can be achived with cmake by setting:
If you link static libraries their link dependencies get promoted, in this case there is an indirect dependency on the C++ runtime from NLOpt itself. Defaulting to C++ for linking will probably not work in all cases, instead a new link library could be added (in fact it should be handled by NLOpt's CMake export).
I'm trying to use nlopt-f in a statically compiled executable. But the build process of nlopt-f fails if
BUILD_SHARED_LIBS=OFF
is used.Linker fails with undefined reference error. An excerpt of the log:
If I build also the shared libraries of NLopt the build process of nlopt-f works but my executable has a dependency to the shared library of NLopt.
The text was updated successfully, but these errors were encountered: