stevengj / nlopt

library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization
Other
1.84k stars 567 forks source link

Issues when building on windows #297

Open ronan-keane opened 4 years ago

ronan-keane commented 4 years ago

Hi, I am trying to install the package on windows 64 bit for python 3.7 but having troubles. Initially I tried installing from the wheel that is provided on the "installing for windows" page in the documentation (pip install "path_to_wheel"). However, I found that when installing this way, most of the algorithms will return "nlopt invalid argument".

This led me to attempt to compile and build the source code. I installed swig 4.0.1, Cmake 3.15.3, and Visual Studio 16. I am using the cmake gui to configure and build. When I configure, some of the .h files are not found, and some of the tests fail, but it seems there are no catastrophic errors. I generate without any errors/issues. When I open the project with visual studio and try to build project, it says I am getting many "inconsistent dll linkage" messages and also 3 errors. The final message is 5 succeeded, 1 failed, 4 skipped. I am unsure how to install the package successfully. I am attaching all of the output from Cmake, and all of the output from visual studio. The quotes below removed all the line breaks so I copy pasted the output into .txt files if it helps to view it with the line breaks. cmake output.txt VS output.txt

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17134.
The C compiler identification is MSVC 19.23.28105.4
The CXX compiler identification is MSVC 19.23.28105.4
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
NLopt version 2.6.1
Looking for dlfcn.h
Looking for dlfcn.h - not found
Looking for getopt.h
Looking for getopt.h - not found
Looking for unistd.h
Looking for unistd.h - not found
Looking for string.h
Looking for string.h - found
Looking for strings.h
Looking for strings.h - not found
Looking for inttypes.h
Looking for inttypes.h - found
Looking for memory.h
Looking for memory.h - found
Looking for stdlib.h
Looking for stdlib.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for time.h
Looking for time.h - found
Looking for sys/types.h
Looking for sys/types.h - found
Looking for sys/stat.h
Looking for sys/stat.h - found
Looking for sys/time.h
Looking for sys/time.h - not found
Looking for getpid
Looking for getpid - found
Looking for syscall
Looking for syscall - not found
Looking for isinf
Looking for isinf - not found
Looking for isnan
Looking for isnan - not found
Looking for gettimeofday
Looking for gettimeofday - not found
Looking for qsort_r
Looking for qsort_r - not found
Looking for time
Looking for time - found
Looking for copysign
Looking for copysign - found
Looking for stddef.h
Looking for stddef.h - found
Check size of uint32_t
Check size of uint32_t - done
Check size of unsigned int
Check size of unsigned int - done
Check size of unsigned long
Check size of unsigned long - done
Looking for sqrt in m
Looking for sqrt in m - not found
Looking for fpclassify
Looking for fpclassify - FALSE
Performing Test HAVE_THREAD_LOCAL_STORAGE
Performing Test HAVE_THREAD_LOCAL_STORAGE - Failed
Performing Test HAVE_THREAD_LOCAL_STORAGE
Performing Test HAVE_THREAD_LOCAL_STORAGE - Success
Looking for __cplusplus
Looking for __cplusplus - found
Performing Test SUPPORTS_STDCXX11
Performing Test SUPPORTS_STDCXX11 - Failed
Found PythonInterp: C:/Users/rlk268/AppData/Local/Continuum/anaconda3/python.exe (found version "3.7.1") 
Found PythonLibs: C:/Users/rlk268/AppData/Local/Continuum/anaconda3/libs/python37.lib (found version "3.7.1") 
Could NOT find Guile (missing: GUILE_EXECUTABLE GUILE_ROOT_DIR GUILE_INCLUDE_DIRS GUILE_LIBRARIES) 
Found SWIG: C:/Users/rlk268/swigwin-4.0.1/swig.exe (found version "4.0.1") 
Performing Test UNDEFINED_SYMBOLS_ALLOWED - Failed
Could NOT find Octave (missing: OCTAVE_EXECUTABLE OCTAVE_ROOT_DIR OCTAVE_LIBRARIES) 
Found Matlab: C:/Program Files/MATLAB/R2019a/extern/include (found version "9.6") found components:  MX_LIBRARY MAIN_PROGRAM 
Configuring done
Generating done`

`C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(133): message : see declaration of 'strcpy'
4>LINK : error LNK2001: unresolved external symbol mexCreateMexFunction
4>LINK : error LNK2001: unresolved external symbol mexDestroyMexFunction
4>LINK : error LNK2001: unresolved external symbol mexFunctionAdapter
4>C:/Users/rlk268/Downloads/nlopt-master/build/src/octave/Debug/nlopt_optimize.lib : fatal error LNK1120: 3 unresolved externals
4>Done building project "nlopt_optimize-mex.vcxproj" -- FAILED.`

`1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>Checking Build System
2>------ Rebuild All started: Project: nlopt, Configuration: Debug x64 ------
3>------ Skipped Rebuild All: Project: RUN_TESTS, Configuration: Debug x64 ------
3>Project not selected to build for this solution configuration 
2>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/CMakeLists.txt
2>DIRect.c
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>direct_wrap.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>DIRserial.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>DIRsubrout.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>cdirect.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>hybrid.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>praxis.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>plis.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>plip.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>pnet.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>mssubs.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>pssubs.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>crs.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\crs\crs.c(55,20): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data
2>mlsl.c
2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\crs\crs.c(70,30): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>mma.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>ccsa_quadratic.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>cobyla.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>newuoa.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>nldrmd.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>sbplx.c
2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\neldermead\nldrmd.c(42,20): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>Generating Code...
2>Compiling...
2>auglag.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>bobyqa.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>isres.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>slsqp.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>esch.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>general.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>options.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>optimize.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>deprecated.c
2>f77api.c
2>mt19937ar.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>sobolseq.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>timer.c
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\sobolseq.c(96,21): warning C4146: unary minus operator applied to unsigned type, result still unsigned
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(54,22): warning C4244: 'return': conversion from 'time_t' to 'double', possible loss of data
2>stop.c
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(85,22): warning C4244: 'return': conversion from 'time_t' to 'unsigned long', possible loss of data
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>redblack.c
2>qsort_r.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>rescale.c
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
2>Generating Code...
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
2>global.cc
2>linalg.cc
2>local.cc
2>stogo.cc
2>tools.cc
2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\stogo\tools.cc(166,23): warning C4267: 'return': conversion from 'size_t' to 'unsigned int', possible loss of data
2>Generating Code...
2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\stogo\tools.cc(179,18): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
2>   Creating library C:/Users/rlk268/Downloads/nlopt-master/build/Debug/nlopt.lib and object C:/Users/rlk268/Downloads/nlopt-master/build/Debug/nlopt.exp
2>nlopt.vcxproj -> C:\Users\rlk268\Downloads\nlopt-master\build\Debug\nlopt.dll
2>Done building project "nlopt.vcxproj".
4>------ Rebuild All started: Project: nlopt_optimize-mex, Configuration: Debug x64 ------
5>------ Rebuild All started: Project: t_tutorial, Configuration: Debug x64 ------
6>------ Rebuild All started: Project: testopt, Configuration: Debug x64 ------
4>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/src/octave/CMakeLists.txt
4>nlopt_optimize-mex.c
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(177,54): warning C4244: 'function': conversion from 'double' to 'int', possible loss of data
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(180,73): warning C4244: 'function': conversion from 'double' to 'unsigned int', possible loss of data
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(181,81): warning C4244: 'function': conversion from 'double' to 'unsigned int', possible loss of data
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(152,15): warning C4101: 'i': unreferenced local variable
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(222,43): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(289,31): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(326,31): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(243,1): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(133): message : see declaration of 'strcpy'
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(260,1): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(133): message : see declaration of 'strcpy'
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(305,1): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(133): message : see declaration of 'strcpy'
4>C:\Users\rlk268\Downloads\nlopt-master\src\octave\nlopt_optimize-mex.c(342,1): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
4>c_mexapi_version.c
4>Generating Code...
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(133): message : see declaration of 'strcpy'
4>LINK : error LNK2001: unresolved external symbol mexCreateMexFunction
4>LINK : error LNK2001: unresolved external symbol mexDestroyMexFunction
4>LINK : error LNK2001: unresolved external symbol mexFunctionAdapter
4>C:/Users/rlk268/Downloads/nlopt-master/build/src/octave/Debug/nlopt_optimize.lib : fatal error LNK1120: 3 unresolved externals
4>Done building project "nlopt_optimize-mex.vcxproj" -- FAILED.
5>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/test/CMakeLists.txt
6>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/test/CMakeLists.txt
5>t_tutorial.cxx
6>testfuncs.c
6>testopt.c
6>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
6>timer.c
6>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
6>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
5>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(397,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
5>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(425,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
5>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(454,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
5>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(464,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
6>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
6>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(54,22): warning C4244: 'return': conversion from 'time_t' to 'double', possible loss of data
6>mt19937ar.c
6>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(85,22): warning C4244: 'return': conversion from 'time_t' to 'unsigned long', possible loss of data
6>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage
6>nlopt-getopt.c
6>Generating Code...
6>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign'
5>t_tutorial.vcxproj -> C:\Users\rlk268\Downloads\nlopt-master\build\test\Debug\t_tutorial.exe
5>Done building project "t_tutorial.vcxproj".
6>testopt.vcxproj -> C:\Users\rlk268\Downloads\nlopt-master\build\test\Debug\testopt.exe
6>Done building project "testopt.vcxproj".
7>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug x64 ------
8>------ Skipped Rebuild All: Project: tests, Configuration: Debug x64 ------
8>Project not selected to build for this solution configuration 
7>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/CMakeLists.txt
9>------ Skipped Rebuild All: Project: INSTALL, Configuration: Debug x64 ------
9>Project not selected to build for this solution configuration 
10>------ Skipped Rebuild All: Project: PACKAGE, Configuration: Debug x64 ------
10>Project not selected to build for this solution configuration 
========== Rebuild All: 5 succeeded, 1 failed, 4 skipped ==========
stevengj commented 4 years ago

Do you need to build the Matlab and Octave plugins, which seem to be encountering errors (presumably because you don't have the corresponding build tools)? You could disable these by passing -DNLOPT_OCTAVE=Off -DNLOPT_MATLAB=Off to cmake.

jschueller commented 4 years ago

probably a cmake issue: https://gitlab.kitware.com/cmake/cmake/issues/19382

ronan-keane commented 4 years ago

OK I disabled the Matlab, Octabe, and Guile plugins, and the project was able to successfully build. But it seems I'm still doing something wrong because I can't import nlopt, and I don't see any nlopt.py file in either the build directory or my python directory.

jschueller commented 4 years ago

look in the swig subdirectory

ronan-keane commented 4 years ago

No nlopt.py file in build > src > swig. I checked also in my python folder, no search results for "nlopt". When I run the "RUN_TEST" project in VS, all tests pass. When building the entire project, I just see visual studio will make a folder "nlopt 2.6.1" which will have some header files, a nlopt.dll and nlopt.lib. There is no nlopt.py file being made anywhere, so there is no way I can import nlopt in python.

I've spent more than 20 hours trying to get this to work. The instructions for windows install just aren't making any sense to me. I tried installing from the wheel posted on the "nlopt on windows" page, none of the algorithms using c code will work. The .tar.gz files posted in the same page, I don't understand what to do with them; there is no nlopt.py file in them. And when I am trying to bulid with cmake/visual studio, there is no .py file being created anywhere.

Can you please explain what are the steps one follows to build on Windows? Because everything I have tried so far has not worked.

jschueller commented 4 years ago

python libs and swig are found, so in theory it should be there somewhere, can you post the output of the tests ? else, since you're using anaconda there's an up to date nlopt package in anaconda, from the conda-forge channel

ronan-keane commented 4 years ago

I have tried installing using anaconda prompt. The issue is that most of the algorithms will not work, they will return "nlopt invalid argument". Specifically, I can import nlopt and create nlopt opt object, but many algorithms (AGS, STOGO, slsqp, mma etc.) will not work. DIRECT_L and one or two others will work. Here are the ways I've tried to install using anaconda prompt:
-pip install nlopt (installs from py-pi.org channel by default, does not work at all) -pip install <path/to/.whl> (does not work for most algorithms, see above) -conda config --add channels conda-forge conda install nlopt (installs from conda-forge, does not work for most algorithms, see above) So none of them are able to call algorithms such as ags, stogo etc.

I asked one of my collaborators to check installation on windows, they found the same result as me; trying to install from the wheel or any channels will not work. When they try to install using cmake and visual studio there is no .py file being created. Are you positive nlopt is able to be installed on windows for python? Has anyone on windows been able to call AGS or STOGO algorithm from python?

Here is output from cmake cmake output 2.txt Here is output from visual studio VS output 2.txt

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17134. The C compiler identification is MSVC 19.23.28105.4 The CXX compiler identification is MSVC 19.23.28105.4 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done NLopt version 2.6.1 Looking for dlfcn.h Looking for dlfcn.h - not found Looking for getopt.h Looking for getopt.h - not found Looking for unistd.h Looking for unistd.h - not found Looking for string.h Looking for string.h - found Looking for strings.h Looking for strings.h - not found Looking for inttypes.h Looking for inttypes.h - found Looking for memory.h Looking for memory.h - found Looking for stdlib.h Looking for stdlib.h - found Looking for stdint.h Looking for stdint.h - found Looking for time.h Looking for time.h - found Looking for sys/types.h Looking for sys/types.h - found Looking for sys/stat.h Looking for sys/stat.h - found Looking for sys/time.h Looking for sys/time.h - not found Looking for getpid Looking for getpid - found Looking for syscall Looking for syscall - not found Looking for isinf Looking for isinf - not found Looking for isnan Looking for isnan - not found Looking for gettimeofday Looking for gettimeofday - not found Looking for qsort_r Looking for qsort_r - not found Looking for time Looking for time - found Looking for copysign Looking for copysign - found Looking for stddef.h Looking for stddef.h - found Check size of uint32_t Check size of uint32_t - done Check size of unsigned int Check size of unsigned int - done Check size of unsigned long Check size of unsigned long - done Looking for sqrt in m Looking for sqrt in m - not found Looking for fpclassify Looking for fpclassify - FALSE Performing Test HAVE_THREAD_LOCAL_STORAGE Performing Test HAVE_THREAD_LOCAL_STORAGE - Failed Performing Test HAVE_THREAD_LOCAL_STORAGE Performing Test HAVE_THREAD_LOCAL_STORAGE - Success Looking for cplusplus Looking for cplusplus - found Performing Test SUPPORTS_STDCXX11 Performing Test SUPPORTS_STDCXX11 - Failed Found PythonInterp: C:/Users/rlk268/AppData/Local/Continuum/anaconda3/python.exe (found version "3.7.1") Found PythonLibs: C:/Users/rlk268/AppData/Local/Continuum/anaconda3/libs/python37.lib (found version "3.7.1") Found SWIG: C:/Users/rlk268/swigwin-4.0.1/swig.exe (found version "4.0.1") Performing Test UNDEFINED_SYMBOLS_ALLOWED - Failed Configuring done Generating done

1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------ 1>Checking Build System 2>------ Build started: Project: nlopt, Configuration: Release x64 ------ 3>------ Skipped Build: Project: RUN_TESTS, Configuration: Release x64 ------ 3>Project not selected to build for this solution configuration 2>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/CMakeLists.txt 2>DIRect.c 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>direct_wrap.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>DIRserial.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>DIRsubrout.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>cdirect.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>hybrid.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>praxis.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>plis.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>plip.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>pnet.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>mssubs.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>pssubs.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>crs.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\crs\crs.c(55,20): warning C4244: 'return': conversion from 'int64' to 'int', possible loss of data 2>mlsl.c 2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\crs\crs.c(70,30): warning C4244: '=': conversion from 'int64' to 'int', possible loss of data 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>mma.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>ccsa_quadratic.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>cobyla.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>newuoa.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>nldrmd.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>sbplx.c 2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\neldermead\nldrmd.c(42,20): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>Generating Code... 2>Compiling... 2>auglag.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>bobyqa.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>isres.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>slsqp.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>esch.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>general.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>options.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>optimize.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>deprecated.c 2>f77api.c 2>mt19937ar.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>sobolseq.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>timer.c 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\sobolseq.c(96,21): warning C4146: unary minus operator applied to unsigned type, result still unsigned 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(54,22): warning C4244: 'return': conversion from 'time_t' to 'double', possible loss of data 2>stop.c 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(85,22): warning C4244: 'return': conversion from 'time_t' to 'unsigned long', possible loss of data 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>redblack.c 2>qsort_r.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>rescale.c 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 2>Generating Code... 2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 2>global.cc 2>linalg.cc 2>local.cc 2>stogo.cc 2>tools.cc 2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\stogo\tools.cc(166,23): warning C4267: 'return': conversion from 'size_t' to 'unsigned int', possible loss of data 2>Generating Code... 2>C:\Users\rlk268\Downloads\nlopt-master\src\algs\stogo\tools.cc(179,18): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data 2> Creating library C:/Users/rlk268/Downloads/nlopt-master/build/Release/nlopt.lib and object C:/Users/rlk268/Downloads/nlopt-master/build/Release/nlopt.exp 2>nlopt.vcxproj -> C:\Users\rlk268\Downloads\nlopt-master\build\Release\nlopt.dll 2>Done building project "nlopt.vcxproj". 4>------ Build started: Project: t_tutorial, Configuration: Release x64 ------ 5>------ Build started: Project: testopt, Configuration: Release x64 ------ 5>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/test/CMakeLists.txt 4>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/test/CMakeLists.txt 5>testfuncs.c 5>testopt.c 5>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 5>timer.c 5>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 5>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 5>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 5>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(54,22): warning C4244: 'return': conversion from 'time_t' to 'double', possible loss of data 5>mt19937ar.c 5>C:\Users\rlk268\Downloads\nlopt-master\src\util\timer.c(85,22): warning C4244: 'return': conversion from 'time_t' to 'unsigned long', possible loss of data 5>C:\Users\rlk268\Downloads\nlopt-master\src\util\nlopt-util.h(43,43): warning C4273: 'copysign': inconsistent dll linkage 5>nlopt-getopt.c 5>Generating Code... 4>t_tutorial.cxx 4>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(397,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data 4>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(425,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data 4>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(454,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data 4>C:\Users\rlk268\Downloads\nlopt-master\build\src\api\nlopt.hpp(464,1): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data 5>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(498,47): message : see previous definition of 'copysign' 4>t_tutorial.vcxproj -> C:\Users\rlk268\Downloads\nlopt-master\build\test\Release\t_tutorial.exe 4>Done building project "t_tutorial.vcxproj". 5>testopt.vcxproj -> C:\Users\rlk268\Downloads\nlopt-master\build\test\Release\testopt.exe 5>Done building project "testopt.vcxproj". 6>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------ 7>------ Skipped Build: Project: tests, Configuration: Release x64 ------ 7>Project not selected to build for this solution configuration 6>Building Custom Rule C:/Users/rlk268/Downloads/nlopt-master/CMakeLists.txt 8>------ Skipped Build: Project: INSTALL, Configuration: Release x64 ------ 8>Project not selected to build for this solution configuration 9>------ Skipped Build: Project: PACKAGE, Configuration: Release x64 ------ 9>Project not selected to build for this solution configuration ========== Build: 5 succeeded, 0 failed, 0 up-to-date, 4 skipped ==========

jschueller commented 4 years ago

you wont get ags because your compiler does not support c++11, but stogo should be available

ronan-keane commented 4 years ago

Stogo does not work installing from conda channel, I cannot test using the compiled code because there is no .py file after I compile.