Foro de elhacker.net

Programación => Programación C/C++ => Mensaje iniciado por: Drewermerc en 18 Abril 2014, 03:16 am



Título: probelma al compilar c+gtk
Publicado por: Drewermerc en 18 Abril 2014, 03:16 am
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.
bueno espero que me puedan ayudar.


Título: Re: probelma al compilar c+gtk
Publicado por: ivancea96 en 18 Abril 2014, 03:23 am
Si pudieras poner el código, ayudaría un poco jeje


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


Título: Re: probelma al compilar c+gtk
Publicado por: ivancea96 en 18 Abril 2014, 03:29 am
El problema solo lo tienes con este código, o con más?

Me llevará un ratito verlo, ya que no tengo GTK instalado jeje


Título: Re: probelma al compilar c+gtk
Publicado por: Drewermerc en 18 Abril 2014, 03:30 am
si es con cualquier tipo de codigo gtk.
y en cualquiera d elos dos editores me da error y es que nose por que si anterior mente ya haba compilado con codeblocks pero ahorita ya no quiero y  lo intente con devcpp pero tabien me da ese error.
y es que no me dice de ningun error lo compila bien ni siquiera un warning.


Título: Re: probelma al compilar c+gtk
Publicado por: ivancea96 en 18 Abril 2014, 03:41 am
Googleando el error, vi esto: Link (http://stackoverflow.com/questions/10067499/gtk-gcc-crashing-on-start)

Resumen:
Citar
exception code 0xc0000135

That is STATUS_DLL_NOT_FOUND. Gtk+ has a large number of dependent DLLs. Probably your best bet to get started is to use the all-in-one bundle and copy the entire content of the bin directory in the archive to your program's EXE directory. Crude but the docs are quite unapologetic about it.

Bueno no se si es tu problema, pero puedes probar.

En caso de que no sea, puedes seguir buscando por Google. Yo puse "0xC0000135 gtk" :p


Título: Re: probelma al compilar c+gtk
Publicado por: Drewermerc en 18 Abril 2014, 03:45 am
bueno es que eso ya lo intente pero no se ejecuta.


Título: Re: probelma al compilar c+gtk
Publicado por: Drewermerc en 18 Abril 2014, 03:59 am
hola ivancea96.
bueno ya lo solucone a fue un descuido mio. :xD
es que lo estaba compilado con gtk+ 3.0 y yo usaba dll de  gtk+ 2.0 por eso no se ejecutaba y bueno muchas gracias por tu ayuda.
bueno nose si me puedas ayudar en esto.
bueno quisiera que todas las libreria se incluyeran en el .exe nose si sepas como hacer eso.


Título: Re: probelma al compilar c+gtk
Publicado por: ivancea96 en 18 Abril 2014, 13:06 pm
Eso ya, no se.

Si tal, abre otro tema en Programación General, o en Dudas generales.


Título: Re: probelma al compilar c+gtk
Publicado por: Drewermerc en 19 Abril 2014, 03:27 am
hola gracias. ahorita lo creare.
saludos.  :D