Trying to compile the latest Sugar NN for my Mac - this error popped up - need help here please .. many thanks ..
g++ -Wall -Wcast-qual -std=c++11 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_PEXT -msse4 -mbmi2 -flto -c -o tt.o tt.cpp
tt.cpp:42:10: fatal error: 'windows.h' file not found
#include "windows.h"
^~~~~~~~~~~
1 error generated.
make[1]: *** [tt.o] Error 1
make: *** [build] Error 2
➜ src
Sugar NN for Mac
Moderators: hgm, Rebel, chrisw
-
- Posts: 247
- Joined: Tue Apr 13, 2010 10:41 am
Re: Sugar NN for Mac
Looks like the author is aware of this issue (for Linux). But no solution yet.
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk
-
- Posts: 229
- Joined: Thu Mar 10, 2016 6:17 pm
- Location: Canada
Re: Sugar NN for Mac
OK - many thanks ..Max wrote: ↑Tue Jan 14, 2020 11:41 am Looks like the author is aware of this issue (for Linux). But no solution yet.
-
- Posts: 50
- Joined: Tue Jul 19, 2016 10:19 am
Re: Sugar NN for Mac
I could compile it for Linux applying these fixes.
# windows.h: No such file or directory
sed -i 's|#include "windows.h"||' tt.cpp
# Disable large pages code for Linux
sed -i '92i#ifdef _WIN32' tt.cpp
sed -i '145i#endif' tt.cpp
sed -i '162i#ifdef _WIN32' tt.cpp
sed -i '164i#endif' tt.cpp
sed -i '170i#ifdef _WIN32' tt.cpp
sed -i '174i#endif' tt.cpp
sed -i '180i#ifdef _WIN32' tt.cpp
sed -i '182i#endif' tt.cpp
sed -i '186i#ifdef _WIN32' tt.cpp
sed -i '190i#endif' tt.cpp
sed -i '195i#ifdef _WIN32' tt.cpp
sed -i '197i#endif' tt.cpp
sed -i '199i#ifdef _WIN32' tt.cpp
sed -i '228i#endif' tt.cpp
# /usr/bin/ld: cannot find -lws2_32
sed -i 's| -lws2_32||' Makefile
And compile : make profile-build ARCH=x86-64-bmi2 COMP=gcc
# windows.h: No such file or directory
sed -i 's|#include "windows.h"||' tt.cpp
# Disable large pages code for Linux
sed -i '92i#ifdef _WIN32' tt.cpp
sed -i '145i#endif' tt.cpp
sed -i '162i#ifdef _WIN32' tt.cpp
sed -i '164i#endif' tt.cpp
sed -i '170i#ifdef _WIN32' tt.cpp
sed -i '174i#endif' tt.cpp
sed -i '180i#ifdef _WIN32' tt.cpp
sed -i '182i#endif' tt.cpp
sed -i '186i#ifdef _WIN32' tt.cpp
sed -i '190i#endif' tt.cpp
sed -i '195i#ifdef _WIN32' tt.cpp
sed -i '197i#endif' tt.cpp
sed -i '199i#ifdef _WIN32' tt.cpp
sed -i '228i#endif' tt.cpp
# /usr/bin/ld: cannot find -lws2_32
sed -i 's| -lws2_32||' Makefile
And compile : make profile-build ARCH=x86-64-bmi2 COMP=gcc
-
- Posts: 229
- Joined: Thu Mar 10, 2016 6:17 pm
- Location: Canada
Re: Sugar NN for Mac
@thunderstruck
Thanks .. .. will try this weekend - hope it works !
Thanks .. .. will try this weekend - hope it works !