Armadillo with MinGW g ++ executable on Windows 7

If I try to compile the code

  #include "armadillo"

  int main(int argc, char *argv[]) {
  }

      

using MinGW g ++ and the latest armadillo (3.6.1), it works fine on my Windows XP, but if I compile it and run it on windows 7, I get: "The problem caused the program to stop working correctly."

What could be causing this?

I've tried with both 4.6.2 and 4.7.2 (g ++ -v from the most recent ones included below):

Using built-in specifications. COLLECT_GCC = g ++ COLLECT_LTO_WRAPPER = c: / mingw / bin /../ libexec / gcc / mingw32 / 4.7.2 / lto-wrapper.exe Target: mingw32 Configurable with: ../ gcc-4.7.2 / configure --enable -languages ​​= c, C ++, ada, fortran, obj c, obj-C ++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo mp --disable- win32-registry --enable-libstdcxx-debug --disable-build-poststage1- c-cxx --enable-version-specific-runtime-libs --build = mingw32 --prefix = / mingw Theme model: win32 gcc version 4.7 .2 (GCC)

Note that at this point I am not even linking any library like LAPACK. I also tried uncommenting

// # define ARMA_USE_LAPACK

in config.cpp but no effect. By the way, I can compile c code without armadillo without issue on both systems. It is only the addition of an armadillo that causes problems.

Update: if I press ctrl-c I get:

forrtl: error (200): program interruption due to a control-C event Image
Source of normal wire line lapack_win32_MT.d 103A49EA Unknown Unknown Unknown Unknown lapack_win32_MT.d 1034CD0E Unknown Unknown Unknown Unknown lapack_win32 kernel_MT.d 1035B254 Unknown Unknown Unknown
75 Unknown Unknown Unknown 75 Unknown Unknown .dll
75513677 Unknown Unknown Unknown ntdll.dll
77DFC002 Unknown Unknown Unknown ntdll.dll
77DFBFD5 Unknown Unknown Unknown

Update: On another Windows 7 system I manage to execute, but at compile time I get the following message (when compiling example2.cpp in the armadillo package):

Info: resolving vtable for std::exception by linking to __imp___ZTVSt9exception (auto-import)
Info: resolving vtable for std::bad_alloc by linking to __imp___ZTVSt9bad_alloc (auto-import)
Info: resolving std::cout  by linking to __imp___ZSt4cout (auto-import)
Info: resolving std::nothrow  by linking to __imp___ZSt7nothrow (auto-import)
Info: resolving vtable for __cxxabiv1::__si_class_type_info by linking to __imp___ZTVN10__cxxabiv120__si_class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__class_type_info by linking to __imp___ZTVN10__cxxabiv117__class_type_infoE (auto-import)
c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.

      

Thank.

+3


source to share





All Articles