Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#309 gmtime could not be located in msvcr80.dll

open
nobody
None
5
2012-07-06
2012-07-06
SephiRok
No

a.cpp:
#include <time.h>
int main(int argc, char* argv[]) {
time_t y = 0;
struct tm* x = gmtime(&y);
return 0;
}

a.manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<file name="msvcr80.dll" hash="9fd3a7f0522d36c2bf0e64fc510c6eea3603b564"
hashalg="SHA1"/>
</assembly>

a.rc:
1 24 "a.manifest"

> windres -i a.rc -o a.res --output-format=coff
> g++ a.cpp a.res -o a.exe
> a.exe
The procedure entry point gmtime could not be located in the dynamic link library msvcr80.dll.

msvcr80.dll version 8.0.50727.762

> g++ -v
Reading specs from d:/platforms/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.5.4/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=d:/platforms/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.5.4/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../gcc45-svn/configure --host=i686-w64-mingw32 --target=i686-w64-mingw32 --disable-multi
fix=/mingw32 --with-sysroot=/mingw32 --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --enable-
mpfr=/mingw32 --with-mpc=/mingw32 --disable-nls --disable-win32-registry
Thread model: win32
gcc version 4.5.4 20111030 (prerelease) [svn/rev.180676 - mingw-w64/oz] (GCC)

specs:
*msvcrt:
msvcr80

*msvcrt_version:
-D__MSVCRT_VERSION__=0x0800

*asm:
%{v:-v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} %{m32:--32} %{m64:--64}

*asm_debug:
%{!g0:%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}} %{fdebug-prefix-map=*:--debug-prefix-map %*}

*asm_final:

*asm_options:
%{--target-help:%:print-asm-header()} %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}

*invoke_as:
%{!fwpa: %{fcompare-debug=*|fdump-final-insns=*:%:compare-debug-dump-opt()} %{!S:-o %|.s |
as %(asm_options) %m.s %A } }

*cpp:
%(msvcrt_version) %{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} %{municode:-DUNICODE}

*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*} %{undef} %{save-temps*:-fpch-preprocess}

*cpp_debug_options:
%{d*}

*cpp_unique_options:
%{C|CC:%{!E:%eGCC does not support -C or -CC without -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}} %{remap} %{g3|ggdb3|gstabs3|gcoff3|gxcoff3|gvms3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{fmudflap:-D_MUDFLAP -include mf-runtime.h} %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h} %{E|M|MM:%W{o*}}

*trad_capable_cpp:
cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}

*cc1:
%(cc1_cpu)

*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{a*} %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} %{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{--help=*:--help=%(VALUE)} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants} %{coverage:-fprofile-arcs -ftest-coverage}

*cc1plus:

*link_gcc_c_sequence:
%G %L %G

*link_ssp:
%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}

*endfile:
%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} crtend.o%s

*link:
%{m64:-m i386pep} %{!m64:-m i386pe} %{mwindows:--subsystem windows} %{mconsole:--subsystem console} %{shared: %{mdll: %eshared and mdll are not compatible}} %{shared: --shared} %{mdll:--dll} %{static:-Bstatic} %{!static:-Bdynamic} %{shared|mdll: %{m64:-e DllMainCRTStartup} %{!m64:-e _DllMainCRTStartup@12} --enable-auto-image-base} %(shared_libgcc_undefs)

*lib:
%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} -ladvapi32 -lshell32 -luser32 -lkernel32

*mfwrap:
%{static: %{fmudflap|fmudflapth: --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc --wrap=mmap --wrap=munmap --wrap=alloca} %{fmudflapth: --wrap=pthread_create}} %{fmudflap|fmudflapth: --wrap=main}

*mflib:
%{fmudflap|fmudflapth: -export-dynamic}

*link_gomp:

*libgcc:
%{mthreads:-lmingwthrd} -lmingw32 %{shared-libgcc:-lgcc_s} %{!shared-libgcc:-lgcc_eh} -lgcc -lmoldname -lmingwex -l%(msvcrt)

*startfile:
%{shared|mdll:dllcrt2%O%s} %{!shared:%{!mdll:%{!municode:crt2%O%s}}} %{!shared:%{!mdll:%{municode:crt2u%O%s}}} %{pg:gcrt2%O%s} crtbegin.o%s

*switches_need_spaces:
o

*cross_compile:
0

*version:
4.5.4

*multilib:
. !m64 !m32;.:../lib64 m64 !m32;.:../lib32 !m64 m32;

*multilib_defaults:
m32

*multilib_extra:

*multilib_matches:
m64 m64;m32 m32;

*multilib_exclusions:

*multilib_options:
m64/m32

*linker:
collect2

*linker_plugin_file:

*lto_wrapper:

*lto_gcc:

*lto_libgcc:

*link_libgcc:
%D

*md_exec_prefix:

*md_startfile_prefix:

*md_startfile_prefix_1:

*startfile_prefix_spec:

*sysroot_spec:
--sysroot=%R

*sysroot_suffix_spec:

*sysroot_hdrs_suffix_spec:

*cc1_cpu:
%{mcpu=*:-mtune=%* %n`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
} %<mcpu=* %{mintel-syntax:-masm=intel %n`-mintel-syntax' is deprecated. Use `-masm=intel' instead.
} %{msse5:-mavx %n'-msse5' was removed.
} %{mno-intel-syntax:-masm=att %n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.
}%{march=native:%<march=native %:local_cpu_detect(arch) %{!mtune=*:%<mtune=native %:local_cpu_detect(tune)}} %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}

*shared_libgcc_undefs:

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %{fuse-linker-plugin: -plugin %(linker_plugin_file) -plugin-opt=%(lto_wrapper) -plugin-opt=%(lto_gcc) %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} %{static:-plugin-opt=-pass-through=-lc} %{O*:-plugin-opt=-O%*} %{w:-plugin-opt=-w} %{f*:-plugin-opt=-f%*} %{m*:-plugin-opt=-m%*} %{v:-plugin-opt=-v} } %{flto} %{fwhopr} %l %{pie:-pie} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(mfwrap) %(link_libgcc) %o %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib) %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}

Discussion

  • SephiRok
    SephiRok
    2012-07-06

    Using gcc version 4.7.1 (rubenvb-4.7.1), w64 v2, and linking with -lmsvcr80 produces the same runtime error.

    Linking with -lmsvcr90 or -lmsvcr100 produces a link error:
    d:/platforms/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.7.1/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-tlssup.o)
    : In function `_dyn_tls_init@12':
    /home/ruben/mingw-w64/toolchain/src/mingw-w64/tags/v2.0.3/mingw-w64-crt/crt/tlssup.c:98: undefined reference to `_imp___winmajor'
    d:/platforms/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.7.1/../../../../i686-w64-mingw32/lib/../lib/libmingwex.a(lib32_libmingwex_a-_gmtime32
    .o): In function `gmtime32':
    /home/ruben/mingw-w64/toolchain/src/mingw-w64/tags/v2.0.3/mingw-w64-crt/misc/_gmtime32.c:10: undefined reference to `_imp__gmtime'
    collect2.exe: error: ld returned 1 exit status