Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#24133 - [mingw32] mingw32-ld does not link properly
Attached to Project:
Community Packages
Opened by Strephil (strephil) - Friday, 06 May 2011, 21:17 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Sunday, 21 August 2011, 13:53 GMT
Opened by Strephil (strephil) - Friday, 06 May 2011, 21:17 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Sunday, 21 August 2011, 13:53 GMT
|
DetailsDescription:
My small program uses WinAPI SetSuspendState function. I have #include <powrprof.h> and try to build: $ i486-mingw32-gcc -l powrprof win_main.c -L /usr/i486-mingw32/lib -Wall -L /usr/i486-mingw32/lib/ /tmp/ccug5T9D.o:win_main.c:(.text+0x2f1): undefined reference to `_SetSuspendState@12' collect2: ld returned 1 exit status In Debian Squeeze all is OK. Additional info: $ pacman -Q mingw32-gcc mingw32-binutils mingw32-w32api mingw32-gcc 4.5.2-3 mingw32-binutils 2.21-1 mingw32-w32api 3.16-1 |
This task depends upon
Closed by Rémy Oudompheng (remyoudompheng)
Sunday, 21 August 2011, 13:53 GMT
Reason for closing: Not a bug
Additional comments about closing: User did not use proper compilation arguments
Sunday, 21 August 2011, 13:53 GMT
Reason for closing: Not a bug
Additional comments about closing: User did not use proper compilation arguments
$ cat q.c
#include <windows.h>
#include <powrprof.h>
int main()
{
SetSuspendState(0,0,0);
return 0;
}
$ i486-mingw32-gcc q.c -lpowrprof
$ ls -l a.exe
-rwxr-xr-x 1 sergej sergej 22178 Май 7 02:52 a.exe
$ cat q.c
#include <windows.h>
#include <powrprof.h>
int main()
{
SetSuspendState(0,0,0);
return 0;
}
$ i486-mingw32-gcc -lpowrprof q.c
/tmp/ccEsWoQ4.o:q.c:(.text+0x2e): undefined reference to `_SetSuspendState@12'
collect2: ld returned 1 exit status
$ i486-mingw32-gcc q.c -lpowrprof
$ ls a.exe
a.exe
Is it bug or feature?
shows that i486-mingw32-gcc also uses /usr/lib/gcc/i486-mingw32/4.5.2/collect2, but it does not work properly.