Foros del Web » Programación para mayores de 30 ;) » C/C++ »

Problema Gcc En Dev

Estas en el tema de Problema Gcc En Dev en el foro de C/C++ en Foros del Web. Que tal compañeros: Les expongo mi problema: Desde hace ya tiempo programo en C++, y desde que descubrí el DEV cambie de borland a DEV. ...
  #1 (permalink)  
Antiguo 23/12/2010, 12:53
 
Fecha de Ingreso: julio-2008
Mensajes: 50
Antigüedad: 15 años, 8 meses
Puntos: 1
Problema Gcc En Dev

Que tal compañeros:

Les expongo mi problema:

Desde hace ya tiempo programo en C++, y desde que descubrí el DEV cambie de borland a DEV. Ahora actualicé el compilador y ya no compila nada. Las librerías no aparecen, ya las volví a copiar de otra PC pero sigue sin funcionar.

Espero que alguien me pueda ayudar.
Saludos.
  #2 (permalink)  
Antiguo 23/12/2010, 19:47
 
Fecha de Ingreso: abril-2010
Ubicación: Rosario
Mensajes: 1.850
Antigüedad: 14 años
Puntos: 228
Respuesta: Problema Gcc En Dev

A ver...compilaba en borland...luego pasaste a DEV c++ y segui compilando??

Por ultimo actualizaste el compilador....como hiciste eso??

Postea algun error para orientarnos...o borra todo y reinstalalo.
  #3 (permalink)  
Antiguo 24/12/2010, 00:59
 
Fecha de Ingreso: julio-2008
Mensajes: 50
Antigüedad: 15 años, 8 meses
Puntos: 1
Respuesta: Problema Gcc En Dev

De Borland a DEV y sigue compilando salvo algunas librerías que supuestamente son "Actualizaciones" del propio DEV, compilaba "bien". El problema es que al bajar la "actualizacion" del compilador a la 4.5 ya no compila nada de C++, es decir todas las funciones cout, cin, etc. son errores. Probé con un printf con la librería stdio y va bien. Al reinstalar compila nuevamente los cout, pero el problema es al actualizar el compilador.
  #4 (permalink)  
Antiguo 24/12/2010, 14:16
 
Fecha de Ingreso: diciembre-2010
Ubicación: valencia
Mensajes: 203
Antigüedad: 13 años, 4 meses
Puntos: 11
Respuesta: Problema Gcc En Dev

Dev c++ esta descontinuado, pasate a codeblocks por ejemplo. si pones el codigo mejor, pero seguro que estas haciendo los includes con *.h.
  #5 (permalink)  
Antiguo 24/12/2010, 16:31
 
Fecha de Ingreso: julio-2008
Mensajes: 50
Antigüedad: 15 años, 8 meses
Puntos: 1
Respuesta: Problema Gcc En Dev

de hecho el codigo es bien simple:

#include <iostream>
#include <cstdio>
using namespace std;

main(){
cout<<"Hola"<<endl;
system("PAUSE");

}

con algo tan simple y marca error.
  #6 (permalink)  
Antiguo 24/12/2010, 17:03
 
Fecha de Ingreso: diciembre-2010
Ubicación: valencia
Mensajes: 203
Antigüedad: 13 años, 4 meses
Puntos: 11
Respuesta: Problema Gcc En Dev

tendriamos las cosas mas claras si pones de primeras el codigo y los errores, caso contrario tenemos que adivinar. el caso uno no es, pues vamos por el segundo. cuando creaste el proyecto ¿seleccionaste c++ o c? .

Otra cosa, main no tiene que estar sin tipo y tiene que devolver un valor. y si ahora tampoco se te soluciona el problema pon los errores y terminaremos antes.
  #7 (permalink)  
Antiguo 25/12/2010, 13:35
 
Fecha de Ingreso: julio-2008
Mensajes: 50
Antigüedad: 15 años, 8 meses
Puntos: 1
Respuesta: Problema Gcc En Dev

Si el problema ya lo "resolví" agregando al compilador -enable-auto-import.

Ya compila el codigo que puse abajo. Los errores que obtenia auto-importing has been activated without, falta de librerias dll (libstdc++-6.dll y libgcc_s_dw2-1.dll)

Vaya problema, ahora con cualquier otro programa genera numerosos errores. Con la librería RAD para hacer interfaces y el siguiente codigo:

#include <radc++.h>

//create new form
Form Form1("Text event - RAD C++ Example");

//create new text box
TextBox text1("Type here", AUTO_ID, 10, 15, 200, 25, Form1);


