--
---
You received this message because you are subscribed to the Google Groups "Folly: the Facebook Open-source LibrarY" group.
To unsubscribe from this group and stop receiving emails from it, send an email to facebook-foll...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
~/netmon/UdpPinger/upong$ make
g++ -g -Igen-cpp -std=c++11 NoradTargetThread.o Main.cpp -o upong libfolly.a -lgflags -lpthread -lglog
libfolly.a(Demangle.o): In function `folly::demangle(char const*, char*, unsigned long)':
/home/ypei/folly/folly/Demangle.cpp:105: undefined reference to `cplus_demangle_v3_callback'
/home/ypei/folly/folly/Demangle.cpp:105: undefined reference to `cplus_demangle_v3_callback'
libfolly.a(Format.o): In function `folly::FormatValue<double, void>::formatHelper(folly::basic_fbstring<char, std::char_traits<char>, std::allocator<char>, folly::fbstring_core<char> >&, int&, folly::FormatArg&) const':
/home/ypei/folly/folly/Format.cpp:99: undefined reference to `double_conversion::DoubleToStringConverter::ToFixed(double, int, double_conversion::StringBuilder*) const'
libfolly.a(Format.o): In function `double_conversion::DoubleToStringConverter::ToShortest(double, double_conversion::StringBuilder*) const':
/usr/include/double-conversion/double-conversion.h:158: undefined reference to `double_conversion::DoubleToStringConverter::ToShortestIeeeNumber(double, double_conversion::StringBuilder*, double_conversion::DoubleToStringConverter::DtoaMode) const'
libfolly.a(Format.o): In function `folly::FormatValue<double, void>::formatHelper(folly::basic_fbstring<char, std::char_traits<char>, std::allocator<char>, folly::fbstring_core<char> >&, int&, folly::FormatArg&) const':
/home/ypei/folly/folly/Format.cpp:118: undefined reference to `double_conversion::DoubleToStringConverter::ToExponential(double, int, double_conversion::StringBuilder*) const'
libfolly.a(String.o): In function `std::enable_if<std::is_floating_point<double>::value, double>::type folly::to<double>(folly::Range<char const*>*)':
/home/ypei/folly/folly/./../folly/Conv.h:1142: undefined reference to `double_conversion::StringToDoubleConverter::StringToDouble(char const*, int, int*) const'
collect2: error: ld returned 1 exit status
make: *** [upong] Error 1
//here we found the .a file
~/netmon/folly/folly/.libs$ ls
Benchmark.o json.o MacAddress.o
Bits.o libfolly.a MemoryMapping.o
Checksum.o libfollybase.a Random.o
Conv.o libfollybase.la SafeAssert.o
Demangle.o libfollybenchmark.a SharedMutex.o
dynamic.o libfollybenchmark.la Singleton.o
EscapeTables.o libfollybenchmark.lai SocketAddress.o
File.o libfollybenchmark.so SpookyHashV1.o
FileUtil.o libfollybenchmark.so.57 SpookyHashV2.o
FingerprintTables.o libfollybenchmark.so.57.0.0 StringBase.o
Format.o libfollybenchmark.so.57.0.0T String.o
FormatTables.o libfolly.la Subprocess.o
GroupVarint.o libfolly.lai ThreadCachedArena.o
GroupVarintTables.o libfolly.so TimeoutQueue.o
IPAddress.o libfolly.so.57 Unicode.o
IPAddressV4.o libfolly.so.57.0.0 Uri.o
IPAddressV6.o LifoSem.o Version.o
Do you know a quickly to figure out which lib the libfolly.a also depends on? .... I tried to add all of those Demangle.o to Makefile but seems not working.Alternatively, can we try to use LD_LIBRARY_PATH and load the dependency without static linking?~/netmon/UdpPinger/upong$ make
g++ -g -Igen-cpp -std=c++11 NoradTargetThread.o Main.cpp -o upong libfolly.a -lgflags -lpthread -lglog
libfolly.a(Demangle.o): In function `folly::demangle(char const*, char*, unsigned long)':
/home/ypei/folly/folly/Demangle.cpp:105: undefined reference to `cplus_demangle_v3_callback'
/home/ypei/folly/folly/Demangle.cpp:105: undefined reference to `cplus_demangle_v3_callback'
libfolly.a(Format.o): In function `folly::FormatValue<double, void>::formatHelper(folly::basic_fbstring<char, std::char_traits<char>, std::allocator<char>, folly::fbstring_core<char> >&, int&, folly::FormatArg&) const':
/home/ypei/folly/folly/Format.cpp:99: undefined reference to `double_conversion::DoubleToStringConverter::ToFixed(double, int, double_conversion::StringBuilder*) const'
libfolly.a(Format.o): In function `double_conversion::DoubleToStringConverter::ToShortest(double, double_conversion::StringBuilder*) const':
/usr/include/double-conversion/double-conversion.h:158: undefined reference to `double_conversion::DoubleToStringConverter::ToShortestIeeeNumber(double, double_conversion::StringBuilder*, double_conversion::DoubleToStringConverter::DtoaMode) const'
libfolly.a(Format.o): In function `folly::FormatValue<double, void>::formatHelper(folly::basic_fbstring<char, std::char_traits<char>, std::allocator<char>, folly::fbstring_core<char> >&, int&, folly::FormatArg&) const':
/home/ypei/folly/folly/Format.cpp:118: undefined reference to `double_conversion::DoubleToStringConverter::ToExponential(double, int, double_conversion::StringBuilder*) const'
libfolly.a(String.o): In function `std::enable_if<std::is_floating_point<double>::value, double>::type folly::to<double>(folly::Range<char const*>*)':
/home/ypei/folly/folly/./../folly/Conv.h:1142: undefined reference to `double_conversion::StringToDoubleConverter::StringToDouble(char const*, int, int*) const'
collect2: error: ld returned 1 exit status
make: *** [upong] Error 1
mtanski@buildbox:~$ ldd /usr/local/lib/libfolly.solinux-vdso.so.1 => (0x00007ffec0be2000)libboost_context.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_context.so.1.58.0 (0x00007f0dd2581000)libboost_program_options.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.58.0 (0x00007f0dd2303000)libboost_thread.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0 (0x00007f0dd20dc000)libboost_filesystem.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0 (0x00007f0dd1ec4000)...
LDLIBS=libfolly.a /usr/lib/x86_64-linux-gnu/libiberty.a /usr/lib/x86_64-linux-gnu/libdouble-conversion.a -lgflags -lpthread -lglog