Linker en C/C++

2 respuestas [Último envío]
Imagen de claydergc
Usuario Desconectado. Visto por última vez 9 semanas 21 horas. Desconectado
Integró: 19/11/2007
Puntos: 71

Hola:

Como que no tengo mucha experiencia en C/C++ y ahora que estoy trabajando con otro IDE, veo en las opciones de proyectos opciones para agregar rutas al "linker". No tengo muy bien definido este termino, ¿alguien me puede brindar informacion detallada sobre para que sirve esto?

En si, lo que quiero usar una libreria para C++ y me gustaria saber que es lo que se tiene que hacer para poder usar sus funciones, con y sin el ide en el que estoy programando, ya que hasta ahora las librerias adicionales que uso las instalo directamente desde el administrador de paquetes del IDE. Por ejemplo en java solo tengo q fijar el classpath del jar y puedo jalar todas las clases, en C++ supongo que es algo parecido. ¿Cuales serian esos pasos(independientemente del IDE y sistema operativo que este usando)?

Sin votos aún

Clayder Gonzalez Cadenillas

Usuario Desconectado. Visto por última vez 13 horas 12 mins. Desconectado
Integró: 21/11/2007
Puntos: 86
proceso LP y ejemplo Code::Blocks

Hola Clayder, segun un proceso de LP, el programa fuente pasa a un programa objeto un compilado si errores, despues ese programa objeto se enlaza con las funciones q llama el programa para lo cual carga su codigo de sus librerias, con esto ya tenemos un ejecutable.

Ahora bien cuando usamos funciones de librerias no standar (generalmente comerciales) , tendremos que especificarle una ruta al compilador donde se encuentran el directorio de sus librerias y directorio del linker asi también espeficar su linker.

Con respecto a los IDE's tienes que agregar en cada proyecto que no tenga librerias estandar del C/C++ ; la ruta de las librerias asi como su respectivo linker. Por ejemplo si deseas hacer un proyecto en CodeBlocks usando librerias de OpenCV :

paso 1paso 1
paso 2paso 2
paso 3paso 3

Usuario Desconectado. Visto por última vez 1 semana 4 días. Desconectado
Integró: 01/03/2010
Puntos: 5
Linker en C/C++

The C++ language provides mechanisms for mixing code that is compiled by compatible C and C++ compilers in the same program. You can experience varying degrees of success as you port such code to different platforms and compilers. This article shows how to solve common problems that arise when you mix C and C++ code, and highlights the areas where you might run into portability issues. In all cases we show what is needed when using Sun C and C++ compilers.The first requirement for mixing code is that the C and C++ compilers you are using must be compatible. They must, for example, define basic types such as int, float or pointer in the same way. The Solaris Operating System (Solaris OS) specifies the Application Binary Interface (ABI) of C programs, which includes information about basic types and how functions are called. Any useful compiler for the Solaris OS must follow this ABI.Sun C and C++ compilers follow the Solaris OS ABI and are compatible. Third-party C compilers for the Solaris OS usually also follow the ABI. Any C compiler that is compatible with the Sun C compiler is also compatible with the Sun C++ compiler.The C runtime library used by your C compiler must also be compatible with the C++ compiler. C++ includes the standard C runtime library as a subset, with a few differences. If the C++ compiler provides its own versions of of the C headers, the versions of those headers used by the C compiler must be compatible. And my next topic is

===================
mcts dumps

Distribuir contenido