I can't compile the c program

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

I can't compile the c program

Prapan Chulapinyo

I learn c and used to compile number of program by

Gcc program.c -o program.exe

 

But now. I guess since I “Mark all upgrades” to the latest one. It not work.

 

c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread

collect2.exe: error: ld returned 1 exit status

 

#include <stdio.h>

 

int main(void)

{

                int a;

                a = 1;

                printf("test %d", a);

                return 0;

}

 

I’ve also try delete Mingw folder and install again number of time. Still this problem.

More than that when I use MinGW Installation Manager to mark install package , there is a message windows :

 

Internal package specification error can’t get ‘tarname’ for non-release element<<<unknown>>> please report this to the package maintainer.

 

I don’t know what cause this my guess it the problem come from the new version. Please help.

 

GCC version 5.3.0

Ld 2.25.1

MinGW 32bit

Windows 64bit

 

Ps. Do you need pictures of error message?

Prapan


------------------------------------------------------------------------------

_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: I can't compile the c program

Keith Marshall-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/09/16 05:25, Prapan Chulapinyo wrote:
> .../ld.exe: cannot find -lpthread collect2.exe: error: ld returned
> 1 exit status

This is due to a missing dependency for GCC-5.0.3, in its original
catalogue entry...

> I’ve also try delete Mingw folder and install again number of
> time. Still this problem. More than that when I use MinGW
> Installation Manager to mark install package , there is a message
> windows :
>
> Internal package specification error can’t get ‘tarname’ for
> non-release element<<<unknown>>> please report this to the package
> maintainer.

...and this was due to a typo, when adding it; it should now be fixed,
after you update your local copy of the catalogue.

> Ps. Do you need pictures of error message?

No thanks.  It may not be a particularly enlightening message, (and
the one which would have followed it is rather more revealing), but it
was sufficient to alert me to the probable cause.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXzUueAAoJEMCtNsY0flo/o0kP/jxWwDVpoqrdE5lR7kglQ/xK
e/vdw8LJqdoohyCsmAt4r8UXeRjPLtFsdtyX4rLZwlCAivNhkmHKhLYnKCQrrjj8
yMQ+8beF5HQ653IKHPpH0s0OAOju1TpdriYgtR4JuNxp/adqbsHNtRxgBy7WwdMq
UXL++5QBrHpj8MPuMrNGlQkdKLryCeL1GZx9xGTxVyC317YQL+FqPqxXghGmKiRv
0QTYF2fS0giDxhD/uWv0d5VTF7jXfzaMsAsxqTKIkL0V91M6MrtYtD4vMmmEZpDr
dPdN9VUTc06lJ7RqpKIzRp2zbVvL1Y7EsO/f3NGe0M3HYdhRPOOeKDm0+aqbpArL
AbZ/Ia9eA5+fsZuxhkbWEZTe3HPr+2U87mx28liZ71r2EVUK5fgTpkVcyKc1xDmU
BP/Y+xfVDXrfY2Yib2Km/wMkwZCDxVQnom9ba0lmLl9TNLG7s6OmiJUiZZeKkeGb
WolsPZhHdYInoFcRn9odz/7Epd6MJfNjR/vgSLe4Gs+0CGS2Jarh4/0VOWi3fwoe
uTTcK4+WFGfe04wGJKJmUSCcOmRRlhDXjnMC4SuQewzxYsRveSPM3kKoxiu3/W2+
G8C+aCw8/Obe1ZASZa8jRUkjQoKJhRbxBF4Tk5gGbtUBNSeX4nV6hIHyYfThmjN8
etmBlK5gxrrGcATwZc7+
=uSFW
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe