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
(void) unused; is standard C/C++, as I understand it. Can you give more information on this error? (If it is just a warning, it can be safely ignored.)
1>esch.c
1>..\nlopt-2.4.1\esch\esch.c(63) : error C2143: Syntaxfehler: Es fehlt ';' vor 'const'
1>..\nlopt-2.4.1\esch\esch.c(64) : error C2143: Syntaxfehler: Es fehlt ';' vor 'const'
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2065: 'a': nichtdeklarierter Bezeichner
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2223: Der linke Teil von '->fitness' muss auf eine Struktur/Union zeigen
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2065: 'b': nichtdeklarierter Bezeichner
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2223: Der linke Teil von '->fitness' muss auf eine Struktur/Union zeigen
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2065: 'a': nichtdeklarierter Bezeichner
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2223: Der linke Teil von '->fitness' muss auf eine Struktur/Union zeigen
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2065: 'b': nichtdeklarierter Bezeichner
1>..\nlopt-2.4.1\esch\esch.c(65) : error C2223: Der linke Teil von '->fitness' muss auf eine Struktur/Union zeigen
1>..\nlopt-2.4.1\esch\esch.c(65) : fatal error C1903: Weiterverarbeitung nach vorherigem Fehler nicht möglich; Kompilierung wird abgebrochen.
I just want to report my findings on how to compile latest NLopt on MS Windows / Visual Studio (2008).
At first, esch/esch.c and esch/esch.h have to be added to CMakeLists.txt
Then, M_PI has to be included in esch.c somehow - either via
define _USE_MATH_DEFINES
include <math.h>
or simply via
ifndef M_PI
define M_PI 3.14159265358979323846
endif
Finally, MS C compiler does not like "(void) unused;" in esch.c, line 62 - it can be simply commented out to make it work.
The text was updated successfully, but these errors were encountered: