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

[SOLUCIONADO] problema al compilar programa c+gtk

Estas en el tema de problema al compilar programa c+gtk en el foro de C/C++ en Foros del Web. hola a todos. bueno pues hoy quise compilar un programa usado gtk en devcpp y codeblocks en los dos ya los pude compilar el problema ...
  #1 (permalink)  
Antiguo 17/04/2014, 19:11
Avatar de Drewermerc  
Fecha de Ingreso: febrero-2014
Mensajes: 185
Antigüedad: 10 años, 2 meses
Puntos: 5
Pregunta problema al compilar programa c+gtk

hola a todos.
bueno pues hoy quise compilar un programa usado gtk en devcpp y codeblocks en los dos ya los pude compilar el problema es que cuando se inicia el programa solo me dice esto.
con dev-cpp
--------------------------------
Process exited with return value 3221225781
Press any key to continue . . .

con code::blocks

Process returned -1073741515 (0xC0000135) execution time : 0.022 s
Press any key to continue.

y bueno no creo que sea algun error de sintaxis por que tambien compile un ejemplo de codeblock y me sale e mismo error y lo trate de analizar con debuger pero al correr el prograa sale lo mismo un error y no lo inicia.
aqui les dejo el codigo:
Código C:
Ver original
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <gtk/gtk.h>
  5.  
  6. #define ENTRADA 3
  7. #define TAMANIO 5
  8.  
  9. GtkWidget *pje_alumno, *pje_max, *e, *nota_max, *nota_aprob, *nota_min;
  10. GtkWidget *label_nota_final, *label_aprobacion;
  11.  
  12. void accion_boton();
  13. int main (int argc, char **argv)
  14. {
  15. GtkWidget *ventana, *descripcion[15], *layout, *boton;
  16. gtk_init_check(&argc, &argv);
  17.  
  18. ventana = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  19. g_signal_connect(ventana, "destroy", G_CALLBACK(gtk_main_quit), NULL);
  20. gtk_window_set_title(GTK_WINDOW(ventana), "Calculo de notas");
  21. gtk_container_set_border_width(GTK_CONTAINER(ventana), 0);
  22. gtk_window_set_default_size(GTK_WINDOW(ventana), 300, 350);
  23.  
  24.  
  25. layout = gtk_layout_new(NULL, NULL);
  26.  
  27.  
  28. descripcion[0] = gtk_label_new("Formulario de ingreso de datos");
  29. descripcion[1] = gtk_label_new("Puntaje obtenido por el alumno");
  30. descripcion[2] = gtk_label_new("putaje total de la prueba");
  31. descripcion[3] = gtk_label_new("escala de evaluacion");
  32. descripcion[4] = gtk_label_new("maxima");
  33. descripcion[5] = gtk_label_new("aprobacion");
  34. descripcion[6] = gtk_label_new("minima:");
  35. descripcion[7] = gtk_label_new("%");
  36. descripcion[8] = gtk_label_new("escala de notas:");
  37. descripcion[9] = gtk_label_new("nta obtenida:");
  38. descripcion[10] = gtk_label_new("");
  39.  
  40. label_aprobacion = gtk_label_new("estado de probacion");
  41.  
  42.  
  43. pje_alumno = gtk_entry_new();
  44. pje_max = gtk_entry_new();
  45. e = gtk_entry_new();
  46. nota_max = gtk_entry_new();
  47. nota_aprob = gtk_entry_new();
  48. nota_min = gtk_entry_new();
  49. label_nota_final = gtk_entry_new();
  50.  
  51.  
  52. gtk_entry_set_max_length(GTK_ENTRY(pje_alumno), ENTRADA);
  53. gtk_entry_set_max_length(GTK_ENTRY(pje_max), ENTRADA);
  54. gtk_entry_set_max_length(GTK_ENTRY(e), 2);
  55. gtk_entry_set_max_length(GTK_ENTRY(nota_max), ENTRADA);
  56. gtk_entry_set_max_length(GTK_ENTRY(nota_aprob), ENTRADA);
  57. gtk_entry_set_max_length(GTK_ENTRY(nota_min), ENTRADA);
  58. gtk_entry_set_max_length(GTK_ENTRY(label_nota_final), 7);
  59.  
  60.  
  61. gtk_entry_set_width_chars(GTK_ENTRY(pje_alumno), TAMANIO);
  62. gtk_entry_set_width_chars(GTK_ENTRY(pje_max), TAMANIO);
  63. gtk_entry_set_width_chars(GTK_ENTRY(e), TAMANIO);
  64. gtk_entry_set_width_chars(GTK_ENTRY(nota_max), TAMANIO);
  65. gtk_entry_set_width_chars(GTK_ENTRY(nota_aprob), TAMANIO);
  66. gtk_entry_set_width_chars(GTK_ENTRY(nota_min), TAMANIO);
  67. gtk_entry_set_width_chars(GTK_ENTRY(label_nota_final), 7);
  68.  
  69.  
  70. boton = gtk_button_new_with_label("calcular");
  71. g_signal_connect(boton, "clicked", G_CALLBACK(accion_boton), NULL);
  72.  
  73.  
  74. gtk_layout_put(GTK_LAYOUT(layout), descripcion[0], 10, 10);
  75. gtk_layout_put(GTK_LAYOUT(layout), descripcion[1], 10, 50 );
  76. gtk_layout_put(GTK_LAYOUT(layout), descripcion[2], 10, 90);
  77. gtk_layout_put(GTK_LAYOUT(layout), descripcion[3], 10, 130);
  78. gtk_layout_put(GTK_LAYOUT(layout), descripcion[4], 10, 220);
  79. gtk_layout_put(GTK_LAYOUT(layout), descripcion[5], 80, 223);
  80. gtk_layout_put(GTK_LAYOUT(layout), descripcion[6], 150, 220);
  81. gtk_layout_put(GTK_LAYOUT(layout), descripcion[7], 250, 135);
  82. gtk_layout_put(GTK_LAYOUT(layout), descripcion[8], 10, 180);
  83. gtk_layout_put(GTK_LAYOUT(layout), descripcion[9], 150, 280);
  84. gtk_layout_put(GTK_LAYOUT(layout), descripcion[10], 150, 280);
  85.  
  86.  
  87. gtk_layout_put(GTK_LAYOUT(layout), pje_alumno, 180, 50);
  88. gtk_layout_put(GTK_LAYOUT(layout), pje_max, 180, 50);
  89. gtk_layout_put(GTK_LAYOUT(layout), e, 180, 30);
  90. gtk_layout_put(GTK_LAYOUT(layout), nota_max, 10, 140);
  91. gtk_layout_put(GTK_LAYOUT(layout), nota_aprob, 80, 240);
  92. gtk_layout_put(GTK_LAYOUT(layout), nota_min, 150, 240);
  93. gtk_layout_put(GTK_LAYOUT(layout), label_nota_final, 150, 240);
  94. gtk_layout_put(GTK_LAYOUT(layout), label_aprobacion, 155, 310);
  95.  
  96. gtk_layout_put(GTK_LAYOUT(layout), boton, 10, 300);
  97.  
  98. gtk_container_add(GTK_CONTAINER(ventana), layout);
  99. gtk_widget_show_all(ventana);
  100. gtk_main();
  101. return 0;
  102. }
  103.  
  104. void accion_boton()
  105. {
  106. gtk_main_quit();
  107. }
bueno espero que me puedan ayudar.

Última edición por Drewermerc; 17/04/2014 a las 19:24
  #2 (permalink)  
Antiguo 17/04/2014, 19:46
Avatar de Drewermerc  
Fecha de Ingreso: febrero-2014
Mensajes: 185
Antigüedad: 10 años, 2 meses
Puntos: 5
Respuesta: problema al compilar programa c+gtk

bueno ya encontre la solucion.

Etiquetas: compilar, programa
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 20:21.