snap-stanford / snap

Stanford Network Analysis Platform (SNAP) is a general purpose network analysis and graph mining library.
Other
2.17k stars 797 forks source link

make all not working with windows 8.1 and Mingw #124

Open pavanyogi opened 6 years ago

pavanyogi commented 6 years ago

I modified Makefile.config and attached following code at the end of file ifeq ($(UNAME), MSYS_NT-6.3)

Linux flags

CC = g++ CXXFLAGS += -std=c++98 -Wall CXXFLAGS += -O3 -DNDEBUG -fopenmp

turn on for crash debugging, get symbols with 2>&1 | c++filt

CXXFLAGS += -g -rdynamic

CXXFLAGS += -ggdb

turn on for OpenMP

CXXOPENMP = LDFLAGS += LIBS += -lrt endif

I am getting following errors

E:\E_Drive_Windows_OS_Pavan\Softwares\Snap-4.0\Snap-4.0>make all make -C snap-core make[1]: Entering directory `/e/E_Drive_Windows_OS_Pavan/Softwares/Snap-4.0/Snap-4.0/snap-core' g++ -c -std=c++98 -Wall -O3 -DNDEBUG -fopenmp Snap.cpp -I../glib-core In file included from ../glib-core/base.h:178:0, from Snap.h:9, from Snap.cpp:4: ../glib-core/bd.h:85:0: warning: ignoring #pragma warning [-Wunknown-pragmas]

pragma warning(disable: 4786)

^ ../glib-core/bd.h:92:0: warning: ignoring #pragma warning [-Wunknown-pragmas]

pragma warning(disable: 4996)

^ In file included from ../glib-core/base.cpp:81:0, from Snap.cpp:6: ../glib-core/dt.cpp:2141:34: error: invalid suffix "i64" on integer constant const TUInt64 TUInt64::Mn(uint64(0x0000000000000000i64)); ^ ../glib-core/dt.cpp:2142:34: error: invalid suffix "i64" on integer constant const TUInt64 TUInt64::Mx(uint64(0xFFFFFFFFFFFFFFFFi64)); ^ ../glib-core/dt.cpp: In static member function 'static TStr TLFlt::GetStr(const ldouble&, const int&, const int&)': ../glib-core/dt.cpp:2286:54: warning: unknown conversion type character 'L' in format [-Wformat=] if ((Width==-1)&&(Prec==-1)){sprintf(Bf, "%Lg", Val);} ^ ../glib-core/dt.cpp:2286:54: warning: too many arguments for format [-Wformat-extra-args] ../glib-core/dt.cpp:2287:47: warning: unknown conversion type character 'L' in format [-Wformat=] else {sprintf(Bf, "%.Lf", Width, Prec, Val);} ^ ../glib-core/dt.cpp:2287:47: warning: too many arguments for format [-Wformat-extra-args] In file included from ../glib-core/base.cpp:85:0, from Snap.cpp:6: ../glib-core/unicode.cpp: In member function 'void TUniCodec::TestUtf8(bool, size_t, bool, const TIntV&, const TIntV&, FILE)': ../glib-core/unicode.cpp:113:154: warning: unknown conversion type character 'l' in format [-Wformat=] fprintf(f, "\n retVal = %llu (expected %llu)\n", static_cast (retVal), static_cast (expectedRetVal)); } ^ ../glib-core/unicode.cpp:113:154: warning: unknown conversion type character 'l' in format [-Wformat=] ../glib-core/unicode.cpp:113:154: warning: too many arguments for format [-Wformat-extra-args] ../glib-core/unicode.cpp: In member function 'void TUniCodec::TestUtf16(bool, size_t, bool, const TIntV&, const TIntV&, TUtf16BomHandling, TUniByteOrder, bool, FILE)':

../glib-core/unicode.cpp:316:155: warning: unknown conversion type character 'l' in format [-Wformat=] fprintf(f, "\n retVal = %llu (expected %llu)\n", static_cast (retVal), static_cast (expectedRetVal)); } ^ ../glib-core/unicode.cpp:316:155: warning: unknown conversion type character 'l' in format [-Wformat=] ../glib-core/unicode.cpp:316:155: warning: too many arguments for format [-Wformat-extra-args] In file included from ../glib-core/base.cpp:94:0, from Snap.cpp:6: ../glib-core/xmath.cpp: In static member function 'static void TSpecFunc::LinearFit(const TVec<TPair<TFlt, TFlt> >&, double&, double&, double&, double&, double&, double&)': ../glib-core/xmath.cpp:189:15: error: '_isnan' was not declared in this scope if (_isnan(A) || ! _finite(A)) A = 0.0; ^ ../glib-core/xmath.cpp:189:31: error: '_finite' was not declared in this scope if (_isnan(A) || ! _finite(A)) A = 0.0; ^ ../glib-core/xmath.cpp:190:15: error: '_isnan' was not declared in this scope if (_isnan(B) || ! _finite(B)) B = 0.0; ^ ../glib-core/xmath.cpp:190:31: error: '_finite' was not declared in this scope if (_isnan(B) || ! _finite(B)) B = 0.0; ^ ../glib-core/xmath.cpp: In static member function 'static void TSpecFunc::PowerFit(const TVec<TPair<TFlt, TFlt> >&, double&, double&, double&, double&, double&, double&)': ../glib-core/xmath.cpp:204:16: error: '_isnan' was not declared in this scope if (_isnan(AA) || ! _finite(AA)) A = 0.0; ^ ../glib-core/xmath.cpp:204:33: error: '_finite' was not declared in this scope if (_isnan(AA) || ! _finite(AA)) A = 0.0; ^ ../glib-core/xmath.cpp:205:16: error: '_isnan' was not declared in this scope if (_isnan(BB) || ! _finite(BB)) B = 0.0; ^ ../glib-core/xmath.cpp:205:33: error: '_finite' was not declared in this scope if (_isnan(BB) || ! _finite(BB)) B = 0.0; ^ In file included from ../glib-core/base.h:178:0, from Snap.h:9, from Snap.cpp:4: ../glib-core/linalg.cpp: In static member function 'static void TNumericalStuff::SymetricToTridiag(TFltVV&, int, TFltV&, TFltV&)': ../glib-core/linalg.cpp:686:34: error: '_isnan' was not declared in this scope IAssertR(_isnan(g) == 0, TFlt::GetStr(h)); ^ ../glib-core/bd.h:266:5: note: in definition of macro 'IAssertR' ((Cond) ? static_cast(0) : ExeStop(NULL, TStr(Reason).CStr(), #Cond, FILE, LINE)) ^ In file included from ../glib-core/base.h:178:0, from Snap.h:9, from Snap.cpp:4: ../glib-core/bd.h: In instantiation of 'void TPt::UnRef() const [with TRec = TNEANet]': ../glib-core/bd.h:480:16: required from 'TPt::~TPt() [with TRec = TNEANet]' network.h:2015:54: required from here ../glib-core/bd.h:472:31: warning: deleting object of polymorphic class type 'TNEANet' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] if (Addr->CRef.NoRef()){delete Addr;} ^ make[1]: [Snap.o] Error 1 make[1]: Leaving directory `/e/E_Drive_Windows_OS_Pavan/Softwares/Snap-4.0/Snap-4.0/snap-core' make: [MakeAll] Error 2