>> Please provide the Xcode setting you are using under C++ Standard Library (CLANG_CXX_LIBRARY). > libstdc++
>> nm -g /usr/local/lib/libcryptopp.a | c++filt | grep RandomPool::GenerateIntoBufferedTransformation | grep " T " > 0000000000000310 T CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long) There's your problem :( Xcode is using GNU's libstdc++. Your libcryptoppa. is using LLVM's libc++. You can tell because LLVM decorates their symbols with the "__1". I don't know anything else about it "__1". It may be an actual namespace, or it may be a pseudo-namespace. Jeff On Thursday, February 19, 2015 at 4:22:47 PM UTC-5, Rajiv Poplai wrote: > > On Friday, February 20, 2015 at 2:08:42 AM UTC+5:30, Jeffrey Walton wrote: >> >> >> >> On Thursday, February 19, 2015 at 8:11:34 AM UTC-5, Rajiv Poplai wrote: >>> >>> Thanks Jeff, I followed the steps detailed but it is showing one symbol >>> as not found. >>> >>> CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation >>> >>> &, std::string const&, unsigned long long) >>> referenced from Vtable for CryptoPP::AutoSeededRandomPool >>> >>> This is caused by following statement in code >>> CryptoPP::AutoSeededRandomPool rnd; >>> >>> In the randpool.cpp GenerateIntoBufferedTransformation has the last >>> parameter defined as lword and not unsigned long long. >>> Not able to figure out how to rectify this problem >>> >> This is just a typedef from config.h: >> >> #if defined(_MSC_VER) || defined(__BORLANDC__) >> typedef unsigned __int64 word64; >> #define W64LIT(x) x##ui64 >> #else >> typedef unsigned long long word64; >> #define W64LIT(x) x##ULL >> #endif >> >> // define large word type, used for file offsets and such >> typedef word64 lword; >> const lword LWORD_MAX = W64LIT(0xffffffffffffffff); >> >> Please provide the Xcode setting you are using under C++ Standard Library >> (CLANG_CXX_LIBRARY). >> > libstdc++ > >> >> [~/Documents/ccryptopp]$ lipo -info libcryptopp.a >> >> input file libcryptopp.a is not a fat file >> >> Non-fat file: libcryptopp.a is architecture: x86_64 >> > > >> Please provide the output of the following command: >> > >> nm -g /usr/local/lib/libcryptopp.a | c++filt | grep >> RandomPool::GenerateIntoBufferedTransformation | grep " T " >> > 0000000000000310 T > CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, > > std::__1::basic_string<char, std::__1::char_traits<char>, > std::__1::allocator<char> > const&, unsigned long long) > > 0000000000002d78 S > CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, > > std::__1::basic_string<char, std::__1::char_traits<char>, > std::__1::allocator<char> > const&, unsigned long long) (.eh) > > > Please provide the link command you are using (produced by Xcode). >> > Ld >> /Users/rapoplai/git/gocartclient/public/gcclient/libraries/macintosh/universal/debug/GCClient.app/Contents/MacOS/GCClient >> >> normal x86_64 >> >> cd /Users/rapoplai/git/gocartclient/build/gcclient/xcode >> >> export MACOSX_DEPLOYMENT_TARGET=10.7 >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ >> >> -arch x86_64 -isysroot >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk >> >> -L/Users/rapoplai/git/gocartclient/public/gcclient/libraries/macintosh/universal/debug >> >> -L/Users/rapoplai/git/gocartclient/build/gcclient/xcode/../../../public/services/libraries/macintosh/universal/debug >> >> -L/Users/rapoplai/git/gocart/sources/client/public/services/libraries/macintosh/universal/Debug >> >> -L/Users/rapoplai/git/gocart/sources/client/public/services/libraries/macintosh/universal/Release >> >> -L/Users/rapoplai/git/gocartclient/external/caps/libraries/macintosh/universal/debug >> >> -L/Users/rapoplai/git/gocartclient/build/adobe_ialclient/xcode/../../../external/CCryptoPP/5.6.2/lib/mac/10.9 >> >> -L/Users/rapoplai/git/gocartclient/external/CCryptoPP/5.6.2/lib/mac/10.9 >> -L/Users/rapoplai/git/gocartclient/build/adobe_ialclient/xcode >> -F/Users/rapoplai/git/gocartclient/public/gcclient/libraries/macintosh/universal/debug >> >> -filelist >> /Users/rapoplai/git/gocartclient/obj/gcclient.build/debug/GCClient.build/Objects-normal/x86_64/GCClient.LinkFileList >> >> -mmacosx-version-min=10.7 -no_dead_strip_inits_and_terms -Wl -pie >> -stdlib=libstdc++ -fobjc-link-runtime -lcrypto >> /Users/rapoplai/git/gocartclient/public/adobe_ialclient/libraries/macintosh/universal/debug/adobe_ialclient.a >> >> /Users/rapoplai/git/gocartclient/public/DispatchClient/libraries/macintosh/universal/debug/libdispatchclient.a >> >> -lribscaps -lcryptopp >> /Users/rapoplai/git/gocartclient/public/services/libraries/macintosh/universal/debug/libAMTServiceLoader.a >> >> -lsqlite3 -lc++.1 -framework SystemConfiguration -framework Cocoa -Xlinker >> -dependency_info -Xlinker >> /Users/rapoplai/git/gocartclient/obj/gcclient.build/debug/GCClient.build/Objects-normal/x86_64/GCClient_dependency_info.dat >> >> -o >> /Users/rapoplai/git/gocartclient/public/gcclient/libraries/macintosh/universal/debug/GCClient.app/Contents/MacOS/GCClient >> > > >> >> On Thursday, February 19, 2015 at 3:38:07 AM UTC+5:30, Jeffrey Walton >> wrote: >> >>> >>>> >>>> On Wednesday, February 18, 2015 at 1:31:07 PM UTC-5, Rajiv Poplai wrote: >>>>> >>>>> I created libcrypto.a of CCryptopp 5.6.1 on Mac OS 10.9 using >>>>> GNUmakefile. >>>>> Subsequently when I link it in my project in XCode 5.1.1, I get the >>>>> following linker error. >>>>> >>>>> CryptoPP:RandomPool::GenerateIntoBufferedTransformation symbol not >>>>> found. >>>>> >>>>> Can anybody help me with this issue. >>>>> >>>> Xcode uses LLVM's libc++ by default. By default, Crpyto++'s GNUmakefile >>>> omits CXXFLAGS += -std=libc++, so it uses GNU's libstdc++. The following >>>> is >>>> from around line 90: >>>> >>>> ifeq ($(UNAME),Darwin) >>>> AR = libtool >>>> ARFLAGS = -static -o >>>> CXX = c++ >>>> IS_GCC2 = $(shell $(CXX) -v 2>&1 | $(EGREP) -c gcc-932) >>>> ifeq ($(IS_GCC2),1) >>>> CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables >>>> LDLIBS += -lstdc++ >>>> LDFLAGS += -flat_namespace -undefined suppress -m >>>> endif >>>> endif >>>> >>>> So you will either need to: >>>> >>>> (1) Change Xcode to use GNU's libstdc++ >>>> (2) Rebuild Crypto++ to use LLVM's libc++ >>>> >>>> To perform (1), change the setting in the Target's build settings. >>>> >>>> To perform (2), open the GNUmakefile and add CXXFLAGS += -std=libc++ >>>> after one of he Darwin tests (search for Darwin). And get rid of the line: >>>> >>>> LDLIBS += -lstdc++ >>>> >>> -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
