snap-stanford / snap

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

Build errors in VS 2019 #218

Open nukebro opened 3 years ago

nukebro commented 3 years ago

I'm trying to compile the SNAP library with a pre-existing program in VS 2019. I'm getting errors that seem like a 32/64 issue, not sure how to resolve.

>driver.obj : error LNK2001: unresolved external symbol "int __cdecl gettimeofday(struct timeval *,void *)" (?gettimeofday@@YAHPEAUtimeval@@PEAX@Z) 1>stdafx.obj : error LNK2001: unresolved external symbol "int __cdecl gettimeofday(struct timeval *,void *)" (?gettimeofday@@YAHPEAUtimeval@@PEAX@Z) 1>(driver.obj) : error LNK2001: unresolved external symbol "int __cdecl gettimeofday(struct timeval *,void *)" (?gettimeofday@@YAHPEAUtimeval@@PEAX@Z) 1>driver.obj : error LNK2001: unresolved external symbol "void __cdecl ExeStop(char const *,char const *,char const *,char const *,int const &)" (?ExeStop@@YAXPEBD000AEBH@Z) 1>stdafx.obj : error LNK2001: unresolved external symbol "void __cdecl ExeStop(char const *,char const *,char const *,char const *,int const &)" (?ExeStop@@YAXPEBD000AEBH@Z) 1>DIBOpt_driver.lib(network_analysis.obj) : error LNK2001: unresolved external symbol "void __cdecl ExeStop(char const *,char const *,char const *,char const *,int const &)" (?ExeStop@@YAXPEBD000AEBH@Z) 1>driver.obj : error LNK2001: unresolved external symbol "private: static class TRStr * __cdecl TStr::GetRStr(char const *)" (?GetRStr@TStr@@CAPEAVTRStr@@PEBD@Z) 1>stdafx.obj : error LNK2001: unresolved external symbol "private: static class TRStr * __cdecl TStr::GetRStr(char const *)" (?GetRStr@TStr@@CAPEAVTRStr@@PEBD@Z) 1>(driver.obj) : error LNK2001: unresolved external symbol "private: static class TRStr * __cdecl TStr::GetRStr(char const *)" (?GetRStr@TStr@@CAPEAVTRStr@@PEBD@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: static int const TInt::Mx" (?Mx@TInt@@2HB) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "class TStr __cdecl operator+(class TStr const &,class TStr const &)" (??H@YA?AVTStr@@AEBV0@0@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "class TStr __cdecl operator+(class TStr const &,char const *)" (??H@YA?AVTStr@@AEBV0@PEBD@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: static class TStr __cdecl TStr::Fmt(char const *,...)" (?Fmt@TStr@@SA?AV1@PEBDZZ) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: bool __cdecl TStr::IsPrefix(char const *)const " (?IsPrefix@TStr@@QEBA_NPEBD@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: class TStr __cdecl TStr::GetSubStr(int const &,int const &)const " (?GetSubStr@TStr@@QEBA?AV1@AEBH0@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: bool __cdecl TNGraph::IsEdge(int const &,int const &,bool const &)const " (?IsEdge@TNGraph@@QEBA_NAEBH0AEB_N@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: int __cdecl TNGraph::AddEdge(int const &,int const &)" (?AddEdge@TNGraph@@QEAAHAEBH0@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: int __cdecl TNGraph::AddNode(int)" (?AddNode@TNGraph@@QEAAHH@Z) 1>(network_analysis.obj) : error LNK2001: unresolved external symbol "public: static void (__cdecl* TExcept::OnExceptF)(class TStr const &)" (?OnExceptF@TExcept@@2P6AXAEBVTStr@@@ZEA) 1>LIBCMT.lib(exe_winmain.obj) : error LNK2001: unresolved external symbol WinMain

Elssky commented 2 years ago

Same error,have you solved this problem? thanks

Elssky commented 2 years ago

I solved this problem and answer here https://groups.google.com/g/snap-discuss/c/2BbG23osPDY?pli=1, hope this can help you.