problema con proyecto

criztian
23 de Septiembre del 2008
Yo ya programe en c++ y estoy empezando con el builder. El problema es que cuando quiero crear un proyecto en el builder, por ejemplo con algunos hechos en c++ que incluyen clases, me tira tres errores de LINKER ERROR uno de ellos .obj.
Lo hago en un console wizard, y ya probe dejando solo el principal y sacar en unit, y copiando el codigo del principal al unit. Ya probe todo. Los programas que no usan clases andan bien, y tambien algunos ya hechos.
POR FAVOR SI PUEDEN AYUDARME

mfi
23 de Septiembre del 2008
Ayudaria si pusieras exactamente q errores te da al Linkar

criztian
23 de Septiembre del 2008
Cuando saco el Unit y compilo el cpp principal me tira estos errores:
[Linker Error] Unresolved external '__InitVCL' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6LIBCP32MTI.LIB|crtlvcl
[Linker Error] Unresolved external '__ExitVCL' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6LIBCP32MTI.LIB|crtlvcl
[Linker Error] Unresolved external '_main' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6LIBC0X32.OBJ
Cuando el principal lo copio al Unit y compilo me tira:
[Linker Error] Unresolved external 'Lista<NodoGrafo<int, int> >::~Lista<NodoGrafo<int, int> >()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::~Lista<int>()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Grafo<int, int>::Grafo<int, int>()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::Lista<int>()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Grafo<int, int>::agregarVertice(int *)' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Grafo<int, int>::agregarArco(int *, int *, int *)' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::agregar(int *)' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::tamanio()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Grafo<int, int>::adyacentes(int *)' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::primero()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::pertenece(int *)' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::siguiente()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
[Linker Error] Unresolved external 'Lista<int>::eliminar_primer_nodo()' referenced from C:ARCHIVOS DE PROGRAMABORLANDCBUILDER6PROJECTSUNIT1.OBJ
Yo supongo que me debe faltar agregarle algo al codigo de los .cpp y .h de las clases, algo que no se agrega en el c++, porque los programas que no incluyen clases me andan bien.
Al principal le agrego esto:
#include <clx.h>
#pragma hdrstop
No se para que es pero me fije en otros programas que lo agregan siempre.

LOGAN
23 de Septiembre del 2008
En un console wizard debes escibir:

#pragma hdrstop
#include <condefs.h>

#include (Los .h que quieras incluir recordadndo que los s铆mbolos <> son las librerias propias del sistema; y entre " " las que hayas creado t煤 mismo)
//---------------------------------------------------------------------------
//declaraci贸n de funciones y procedimientos que uses (tan //s贸lo la declaraci贸n)
#pragma argsused
int main(int argc, char* argv[])
{
//tu programa en s铆

return 0; // para salir
}
el c贸digo de las funciones y procedimientos

Espero que te ayude esto.
En caso negativo especifica un poco m谩s diciendo qu茅 quieres hacer y c贸mo lo haces (pq con el chorro de errores que has puesto cualquiera se entera. Yo por lo menos no)
Suerte

OpP
23 de Septiembre del 2008
Te puede servir esta pagina:

http://www.codepedia.com/wiki/printer.aspx?WikiID=1&p=CppBuilderLinkingErrors