jerryd/gtk-fortran — Issue #38: Trouble compiling hl tests on windows
Author: Nukem78
Created: 2011-12-22 14:53:24+00:00
State: open

Hello,

I am having trouble compiling the hl test problems on a windows 32 bit machine. I'm using gfortran version 4.7 and i took the gtk libraries from the windows bundle I downloaded (gtk+-bundle_2.24.8-20111122_win32).

I was able to successfully compile the non hl tests (although originally didn't get this to work for two reasons. First I had to copy the cairo-auto.o to cairo.o and then I had to compile the hl source files before the first compilation line in the test script due to a dependency of one of the files to gtk_hl_container.mod. After that they compiled fine and all run successfully but gtkbuilder2 (runs but cannot fine signal handlers, which I think is addressed somewhere here and I can fix) and cairo-tests which segfaults (which has been noted before I believe))

For the hl tests, when compiling, I get for the first compilation (others similarly):

D:\opt\Cygwin\home\mtw125\gtkfortran_test\test1\newHLtest>gfortran gtk.o gtk-sup.o gtk-hl.o hl_choosers.f90 -o hl_choosers.exe -L. -llibglib-2.0-0 -llibgtk-win32-2.0-0 -llibgdk-win32-2.0-0 -llibgobject-2.0-0 -llibgdk_pixbuf-2.0-0 -llibcairo-2
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x36a): undefined reference to `___gtk_hl_chooser_MOD_hl_gtk_file_chooser_show'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x55c): undefined reference to `___gtk_hl_entry_MOD_hl_gtk_text_view_get_text'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x820): undefined reference to `___gtk_hl_entry_MOD_hl_gtk_text_view_get_text'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0xb09): undefined reference to `___gtk_hl_entry_MOD_hl_gtk_text_view_delete'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x1022): undefined reference to `___gtk_hl_entry_MOD_hl_gtk_text_view_insert'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x148b): undefined reference to `___gtk_hl_chooser_MOD_hl_gtk_file_chooser_show'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x158d): undefined reference to `___gtk_hl_entry_MOD_hl_gtk_text_view_delete'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x1aa6): undefined reference to `___gtk_hl_entry_MOD_hl_gtk_text_view_insert'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x1eeb): undefined reference to `___gtk_hl_dialog_MOD_hl_gtk_message_dialog_show'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x2194): undefined reference to `___gtk_hl_container_MOD_hl_gtk_window_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x21b5): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x21e8): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x2223): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_pack'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x228f): undefined reference to `___gtk_hl_button_MOD_hl_gtk_button_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x22cd): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_pack'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x23de): undefined reference to `___gtk_hl_chooser_MOD_hl_gtk_file_chooser_button_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x241c): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_pack'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x2488): undefined reference to `___gtk_hl_button_MOD_hl_gtk_button_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x24c3): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_pack'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x252f): undefined reference to `___gtk_hl_button_MOD_hl_gtk_button_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x256a): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_pack'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x2626): undefined reference to `___gtk_hl_entry_MOD_hl_gtk_text_view_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x2660): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_pack'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x26cc): undefined reference to `___gtk_hl_button_MOD_hl_gtk_button_new'
/tmp/cc1wsEfv.o:hl_choosers.f90:(.text+0x2707): undefined reference to `___gtk_hl_container_MOD_hl_gtk_box_pack'

Note the "three" underscores. Is that supposed to be or is it not finding them due to an extra underscore. If so I tried some compiler flags to change this but it changes everything. If this is the problem can it be done with a compiler directive, and if so, how? Not I'm only one of those lowly scientific programmers :).