Related
I'm attempting to compile some c++ i2cdevlib code with gcc and I'm receiving the error:
/usr/share/arduino/libraries/i2cdevlib/Arduino/MPU9150/MPU9150_9Axis_MotionApps41.h: In member function 'uint8_t MPU9150::dmpInitialize()':
/usr/share/arduino/libraries/i2cdevlib/Arduino/MPU9150/MPU9150_9Axis_MotionApps41.h:605:56: error: no matching function for call to 'min(uint8_t&, int)'
getFIFOBytes(fifoBuffer, min(fifoCount, 128)); // safeguard only 128 bytes
^
Why isn't there a min(uint8_t&, int) defined? Isn't this a standard math function?
Am I correct in assuming I'm missing an include or namespace declaration somewhere, and shouldn't define this function myself?
The parameters that you pass to std::min is different: one is uint8_t and the other is int.
The function type of std::min is as follows:
template< class T >
const T& min( const T& a, const T& b );
You need tell the compiler what's the type parameter of std::min.
So the solution is:
std::min<int>(fifoCount, 128);
Your error message says it all
error: no matching function for call to 'min(uint8_t&, int)'
The compiler fails to resolve to the correct specialization as the types of the parameter do not conform (match).
Either static upcast the uint8_t parameter fifoCount to int as in std::min(static_cast<int>(fifoCount), 128)
Or, explicitly specify the type to specialize upon std::min<int>(fifoCount, 128)
This is a project that was worked on a while ago. It used androind-ndk-r7b to compile and android-2.3.7 to test the code. I was given the task to port it to the latest android or atleast 4.4. The source code is one year old, so the last compiler it supports is gcc-4.6 and g++-4.6. Therefore, I used android-ndk-r10d, which is the last revision of android ndk to support the 4.6 compiler. Now I compile some external android libraries, which are compiled without any issue. Then, I compile the source code of my application using ndk. The ndk is supposed to generate a shared library that can be used in my app. The shared library links to the external android libraries which are already compiler. So when the ndk-build script gets to the last step of generating the shared library file, I get this weird error. I have looked alot on the internet and could not find anything related to it. Please, need expert advice.
The error is:
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: format 'default' not supported; treating as elf (supported formats: elf, binary)
If you need more info on the problem, let me know. I'll upload more info.
Update:
Sorry, I am a newbie to stack overflow. Thanks for keeping up with me. So I get these and many other errors. I think these are standard functions that shouldn't be undefined.
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(atexit_arm.o): in function __aeabi_atexit:/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/atexit_arm.cc:35: error: undefined reference to '__cxa_atexit'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_globals.o): in function __eh_globals_init::~__eh_globals_init():/tmp/ndk-user/tmp/gnu-libstdc++/static-armeabithumb-4.6/include/arm-linux-androideabi/bits/gthr-default.h:727: error: undefined reference to 'pthread_key_delete'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_globals.o): in function __cxa_get_globals_fast:/tmp/ndk-user/tmp/gnu-libstdc++/static-armeabithumb-4.6/include/arm-linux-androideabi/bits/gthr-default.h:733: error: undefined reference to 'pthread_getspecific'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_globals.o): in function __cxa_get_globals:/tmp/ndk-user/tmp/gnu-libstdc++/static-armeabithumb-4.6/include/arm-linux-androideabi/bits/gthr-default.h:733: error: undefined reference to 'pthread_getspecific'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_globals.o): in function __cxa_get_globals:/tmp/ndk-user/tmp/gnu-libstdc++/static-armeabithumb-4.6/include/arm-linux-androideabi/bits/gthr-default.h:739: error: undefined reference to 'pthread_setspecific'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_globals.o): in function _GLOBAL__sub_I_eh_globals.cc:/tmp/ndk-user/tmp/gnu-libstdc++/static-armeabithumb-4.6/include/arm-linux-androideabi/bits/gthr-default.h:721: error: undefined reference to 'pthread_key_create'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_personality.o): in function read_encoded_value_with_base(unsigned char, unsigned int, unsigned char const*, unsigned int*):/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/../gcc/unwind-pe.h:257: error: undefined reference to 'abort'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_personality.o): in function base_of_encoded_value(unsigned char, _Unwind_Context*):/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/../gcc/unwind-pe.h:120: error: undefined reference to 'abort'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_personality.o): in function __gxx_personality_v0:/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/eh_personality.cc:402: error: undefined reference to 'abort'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(eh_terminate.o): in function __cxxabiv1::__terminate(void ()()):/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/eh_terminate.cc:41: error: undefined reference to 'abort'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(guard.o): in function __cxa_guard_acquire:/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/guard.cc:273: error: undefined reference to 'syscall'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(guard.o): in function __cxa_guard_abort:/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/guard.cc:332: error: undefined reference to 'syscall'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(guard.o): in function __cxa_guard_release:/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/guard.cc:372: error: undefined reference to 'syscall'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(pure.o): in function __cxa_pure_virtual:/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/pure.cc:49: error: undefined reference to 'write'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(locale_init.o): in function std::locale::_S_initialize():/tmp/ndk-user/tmp/gnu-libstdc++/static-armeabithumb-4.6/include/arm-linux-androideabi/bits/gthr-default.h:713: error: undefined reference to 'pthread_once'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(locale_init.o): in function std::locale::global(std::locale const&):/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/src/locale_init.cc:246: error: undefined reference to 'setlocale'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(codecvt_members.o): in function std::codecvt::do_out(mbstate_t&, wchar_t const, wchar_t const*, wchar_t const*&, char*, char*, char*&) const:codecvt_members.cc:81: error: undefined reference to 'wcrtomb'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(codecvt_members.o): in function std::codecvt::do_out(mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&) const:codecvt_members.cc:66: error: undefined reference to 'wcrtomb'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(codecvt_members.o): in function std::codecvt::do_in(mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&) const:codecvt_members.cc:126: error: undefined reference to 'mbrtowc'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(codecvt_members.o): in function std::codecvt::do_length(mbstate_t&, char const*, char const*, unsigned int) const:codecvt_members.cc:191: error: undefined reference to 'mbrtowc'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(collate_members.o): in function std::collate::_M_compare(char const*, char const*) const:collate_members.cc:46: error: undefined reference to 'strcoll'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(collate_members.o): in function std::collate::_M_transform(char*, char const*, unsigned int) const:collate_members.cc:54: error: undefined reference to 'strxfrm'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(collate_members.o): in function std::collate::_M_compare(wchar_t const*, wchar_t const*) const:collate_members.cc:62: error: undefined reference to 'wcscoll'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(collate_members.o): in function std::collate::_M_transform(wchar_t*, wchar_t const*, unsigned int) const:collate_members.cc:70: error: undefined reference to 'wcsxfrm'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::_M_convert_to_wmask(char) const:ctype_members.cc:91: error: undefined reference to 'wctype'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::_M_convert_to_wmask(char) const:ctype_members.cc:94: error: undefined reference to 'wctype'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::_M_convert_to_wmask(char) const:ctype_members.cc:76: error: undefined reference to 'wctype'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::_M_convert_to_wmask(char) const:ctype_members.cc:67: error: undefined reference to 'wctype'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_toupper(wchar_t) const:ctype_members.cc:104: error: undefined reference to 'towupper'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_toupper(wchar_t*, wchar_t const*) const:ctype_members.cc:111: error: undefined reference to 'towupper'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_tolower(wchar_t) const:ctype_members.cc:119: error: undefined reference to 'towlower'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_tolower(wchar_t*, wchar_t const*) const:ctype_members.cc:126: error: undefined reference to 'towlower'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_is(char, wchar_t) const:ctype_members.cc:142: error: undefined reference to 'iswctype'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_is(wchar_t const*, wchar_t const*, char*) const:ctype_members.cc:161: error: undefined reference to 'iswctype'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_narrow(wchar_t, char) const:ctype_members.cc:210: error: undefined reference to 'wctob'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_narrow(wchar_t const*, wchar_t const*, char, char*) const:ctype_members.cc:235: error: undefined reference to 'wctob'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::do_narrow(wchar_t const*, wchar_t const*, char, char*) const:ctype_members.cc:226: error: undefined reference to 'wctob'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::_M_initialize_ctype():ctype_members.cc:249: error: undefined reference to 'wctob'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(ctype_members.o): in function std::ctype::_M_initialize_ctype():ctype_members.cc:261: error: undefined reference to 'btowc'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(time_members.o): in function std::__timepunct::_M_put(char*, unsigned int, char const*, tm const*) const:time_members.cc:56: error: undefined reference to 'strftime'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(time_members.o): in function std::__timepunct::_M_put(wchar_t*, unsigned int, wchar_t const*, tm const*) const:time_members.cc:145: error: undefined reference to 'wcsftime'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(time_members.o): in function std::__timepunct::_M_put(wchar_t*, unsigned int, wchar_t const*, tm const*) const:time_members.cc:145: error: undefined reference to 'wcsftime'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(vterminate.o): in function __gnu_cxx::__verbose_terminate_handler():/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/vterminate.cc:71: error: undefined reference to 'fputs'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb/libgnustl_static.a(vterminate.o): in function __gnu_cxx::__verbose_terminate_handler():/s/ndk-toolchain/src/gcc/gcc-4.6/libstdc++-v3/libsupc++/vterminate.cc:87: error: undefined reference to 'fputc'
/home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/zeeshan/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/thumb/libgcc.a(_dvmd_lnx.o): in function __aeabi_idiv0:/s/ndk-toolchain/src/build/../gcc/gcc-4.6/libgcc/../gcc/config/arm/lib1funcs.asm:1270: error: undefined reference to 'raise'
I recently got an arduino and wifi sheild but i am having trouble with the wifi library specifically the udp class. the connection and everything works fine when i dont have the WiFiUdp.h and cpp files in the folder. I can get on the internet, send data, get a green and blue light which establishes connection and data being sent. But the moment i include wifiudp.h in my sketch., I get a bunch of errors. the errors are listed below. I got my library from github, downloaded it, extracted and stuffed it into the library like i did with everything else on github. Its not my code because when i use the wifisendreceive example on the arduino website, i get the same errors when i upload it. something isnt working right in this 'master' arduino file from github. has anyone experienced the same issue i am dealing with and does anyone know how to fix this? I know as many errors as i get, its probably not including or defining something, i just dont know where and what. the errors explain where its not working but the problem is there is a bunch of them. here are the errors. thanks for anyone that can shed light on this udp class. By the way, this is just half of the errors. I am not allowed to send more than 3000 characters in the body. the errors are the same type just from different files, etc.
WiFi\WiFi.cpp.o: In function `WiFiClass::getSocket()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:26: multiple definition of `WiFiClass::getSocket()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:25: first defined here
c:/users/albertr/desktop/arduino-1.0.3/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
WiFi\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:26: multiple definition of `WiFiClass::_server_port'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:25: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::hostByName(char const*, IPAddress&)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:227: multiple definition of `WiFiClass::hostByName(char const*, IPAddress&)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:194: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::status()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:224: multiple definition of `WiFiClass::status()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:191: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::encryptionType(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:217: multiple definition of `WiFiClass::encryptionType(unsigned char)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:184: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::RSSI(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:212: multiple definition of `WiFiClass::RSSI(unsigned char)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:179: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::SSID(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:207: multiple definition of `WiFiClass::SSID(unsigned char)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:174: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::scanNetworks()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:191: multiple definition of `WiFiClass::scanNetworks()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:158: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::encryptionType()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:187: multiple definition of `WiFiClass::encryptionType()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:154: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::RSSI()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:182: multiple definition of `WiFiClass::RSSI()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:149: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::BSSID(unsigned char*)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:173: multiple definition of `WiFiClass::BSSID(unsigned char*)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:140: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::SSID()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:170: multiple definition of `WiFiClass::SSID()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:137: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::gatewayIP()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:161: multiple definition of `WiFiClass::gatewayIP()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:128: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::subnetMask()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:154: multiple definition of `WiFiClass::subnetMask()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:121: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::localIP()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:147: multiple definition of `WiFiClass::localIP()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:114: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::macAddress(unsigned char*)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:140: multiple definition of `WiFiClass::macAddress(unsigned char*)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:107: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::disconnect()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:137: multiple definition of `WiFiClass::disconnect()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:104: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::begin(char*, char const*)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:82: multiple definition of `WiFiClass::begin(char*, char const*)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:82: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::begin(char*, unsigned char, char const*)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:63: multiple definition of `WiFiClass::begin(char*, unsigned char, char const*)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:62: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::begin(char*)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:43: multiple definition of `WiFiClass::begin(char*)'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:42: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::firmwareVersion()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:40: multiple definition of `WiFiClass::firmwareVersion()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:39: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::init()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:23: multiple definition of `WiFiClass::init()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:22: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::init()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:23: multiple definition of `WiFiClass::WiFiClass()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:22: first defined here
WiFi\WiFi.cpp.o: In function `WiFiClass::init()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:23: multiple definition of `WiFiClass::WiFiClass()'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:22: first defined here
WiFi\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:26: multiple definition of `WiFiClass::_state'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:25: first defined here
WiFi\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFi.cpp:26: multiple definition of `WiFi'
WiFi1\WiFi.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFi.cpp:25: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:17: multiple definition of `WiFiClient::WiFiClient()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:17: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:17: multiple definition of `WiFiClient::WiFiClient()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:17: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:20: multiple definition of `WiFiClient::WiFiClient(unsigned char)'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:20: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:20: multiple definition of `WiFiClient::WiFiClient(unsigned char)'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:20: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::write(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:56: multiple definition of `WiFiClient::write(unsigned char)'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:56: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::flush()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:121: multiple definition of `WiFiClient::flush()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:121: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::operator bool()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:164: multiple definition of `WiFiClient::operator bool()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:164: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::getFirstSocket()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:169: multiple definition of `WiFiClient::getFirstSocket()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:169: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::status()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:157: multiple definition of `WiFiClient::status()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:157: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::connected()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:142: multiple definition of `WiFiClient::connected()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:142: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::stop()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:126: multiple definition of `WiFiClient::stop()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:126: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::peek()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:112: multiple definition of `WiFiClient::peek()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:112: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::read()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:96: multiple definition of `WiFiClient::read()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:96: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::read(unsigned char*, unsigned int)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:106: multiple definition of `WiFiClient::read(unsigned char*, unsigned int)'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:106: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::available()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:88: multiple definition of `WiFiClient::available()'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:88: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::write(unsigned char const*, unsigned int)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:60: multiple definition of `WiFiClient::write(unsigned char const*, unsigned int)'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:60: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::connect(IPAddress, unsigned int)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:32: multiple definition of `WiFiClient::connect(IPAddress, unsigned int)'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:32: first defined here
WiFi\WiFiClient.cpp.o: In function `WiFiClient::connect(char const*, unsigned int)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiClient.cpp:23: multiple definition of `WiFiClient::connect(char const*, unsigned int)'
WiFi1\WiFiClient.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiClient.cpp:23: first defined here
WiFi\WiFiClient.cpp.o:(.data._ZN10WiFiClient8_srcportE+0x0): multiple definition of `WiFiClient::_srcport'
WiFi1\WiFiClient.cpp.o:(.data._ZN10WiFiClient8_srcportE+0x0): first defined here
WiFi\WiFiServer.cpp.o: In function `WiFiServer':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiServer.cpp:12: multiple definition of `WiFiServer::WiFiServer(unsigned int)'
WiFi1\WiFiServer.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiServer.cpp:12: first defined here
WiFi\WiFiServer.cpp.o: In function `WiFiServer':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiServer.cpp:12: multiple definition of `WiFiServer::WiFiServer(unsigned int)'
WiFi1\WiFiServer.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiServer.cpp:12: first defined here
WiFi\WiFiServer.cpp.o: In function `WiFiServer::write(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiServer.cpp:66: multiple definition of `WiFiServer::write(unsigned char)'
WiFi1\WiFiServer.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiServer.cpp:65: first defined here
WiFi\WiFiServer.cpp.o: In function `WiFiServer::write(unsigned char const*, unsigned int)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiServer.cpp:71: multiple definition of `WiFiServer::write(unsigned char const*, unsigned int)'
WiFi1\WiFiServer.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiServer.cpp:70: first defined here
WiFi\WiFiServer.cpp.o: In function `WiFiServer::status()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiServer.cpp:62: multiple definition of `WiFiServer::status()'
WiFi1\WiFiServer.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiServer.cpp:61: first defined here
WiFi\WiFiServer.cpp.o: In function `WiFiServer::available(unsigned char*)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiServer.cpp:28: multiple definition of `WiFiServer::available(unsigned char*)'
WiFi1\WiFiServer.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiServer.cpp:27: first defined here
WiFi\WiFiServer.cpp.o: In function `WiFiServer::begin()':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi/WiFiServer.cpp:17: multiple definition of `WiFiServer::begin()'
WiFi1\WiFiServer.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1/WiFiServer.cpp:17: first defined here
WiFi\utility\socket.c.o: In function `socket':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:10: multiple definition of `socket'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:10: first defined here
WiFi\utility\socket.c.o: In function `close':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:11: multiple definition of `close'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:11: first defined here
WiFi\utility\socket.c.o: In function `connect':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:12: multiple definition of `connect'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:12: first defined here
WiFi\utility\socket.c.o: In function `disconnect':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:13: multiple definition of `disconnect'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:13: first defined here
WiFi\utility\socket.c.o: In function `listen':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:14: multiple definition of `listen'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:14: first defined here
WiFi\utility\socket.c.o: In function `send':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:15: multiple definition of `send'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:15: first defined here
WiFi\utility\socket.c.o: In function `recv':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:16: multiple definition of `recv'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:16: first defined here
WiFi\utility\socket.c.o: In function `sendto':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:17: multiple definition of `sendto'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:17: first defined here
WiFi\utility\socket.c.o: In function `recvfrom':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:18: multiple definition of `recvfrom'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:18: first defined here
WiFi\utility\socket.c.o: In function `igmpsend':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/socket.c:20: multiple definition of `igmpsend'
WiFi1\utility\socket.c.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/socket.c:20: first defined here
WiFi\utility\server_drv.cpp.o: In function `ServerDrv::availData(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/server_drv.cpp:125: multiple definition of `ServerDrv::availData(unsigned char)'
WiFi1\utility\server_drv.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/server_drv.cpp:123: first defined here
WiFi\utility\server_drv.cpp.o: In function `ServerDrv::getClientState(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/server_drv.cpp:104: multiple definition of `ServerDrv::getClientState(unsigned char)'
WiFi1\utility\server_drv.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/server_drv.cpp:102: first defined here
WiFi\utility\server_drv.cpp.o: In function `ServerDrv::getServerState(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/server_drv.cpp:83: multiple definition of `ServerDrv::getServerState(unsigned char)'
WiFi1\utility\server_drv.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/server_drv.cpp:81: first defined here
WiFi\utility\server_drv.cpp.o: In function `ServerDrv::stopClient(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/server_drv.cpp:62: multiple definition of `ServerDrv::stopClient(unsigned char)'
WiFi1\utility\server_drv.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/server_drv.cpp:60: first defined here
WiFi\utility\server_drv.cpp.o: In function `ServerDrv::checkDataSent(unsigned char)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/server_drv.cpp:275: multiple definition of `ServerDrv::checkDataSent(unsigned char)'
WiFi1\utility\server_drv.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/server_drv.cpp:227: first defined here
WiFi\utility\server_drv.cpp.o: In function `ServerDrv::sendData(unsigned char, unsigned char const*, unsigned int)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/server_drv.cpp:248: multiple definition of `ServerDrv::sendData(unsigned char, unsigned char const*, unsigned int)'
WiFi1\utility\server_drv.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/server_drv.cpp:200: first defined here
WiFi\utility\server_drv.cpp.o: In function `ServerDrv::getDataBuf(unsigned char, unsigned char*, unsigned int*)':
C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi\utility/server_drv.cpp:173: multiple definition of `ServerDrv::getDataBuf(unsigned char, unsigned char*, unsigned int*)'
WiFi1\utility\server_drv.cpp.o:C:\Users\AlbertR\Desktop\arduino-1.0.3\libraries\WiFi1\utility/server_drv.cpp:176: first defined here
multiple definition means you are either linking the same symbols multiple times or you are have a header included multiple times without proper include guards. In your case it looks like you have a WiFi and WiFi1 folder containing the same library getting linked (linking the same symbols multiple times). – Joe
I have not mine C++ project, which I can successfully compile using this line:
g++ -o minit minit.c MinitGlobal.h Item.c ItemsetQueue.c Transaction.c Error.h Dataset.c SubDataset.c RankItems.c MinitAlgo.c but if I add optimization level like below (same for -O3):
[ec2-user#ip-10-209-16-177 minit++]$ g++ -o -O0 minit minit.c MinitGlobal.h Item.c ItemsetQueue.c Transaction.c Error.h Dataset.c SubDataset.c RankItems.c MinitAlgo.c
minit: In function `_start':
(.text+0x2a8): multiple definition of `_start'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crt1.o:(.text+0x0): first defined here
minit: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crti.o:(.fini+0x0): first defined here
minit:(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crt1.o:(.rodata.cst4+0x0): first defined here
minit: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crt1.o:(.data+0x0): first defined here
minit:(.rodata+0x8): multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/crtbegin.o:(.rodata+0x0): first defined here
minit: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crti.o:(.init+0x0): first defined here
/tmp/cc0cvoT6.o: In function `main':
minit.c:(.text+0x4d2): multiple definition of `main'
minit:(.text+0x0): first defined here
/tmp/ccRfRvQv.o:(.bss+0x0): multiple definition of `minit::Itemset::count'
minit:(.bss+0x638): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::ItemsetQueue()':
ItemsetQueue.c:(.text+0x0): multiple definition of `minit::ItemsetQueue::ItemsetQueue()'
minit:(.text+0x390): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::enqueue(unsigned int const&, unsigned int)':
ItemsetQueue.c:(.text+0x7e): multiple definition of `minit::ItemsetQueue::enqueue(unsigned int const&, unsigned int)'
minit:(.text+0x430): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::enqueue(minit::Itemset const&, unsigned int const&, unsigned int)':
ItemsetQueue.c:(.text+0xfe): multiple definition of `minit::ItemsetQueue::enqueue(minit::Itemset const&, unsigned int const&, unsigned int)'
minit:(.text+0x520): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::dequeue()':
ItemsetQueue.c:(.text+0x186): multiple definition of `minit::ItemsetQueue::dequeue()'
minit:(.text+0x3b0): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::print(std::basic_ostream<char, std::char_traits<char> >&) const':
ItemsetQueue.c:(.text+0x1f2): multiple definition of `minit::ItemsetQueue::print(std::basic_ostream<char, std::char_traits<char> >&) const'
minit:(.text+0x6d0): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::printItemsets(std::basic_ostream<char, std::char_traits<char> >&) const':
ItemsetQueue.c:(.text+0x306): multiple definition of `minit::ItemsetQueue::printItemsets(std::basic_ostream<char, std::char_traits<char> >&) const'
minit:(.text+0xa60): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::ItemsetQueue()':
ItemsetQueue.c:(.text+0x0): multiple definition of `minit::ItemsetQueue::ItemsetQueue()'
minit:(.text+0x390): first defined here
/tmp/cc6ZqTIl.o: In function `minit::Transaction::readTransaction(std::basic_istream<char, std::char_traits<char> >&)':
Transaction.c:(.text+0x0): multiple definition of `minit::Transaction::readTransaction(std::basic_istream<char, std::char_traits<char> >&)'
minit:(.text+0x16b0): first defined here
/tmp/cc6ZqTIl.o: In function `minit::Transaction::readValue(std::basic_istream<char, std::char_traits<char> >&)':
Transaction.c:(.text+0x14a): multiple definition of `minit::Transaction::readValue(std::basic_istream<char, std::char_traits<char> >&)'
minit:(.text+0x15b0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Dataset.c:(.text+0x0): multiple definition of `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x29b0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::readDataset(std::basic_istream<char, std::char_traits<char> >&)':
Dataset.c:(.text+0x644): multiple definition of `minit::Dataset::readDataset(std::basic_istream<char, std::char_traits<char> >&)'
minit:(.text+0x2350): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::~Dataset()':
Dataset.c:(.text+0x512): multiple definition of `minit::Dataset::~Dataset()'
minit:(.text+0x1af0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::toString() const':
Dataset.c:(.text+0x7f0): multiple definition of `minit::Dataset::toString() const'
minit:(.text+0x1c00): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::printColumnInfo()':
Dataset.c:(.text+0x9d6): multiple definition of `minit::Dataset::printColumnInfo()'
minit:(.text+0x2200): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Dataset.c:(.text+0x0): multiple definition of `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x29b0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::~Dataset()':
Dataset.c:(.text+0x512): multiple definition of `minit::Dataset::~Dataset()'
minit:(.text+0x1af0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::Dataset const&)':
SubDataset.c:(.text+0x0): multiple definition of `minit::SubDataset::SubDataset(minit::Dataset const&)'
minit:(.text+0x3c20): first defined here
/tmp/cc3PBOXh.o:(.bss+0x0): multiple definition of `minit::SubDataset::count'
minit:(.bss+0x670): first defined here
/tmp/cc3PBOXh.o:(.bss+0x10): multiple definition of `minit::SubDataset::preComputeCallsPerMaxc'
minit:(.bss+0x650): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::SubDataset const&)':
SubDataset.c:(.text+0x11a): multiple definition of `minit::SubDataset::SubDataset(minit::SubDataset const&)'
minit:(.text+0x3360): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::~SubDataset()':
SubDataset.c:(.text+0x1b8): multiple definition of `minit::SubDataset::~SubDataset()'
minit:(.text+0x33f0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::~SubDataset()':
SubDataset.c:(.text+0x1b8): multiple definition of `minit::SubDataset::~SubDataset()'
minit:(.text+0x33f0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::supportSet(unsigned int) const':
SubDataset.c:(.text+0x242): multiple definition of `minit::SubDataset::supportSet(unsigned int) const'
minit:(.text+0x33a0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::preComputeSupportSets(minit::RankItems const&, int, int, int)':
SubDataset.c:(.text+0x2ac): multiple definition of `minit::SubDataset::preComputeSupportSets(minit::RankItems const&, int, int, int)'
minit:(.text+0x40d0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::preComputeSupportSetsLeafNode(minit::RankItems const&, unsigned int, unsigned int)':
SubDataset.c:(.text+0x514): multiple definition of `minit::SubDataset::preComputeSupportSetsLeafNode(minit::RankItems const&, unsigned int, unsigned int)'
minit:(.text+0x3f30): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::SubDataset const&)':
SubDataset.c:(.text+0x11a): multiple definition of `minit::SubDataset::SubDataset(minit::SubDataset const&)'
minit:(.text+0x3360): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::doneWithAnchorItem(unsigned int const&)':
SubDataset.c:(.text+0x6a0): multiple definition of `minit::SubDataset::doneWithAnchorItem(unsigned int const&)'
minit:(.text+0x37e0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::Dataset const&)':
SubDataset.c:(.text+0x0): multiple definition of `minit::SubDataset::SubDataset(minit::Dataset const&)'
minit:(.text+0x3c20): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::Dataset const&)':
RankItems.c:(.text+0x0): multiple definition of `minit::RankItems::RankItems(minit::Dataset const&)'
minit:(.text+0x56c0): first defined here
/tmp/ccWMQMqM.o:(.bss+0x0): multiple definition of `minit::RankItems::count'
minit:(.bss+0x680): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)':
RankItems.c:(.text+0x1fa): multiple definition of `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)'
minit:(.text+0x5990): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::toString() const':
RankItems.c:(.text+0x4e0): multiple definition of `minit::RankItems::toString() const'
minit:(.text+0x5130): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::Dataset const&)':
RankItems.c:(.text+0x0): multiple definition of `minit::RankItems::RankItems(minit::Dataset const&)'
minit:(.text+0x56c0): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)':
RankItems.c:(.text+0x1fa): multiple definition of `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)'
minit:(.text+0x5990): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
MinitAlgo.c:(.text+0x0): multiple definition of `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x6eb0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::~MinitAlgo()':
MinitAlgo.c:(.text+0x128): multiple definition of `minit::MinitAlgo::~MinitAlgo()'
minit:(.text+0x6dc0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::search(int, int, bool)':
MinitAlgo.c:(.text+0x1ee): multiple definition of `minit::MinitAlgo::search(int, int, bool)'
minit:(.text+0x93f0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::minitRecursive(minit::SubDataset&, minit::RankItems const&, int, int)':
MinitAlgo.c:(.text+0x6fc): multiple definition of `minit::MinitAlgo::minitRecursive(minit::SubDataset&, minit::RankItems const&, int, int)'
minit:(.text+0x9860): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::processMinII(int, unsigned int, unsigned int)':
MinitAlgo.c:(.text+0x678): multiple definition of `minit::MinitAlgo::processMinII(int, unsigned int, unsigned int)'
minit:(.text+0x6d70): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::requiredSupportTransactionsExist(unsigned int const&, minit::Itemset const&, unsigned int const&, minit::SubDataset const&, int)':
MinitAlgo.c:(.text+0x10f0): multiple definition of `minit::MinitAlgo::requiredSupportTransactionsExist(unsigned int const&, minit::Itemset const&, unsigned int const&, minit::SubDataset const&, int)'
minit:(.text+0x6fe0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
MinitAlgo.c:(.text+0x0): multiple definition of `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x6eb0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::~MinitAlgo()':
MinitAlgo.c:(.text+0x128): multiple definition of `minit::MinitAlgo::~MinitAlgo()'
minit:(.text+0x6dc0): first defined here
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
minit:(.dtors+0x8): first defined here
/usr/bin/ld: error in minit(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
[ec2-user#ip-10-209-16-177 minit++]$
[ec2-user#ip-10-209-16-177 minit++]$ g++ -o -O0 minit minit.c MinitGlobal.h Item.c ItemsetQueue.c Transaction.c Error.h Dataset.c SubDataset.c RankItems.c MinitAlgo.c
minit: In function `_start':
(.text+0x2a8): multiple definition of `_start'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crt1.o:(.text+0x0): first defined here
minit: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crti.o:(.fini+0x0): first defined here
minit:(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crt1.o:(.rodata.cst4+0x0): first defined here
minit: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crt1.o:(.data+0x0): first defined here
minit:(.rodata+0x8): multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/crtbegin.o:(.rodata+0x0): first defined here
minit: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/../../../../lib64/crti.o:(.init+0x0): first defined here
/tmp/cc0cvoT6.o: In function `main':
minit.c:(.text+0x4d2): multiple definition of `main'
minit:(.text+0x0): first defined here
/tmp/ccRfRvQv.o:(.bss+0x0): multiple definition of `minit::Itemset::count'
minit:(.bss+0x638): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::ItemsetQueue()':
ItemsetQueue.c:(.text+0x0): multiple definition of `minit::ItemsetQueue::ItemsetQueue()'
minit:(.text+0x390): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::enqueue(unsigned int const&, unsigned int)':
ItemsetQueue.c:(.text+0x7e): multiple definition of `minit::ItemsetQueue::enqueue(unsigned int const&, unsigned int)'
minit:(.text+0x430): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::enqueue(minit::Itemset const&, unsigned int const&, unsigned int)':
ItemsetQueue.c:(.text+0xfe): multiple definition of `minit::ItemsetQueue::enqueue(minit::Itemset const&, unsigned int const&, unsigned int)'
minit:(.text+0x520): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::dequeue()':
ItemsetQueue.c:(.text+0x186): multiple definition of `minit::ItemsetQueue::dequeue()'
minit:(.text+0x3b0): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::print(std::basic_ostream<char, std::char_traits<char> >&) const':
ItemsetQueue.c:(.text+0x1f2): multiple definition of `minit::ItemsetQueue::print(std::basic_ostream<char, std::char_traits<char> >&) const'
minit:(.text+0x6d0): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::printItemsets(std::basic_ostream<char, std::char_traits<char> >&) const':
ItemsetQueue.c:(.text+0x306): multiple definition of `minit::ItemsetQueue::printItemsets(std::basic_ostream<char, std::char_traits<char> >&) const'
minit:(.text+0xa60): first defined here
/tmp/ccQhesuV.o: In function `minit::ItemsetQueue::ItemsetQueue()':
ItemsetQueue.c:(.text+0x0): multiple definition of `minit::ItemsetQueue::ItemsetQueue()'
minit:(.text+0x390): first defined here
/tmp/cc6ZqTIl.o: In function `minit::Transaction::readTransaction(std::basic_istream<char, std::char_traits<char> >&)':
Transaction.c:(.text+0x0): multiple definition of `minit::Transaction::readTransaction(std::basic_istream<char, std::char_traits<char> >&)'
minit:(.text+0x16b0): first defined here
/tmp/cc6ZqTIl.o: In function `minit::Transaction::readValue(std::basic_istream<char, std::char_traits<char> >&)':
Transaction.c:(.text+0x14a): multiple definition of `minit::Transaction::readValue(std::basic_istream<char, std::char_traits<char> >&)'
minit:(.text+0x15b0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Dataset.c:(.text+0x0): multiple definition of `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x29b0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::readDataset(std::basic_istream<char, std::char_traits<char> >&)':
Dataset.c:(.text+0x644): multiple definition of `minit::Dataset::readDataset(std::basic_istream<char, std::char_traits<char> >&)'
minit:(.text+0x2350): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::~Dataset()':
Dataset.c:(.text+0x512): multiple definition of `minit::Dataset::~Dataset()'
minit:(.text+0x1af0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::toString() const':
Dataset.c:(.text+0x7f0): multiple definition of `minit::Dataset::toString() const'
minit:(.text+0x1c00): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::printColumnInfo()':
Dataset.c:(.text+0x9d6): multiple definition of `minit::Dataset::printColumnInfo()'
minit:(.text+0x2200): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
Dataset.c:(.text+0x0): multiple definition of `minit::Dataset::Dataset(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x29b0): first defined here
/tmp/ccZandoO.o: In function `minit::Dataset::~Dataset()':
Dataset.c:(.text+0x512): multiple definition of `minit::Dataset::~Dataset()'
minit:(.text+0x1af0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::Dataset const&)':
SubDataset.c:(.text+0x0): multiple definition of `minit::SubDataset::SubDataset(minit::Dataset const&)'
minit:(.text+0x3c20): first defined here
/tmp/cc3PBOXh.o:(.bss+0x0): multiple definition of `minit::SubDataset::count'
minit:(.bss+0x670): first defined here
/tmp/cc3PBOXh.o:(.bss+0x10): multiple definition of `minit::SubDataset::preComputeCallsPerMaxc'
minit:(.bss+0x650): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::SubDataset const&)':
SubDataset.c:(.text+0x11a): multiple definition of `minit::SubDataset::SubDataset(minit::SubDataset const&)'
minit:(.text+0x3360): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::~SubDataset()':
SubDataset.c:(.text+0x1b8): multiple definition of `minit::SubDataset::~SubDataset()'
minit:(.text+0x33f0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::~SubDataset()':
SubDataset.c:(.text+0x1b8): multiple definition of `minit::SubDataset::~SubDataset()'
minit:(.text+0x33f0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::supportSet(unsigned int) const':
SubDataset.c:(.text+0x242): multiple definition of `minit::SubDataset::supportSet(unsigned int) const'
minit:(.text+0x33a0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::preComputeSupportSets(minit::RankItems const&, int, int, int)':
SubDataset.c:(.text+0x2ac): multiple definition of `minit::SubDataset::preComputeSupportSets(minit::RankItems const&, int, int, int)'
minit:(.text+0x40d0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::preComputeSupportSetsLeafNode(minit::RankItems const&, unsigned int, unsigned int)':
SubDataset.c:(.text+0x514): multiple definition of `minit::SubDataset::preComputeSupportSetsLeafNode(minit::RankItems const&, unsigned int, unsigned int)'
minit:(.text+0x3f30): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::SubDataset const&)':
SubDataset.c:(.text+0x11a): multiple definition of `minit::SubDataset::SubDataset(minit::SubDataset const&)'
minit:(.text+0x3360): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::doneWithAnchorItem(unsigned int const&)':
SubDataset.c:(.text+0x6a0): multiple definition of `minit::SubDataset::doneWithAnchorItem(unsigned int const&)'
minit:(.text+0x37e0): first defined here
/tmp/cc3PBOXh.o: In function `minit::SubDataset::SubDataset(minit::Dataset const&)':
SubDataset.c:(.text+0x0): multiple definition of `minit::SubDataset::SubDataset(minit::Dataset const&)'
minit:(.text+0x3c20): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::Dataset const&)':
RankItems.c:(.text+0x0): multiple definition of `minit::RankItems::RankItems(minit::Dataset const&)'
minit:(.text+0x56c0): first defined here
/tmp/ccWMQMqM.o:(.bss+0x0): multiple definition of `minit::RankItems::count'
minit:(.bss+0x680): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)':
RankItems.c:(.text+0x1fa): multiple definition of `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)'
minit:(.text+0x5990): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::toString() const':
RankItems.c:(.text+0x4e0): multiple definition of `minit::RankItems::toString() const'
minit:(.text+0x5130): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::Dataset const&)':
RankItems.c:(.text+0x0): multiple definition of `minit::RankItems::RankItems(minit::Dataset const&)'
minit:(.text+0x56c0): first defined here
/tmp/ccWMQMqM.o: In function `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)':
RankItems.c:(.text+0x1fa): multiple definition of `minit::RankItems::RankItems(minit::SubDataset&, int, minit::RankItems const&, int, unsigned int)'
minit:(.text+0x5990): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
MinitAlgo.c:(.text+0x0): multiple definition of `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x6eb0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::~MinitAlgo()':
MinitAlgo.c:(.text+0x128): multiple definition of `minit::MinitAlgo::~MinitAlgo()'
minit:(.text+0x6dc0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::search(int, int, bool)':
MinitAlgo.c:(.text+0x1ee): multiple definition of `minit::MinitAlgo::search(int, int, bool)'
minit:(.text+0x93f0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::minitRecursive(minit::SubDataset&, minit::RankItems const&, int, int)':
MinitAlgo.c:(.text+0x6fc): multiple definition of `minit::MinitAlgo::minitRecursive(minit::SubDataset&, minit::RankItems const&, int, int)'
minit:(.text+0x9860): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::processMinII(int, unsigned int, unsigned int)':
MinitAlgo.c:(.text+0x678): multiple definition of `minit::MinitAlgo::processMinII(int, unsigned int, unsigned int)'
minit:(.text+0x6d70): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::requiredSupportTransactionsExist(unsigned int const&, minit::Itemset const&, unsigned int const&, minit::SubDataset const&, int)':
MinitAlgo.c:(.text+0x10f0): multiple definition of `minit::MinitAlgo::requiredSupportTransactionsExist(unsigned int const&, minit::Itemset const&, unsigned int const&, minit::SubDataset const&, int)'
minit:(.text+0x6fe0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
MinitAlgo.c:(.text+0x0): multiple definition of `minit::MinitAlgo::MinitAlgo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
minit:(.text+0x6eb0): first defined here
/tmp/ccDeL01h.o: In function `minit::MinitAlgo::~MinitAlgo()':
MinitAlgo.c:(.text+0x128): multiple definition of `minit::MinitAlgo::~MinitAlgo()'
minit:(.text+0x6dc0): first defined here
/usr/lib/gcc/x86_64-amazon-linux/4.6.3/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
minit:(.dtors+0x8): first defined here
/usr/bin/ld: error in minit(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
[ec2-user#ip-10-209-16-177 minit++]$
It crashes. All the errors are of "multiple definition" nature, could you please suggest how to fix that?
gcc/g++ expect the name of the output file directly after -o. You mixed up the argument order:
Instead of g++ -o -O0 minit ... try g++ -O0 -o minit ....
g++ tried to link the executable minit and the objects files together into one assembly, that's why you get these errors.
I tried several times, it's probably fairly easy to solve but I can't see the solution.
I tried to compile SAXPrint example from xerces site ( the link to four *.cpp and *.hpp files is here [sorry for using skydrive, my FTP died]) using g++ in linux (got xerces-dev package) and windows (MinGW with libraries) and I couldn't succeed Is there any chance you could lend me a hand? I tried command:
g++ SAXPrint.hpp SAXPrint.cpp SAXPrintHandlers.hpp SAXPrintHandlers.cpp -o output
and it gave me:
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x0): multiple definition of `SAXPrintHandlers::SAXPrint
Handlers(char const*, xercesc_3_1::XMLFormatter::UnRepFlags)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x0): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x0): multiple definition of `SAXPrintHandlers::SAXPrint
Handlers(char const*, xercesc_3_1::XMLFormatter::UnRepFlags)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x0): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x11e): multiple definition of `SAXPrintHandlers::~SAXPr
intHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x11e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x11e): multiple definition of `SAXPrintHandlers::~SAXPr
intHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x11e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1c9): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1c9): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1d3): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1d3): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1dd): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1dd): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1e7): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1e7): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1f2): multiple definition of `SAXPrintHandlers::~SAXPr
intHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1f2): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x212): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x212): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x219): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x219): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x220): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x220): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x227): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x227): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x22e): multiple definition of `SAXPrintHandlers::writeC
hars(unsigned char const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x22e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x234): multiple definition of `SAXPrintHandlers::writeC
hars(unsigned char const*, unsigned long, xercesc_3_1::XMLFormatter*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x234): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x262): multiple definition of `non-virtual thunk to SAX
PrintHandlers::writeChars(unsigned char const*, unsigned long, xercesc_3_1::XMLFormatter*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x262): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x26a): multiple definition of `SAXPrintHandlers::error(
xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x26a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x39a): multiple definition of `non-virtual thunk to SAX
PrintHandlers::error(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x39a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x3a4): multiple definition of `SAXPrintHandlers::fatalE
rror(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3a4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x4d4): multiple definition of `non-virtual thunk to SAX
PrintHandlers::fatalError(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x4d4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x4de): multiple definition of `SAXPrintHandlers::warnin
g(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x4de): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x60e): multiple definition of `non-virtual thunk to SAX
PrintHandlers::warning(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x60e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x618): multiple definition of `SAXPrintHandlers::unpars
edEntityDecl(unsigned short const*, unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x618): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x61d): multiple definition of `non-virtual thunk to SAX
PrintHandlers::unparsedEntityDecl(unsigned short const*, unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x61d): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x624): multiple definition of `SAXPrintHandlers::notati
onDecl(unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x624): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x629): multiple definition of `non-virtual thunk to SAX
PrintHandlers::notationDecl(unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x629): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x630): multiple definition of `SAXPrintHandlers::charac
ters(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x630): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x666): multiple definition of `non-virtual thunk to SAX
PrintHandlers::characters(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x666): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x66e): multiple definition of `SAXPrintHandlers::endDoc
ument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x66e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x673): multiple definition of `non-virtual thunk to SAX
PrintHandlers::endDocument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x673): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x67a): multiple definition of `SAXPrintHandlers::endEle
ment(unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x67a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x6cd): multiple definition of `non-virtual thunk to SAX
PrintHandlers::endElement(unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6cd): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x6d4): multiple definition of `SAXPrintHandlers::ignora
bleWhitespace(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6d4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x70a): multiple definition of `non-virtual thunk to SAX
PrintHandlers::ignorableWhitespace(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x70a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x712): multiple definition of `SAXPrintHandlers::proces
singInstruction(unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x712): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7aa): multiple definition of `non-virtual thunk to SAX
PrintHandlers::processingInstruction(unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7aa): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7b4): multiple definition of `SAXPrintHandlers::startD
ocument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7b4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7b9): multiple definition of `non-virtual thunk to SAX
PrintHandlers::startDocument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7b9): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7c0): multiple definition of `SAXPrintHandlers::startE
lement(unsigned short const*, xercesc_3_1::AttributeList&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7c0): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x925): multiple definition of `non-virtual thunk to SAX
PrintHandlers::startElement(unsigned short const*, xercesc_3_1::AttributeList&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x925): first defined here
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x44): undefined reference to `_imp___ZN11xercesc_3_16XMLUni22fg
XercescDefaultLocaleE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x64): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatfo
rmUtils10InitializeEPKcS2_PNS_12PanicHandlerEPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x76): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatfo
rmUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0xd8): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatfo
rmUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x211): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x4b2): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x543): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x57a): undefined reference to `_imp___ZN11xercesc_3_17XMemorynw
Ej'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x583): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5a3): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
C1EPNS_12XMLValidatorEPNS_13MemoryManagerEPNS_14XMLGrammarPoolE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5c4): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
19setValidationSchemeENS0_10ValSchemesE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5e1): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
15setDoNamespacesEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5fe): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
11setDoSchemaEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x617): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
24setHandleMultipleImportsEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x634): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
31setValidationSchemaFullCheckingEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x6dc): undefined reference to `_imp___ZNK11xercesc_3_19SAXParse
r13getErrorCountEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x700): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x734): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x819): undefined reference to `_imp___ZN11xercesc_3_17XMemorydl
EPv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXC1EPKt[StrX::StrX(unsigned short const*)]+0x7): undefine
d reference to `_imp___ZN11xercesc_3_116XMLPlatformUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXC1EPKt[StrX::StrX(unsigned short const*)]+0x18): undefin
ed reference to `_imp___ZN11xercesc_3_19XMLString9transcodeEPKtPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXD1Ev[StrX::~StrX()]+0x7): undefined reference to `_imp__
_ZN11xercesc_3_116XMLPlatformUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXD1Ev[StrX::~StrX()]+0x18): undefined reference to `_imp_
__ZN11xercesc_3_19XMLString7releaseEPPcPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x52): undefined reference to `_imp___ZN11xercesc_3_116X
MLPlatformUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8e): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterC1EPKcS2_PNS_15XMLFormatTargetENS0_11EscapeFlagsENS0_10UnRepFlagsEPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xb6): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xc4): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xd6): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xea): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterD1Ev'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x160): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterD1Ev'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x192): undefined reference to `_imp___ZN11xercesc_3_17X
MemorydlEPv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x20a): undefined reference to `_imp___ZN11xercesc_3_17X
MemorydlEPv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x29a): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException15getColumnNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x2a9): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException13getLineNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x2b8): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException11getSystemIdEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3d4): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException15getColumnNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3e3): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException13getLineNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3f2): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException11getSystemIdEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x50e): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException15getColumnNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x51d): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException13getLineNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x52c): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException11getSystemIdEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x65e): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatter9formatBufEPKtmNS0_11EscapeFlagsENS0_10UnRepFlagsE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6a2): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6b3): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6c5): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x702): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatter9formatBufEPKtmNS0_11EscapeFlagsENS0_10UnRepFlagsE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x73a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x74b): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x769): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x77a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7a2): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7ea): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7fb): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x87a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x888): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x89a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8ac): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8ca): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8ec): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x918): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text$_ZN11xercesc_3_115DocumentHandlerC2Ev[xercesc_3_1::Docum
entHandler::DocumentHandler()]+0x4): undefined reference to `_imp___ZTVN11xercesc_3_115DocumentHandlerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text$_ZN11xercesc_3_115DocumentHandlerD2Ev[xercesc_3_1::Docum
entHandler::~DocumentHandler()]+0x7): undefined reference to `_imp___ZTVN11xercesc_3_115DocumentHandlerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text$_ZN11xercesc_3_115DocumentHandlerD1Ev[xercesc_3_1::Docum
entHandler::~DocumentHandler()]+0x7): undefined reference to `_imp___ZTVN11xercesc_3_115DocumentHandlerE'
etc.
Is there any chance to solve it quick? Thanks anyway!
don't put the .hpp files in the compiler command line. they are included automatically by the .cpp files.
g++ SAXPrint.cpp SAXPrintHandlers.cpp -o output
I solved my problem, it was simplier than I had imagined. All you need to do is use flag:
-lxerces-c
It worked out great, but thanks for trying, guys! I appreciate it :)