Как связаться против msvcr90.dll с mingw gcc? Я попробовал-lmsvcr90, вот минимальный пример:
#include <stdio.h>
int main(int argc, const char *argv[]) {
printf("%s\n", "hello");
return 0;
}
Моя ОС является win7 с mingw gcc 4.5.0
$ gcc -v
...
gcc version 4.5.0 (GCC)
$ gcc hello.c -lmsvcr90
$ a
Затем я получил эту ошибку:
R6034
An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.
Какую часть я пропускаю?
edit1:
@user440813 Кажется, что мой mingw очень отличается от Вашего.
$ gcc h.c -nostdlib -lmsvcr70 -lgcc -o h.exe
d:/mingw/bin/../lib/gcc/mingw32/4.5.0/libgcc.a(__main.o):(.text+0x5a): undefined reference to `atexit'
d:/mingw/bin/../lib/gcc/mingw32/4.5.0/libgcc.a(__main.o):(.text+0xc2): undefined reference to `atexit'
collect2: ld returned 1 exit status
Затем я дразнил int atexit ( void ( * function ) (void) ) {return 0;}
и получил R6034 снова...