elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Temas
Páginas: [1]
1  Programación / Programación C/C++ / [C++] Error LNK2019 (Windows - Visual Express) en: 6 Septiembre 2012, 14:39 pm
Buenos dias,

El martes me dieron el codigo en C++ (creo que del 2004) de un programe de stereovision para que cambie algunas cosas, yo no conozco mucho de C++ pero ya he encontrado lo que tengo que cambiar y como cambiar,
el problema es que no compila (no lo he modificado aun)
al principio tenia unos errores como que faltaban unos documentos (como afxwin.h) pero esto ya lo arregle con MFC.

Ahora me sale otro error pero no entiendo porque, de lo que busque puede ser un error de template o de linkage pero no tengo ni idea.

Ahi dejo el error que me deja visual express :

Código:
error LNK2019: simbolo externo no resuelto "void __stdcall
AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
al que se hace referencia en la función "public: void __thiscall CArray<class
C3dPoint<double,int,struct tagRGBQUAD> *,class C3dPoint<double,int,struct
tagRGBQUAD> *>::SetSize(int,int)"
(?SetSize@?$CArray@PAV?$C3dPoint@NHUtagRGBQUAD@@@@PAV1@@@QAEXHH@Z)

pgrmfcd.lib

triclopsDemo


y ahi el codigo en donde de lo que entendi esta el error :
Código:
#ifndef __3DPOINT_H__
#define __3DPOINT_H__

#pragma once

//=============================================================================
// System Includes
//=============================================================================
#include <windows.h>  // for RGBQUAD
#include <cassert>

//=============================================================================
// PGR Includes
//=============================================================================

//=============================================================================
// Project Includes
//=============================================================================

/**
 * This class represents a 3d point in space.  It also keeps track of the
 * original row and column this point was generated from, so it's useful for
 * Triclops applications.
 */
template<class COORD_TYPE, class RC_TYPE, class COLOUR_TYPE>
class C3dPoint
{

public:

   C3dPoint()
   {
      m_x      = 0;
      m_y      = 0;
      m_z      = 0;
      m_col    = 0;
      m_row    = 0;     
      ::memset( &m_colour, 0x0, sizeof( COLOUR_TYPE ) );
   };
   
   C3dPoint(
      COORD_TYPE     x,
      COORD_TYPE     y,
      COORD_TYPE     z,
      RC_TYPE        column,
      RC_TYPE        row,
      COLOUR_TYPE    colour )
   {
      m_x      = x;
      m_y      = y;
      m_z      = z;
      m_col    = col;
      m_row    = row;
      m_colour = colour;   
   };


   C3dPoint( COORD_TYPE x, COORD_TYPE y, COORD_TYPE z )
   {
      m_x      = x;
      m_y      = y;
      m_z      = z;
      m_col    = -1;
      m_row    = -1;     
      ::memset( &m_colour, 0x0, sizeof( COLOUR_TYPE ) );
   };


   C3dPoint( const C3dPoint& point )
   {
      m_x      = point.x;
      m_y      = point.y;
      m_z      = point.z;
      m_col    = point.col;
      m_row    = point.row;
      m_colour = point.colour;   
   };


   virtual ~C3dPoint()
   {
   };


   COORD_TYPE x() const
   {
      return m_x;
   };


   COORD_TYPE y() const
   {
      return m_y;
   };


   COORD_TYPE z() const
   {
      return m_z;
   };


   void getXYZ( COORD_TYPE* px, COORD_TYPE* py, COORD_TYPE* pz ) const
   {
      assert( px != NULL && py != NULL && pz != NULL );
      *px = m_x;
      *py = m_y;
      *pz = m_z;
   };


   void setXYZ( COORD_TYPE x, COORD_TYPE y, COORD_TYPE z )
   {
      m_x = x;
      m_y = y;
      m_z = z;     
   };


   RC_TYPE col() const
   {
      return m_col;
   };


   RC_TYPE row() const
   {
      return m_row;
   };


   void getColRow( RC_TYPE* pcol, RC_TYPE* prow ) const
   {
      assert( pcol != NULL && prow != NULL );
      *pcol = m_col;
      *prow = m_row;
   };


   void setColRow( RC_TYPE col, RC_TYPE row )
   {
      m_col = col;
      m_row = row;
   };


   const COLOUR_TYPE* colour() const
   {
      return &m_colour;
   };


   COLOUR_TYPE* colour()
   {
      return &m_colour;
   };


   void setColour( COLOUR_TYPE* pcolour )
   {
      m_colour = *pcolour;
   };
   

protected:

   COORD_TYPE  m_x;
   COORD_TYPE  m_y;
   COORD_TYPE  m_z;

   RC_TYPE     m_col;
   RC_TYPE     m_row;

   COLOUR_TYPE m_colour;

};


/**
 * C3dColourPointRC uses doubles and an RGBQUAD for colour.
 */
typedef C3dPoint< double, int, RGBQUAD > C3dColourPointRC;

/**
 * C3dColourPointRCF uses floats.
 */
typedef C3dPoint< float, int, RGBQUAD > C3dColourPointRCF;

#endif // #ifndef __3DPOINT_H__


Gracias de antemano.
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines