• Lunes 29 de Abril de 2024, 07:08

Autor Tema:  C Compiler: Cc -lpthread Pthread1.c  (Leído 1044 veces)

AnioN

  • Miembro MUY activo
  • ***
  • Mensajes: 339
    • Ver Perfil
C Compiler: Cc -lpthread Pthread1.c
« en: Domingo 8 de Abril de 2007, 23:42 »
0
Hola, no entiendo muy bien que hace "C compiler: cc -lpthread  pthread1.c", cuando se usa el parametro -l

su -

  • Moderador
  • ******
  • Mensajes: 2349
    • Ver Perfil
Re: C Compiler: Cc -lpthread Pthread1.c
« Respuesta #1 en: Lunes 9 de Abril de 2007, 00:04 »
0
rtfm.  :P

Citar
-l library
Search the library named library when linking. (The second alternative with the library as separate argument is only for POSIX compliance and is not recommended.)

It makes a difference where in the command you write option; te linker searches and process libraries and object files in the oreder they are specified....
Esta como en la linea 5683 del manual de GCC (man gcc).
 :hola:
*******PELIGRO LEE ESTO!!*******

There is no place like 127.0.0.1

Conecto luego existo, no conecto luego insisto.

AnioN

  • Miembro MUY activo
  • ***
  • Mensajes: 339
    • Ver Perfil
Re: C Compiler: Cc -lpthread Pthread1.c
« Respuesta #2 en: Lunes 9 de Abril de 2007, 00:47 »
0
claro, pero no siempre se usa. En este caso porque estoy haciendo una aplicacion multitreads. Cuando tengo que especificar la libreria que se tiene que usar?

su -

  • Moderador
  • ******
  • Mensajes: 2349
    • Ver Perfil
Re: C Compiler: Cc -lpthread Pthread1.c
« Respuesta #3 en: Lunes 9 de Abril de 2007, 01:19 »
0
Yo siempre lo he visto asi... cuando se una una libreria siempre hay que decirle que la busque (ejm. gtk, X11...)

Aunque realmente no me preocupo por eso.
*******PELIGRO LEE ESTO!!*******

There is no place like 127.0.0.1

Conecto luego existo, no conecto luego insisto.