//create new control procedure for form, procedure1 is procedure name
FormProcedure procedure1 (FormProcArgs) {

//capture event ON_CLOSE which is fired when form is closed, [X] is clicked
ON_CLOSE() {
//exit application
Application.close();
}
//capture text change event, means text hs been changed
ON_TEXT_CHANGED ( text1 ) {
Form1.caption = "Changed : " + text1.text;
}

//always return 0
return 0;
}

//rad c++ main program
rad_main()

//attach the created procedure with form
Form1.procedure = procedure1;

//set focus to textbox when program starts
text1.focus();

rad_end()

Genéra todos estos errores:

Cpp/lib/gcc/mingw32/4.5.0/include/c++/backward" -I"C:/Dev-Cpp/lib/gcc/mingw32/4.5.0/include/c++/mingw32" -w -W -Os -fno-exceptions -fno-rtti -enable-auto-import

In file included from main_program.cpp:1:0:
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h: In member function '__rproperty<Container, ValueType, nPropType>::operator ValueType()':
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:334:73: error: there are no arguments to 'sprintf' that depend on a template parameter, so a declaration of 'sprintf' must be available
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:334:73: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:334:100: error: there are no arguments to 'sprintf' that depend on a template parameter, so a declaration of 'sprintf' must be available
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h: In member function 'ValueType __rproperty<Container, ValueType, nPropType>::operator=(const ValueType&)':

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:338:73: error: there are no arguments to 'sprintf' that depend on a template parameter, so a declaration of 'sprintf' must be available
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:338:100: error: there are no arguments to 'sprintf' that depend on a template parameter, so a declaration of 'sprintf' must be available
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h: In member function '__rproperty<Container, ValueType, nPropType> __rproperty<Container, ValueType, nPropType>::operator=(const __rproperty<Container, ValueType, nPropType>&)':
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:339:79: error: there are no arguments to 'sprintf' that depend on a template parameter, so a declaration of 'sprintf' must be available
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:339:106: error: there are no arguments to 'sprintf' that depend on a template parameter, so a declaration of 'sprintf' must be available

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h: At global scope:
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:848:173: error: cannot call constructor '_window::_window' directly
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:848:173: error: for a function-style cast, remove the redundant '::_window'

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:850:179: error: cannot call constructor '_window::_window' directly
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:850:179: error: for a function-style cast, remove the redundant '::_window'

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:904:131: error: cannot call constructor 'Icon::Icon' directly

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:904:131: error: for a function-style cast, remove the redundant '::Icon'
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:905:135: error: cannot call constructor 'Icon::Icon' directly
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:905:135: error: for a function-style cast, remove the redundant '::Icon'

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:970:73: error: cannot call constructor 'Icon::Icon' directly

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:970:73: error: for a function-style cast, remove the redundant '::Icon'

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:972:78: error: cannot call constructor 'Icon::Icon' directly
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:972:78: error: for a function-style cast, remove the redundant '::Icon'
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:981:73: error: cannot call constructor 'Bmp::Bmp' directly
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:981:73: error: for a function-style cast, remove the redundant '::Bmp'
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:984:76: error: cannot call constructor 'Bmp::Bmp' directly
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:984:76: error: for a function-style cast, remove the redundant '::Bmp'

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:1783:173: error: cannot call constructor '_window::_window' directly

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:1783:173: error: for a function-style cast, remove the redundant '::_window'
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:1784:176: error: cannot call constructor '_window::_window' directly

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:1784:176: error: for a function-style cast, remove the redundant '::_window'

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h: In member function '__rproperty<Container, ValueType, nPropType>::operator ValueType() [with Container = _window, ValueType = String, int nPropType = 3]':
main_program.cpp:20:41: instantiated from here
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:334:73: error: 'sprintf' was not declared in this scope

c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:334:100: error: 'sprintf' was not declared in this scope
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h: In member function 'ValueType __rproperty<Container, ValueType, nPropType>::operator=(const ValueType&) [with Container = _window, ValueType = String, int nPropType = 3]':
main_program.cpp:20:41: instantiated from here
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:338:73: error: 'sprintf' was not declared in this scope
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:338:100: error: 'sprintf' was not declared in this scope
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h: In member function 'ValueType __rproperty<Container, ValueType, nPropType>::operator=(const ValueType&) [with Container = Form, ValueType = long int (*)(HWND__*, unsigned int, unsigned int, long int), int nPropType = 2]':
main_program.cpp:31:21: instantiated from here
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:338:73: error: 'sprintf' was not declared in this scope
c:\dev-cpp\bin\../lib/gcc/mingw32/4.5.0/../../../../include/radc++.h:338:100: error: 'sprintf' was not declared in this scope

Etiquetas: dev
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:11.