Topic: GTk+ sample 'Hello' not working

Test compilation and build of the example provided by SFPM
using the GTk+

...fails.

Details thus:
Generating Makefile... Okay
==============================================================================
Open Watcom Make Version 1.9 (Built on Feb  4 2013)
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
    "C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\gcc.exe" -c -o "build\example.o" -m32 -o3 -ID:/JWasilewski/AppData/Local/sfpm/32/include -mms-bitfields ".\example.c"
Error(F38): (build\example.o) does not exist and cannot be made from existing files
Error(E02): Make execution terminated
* Complete *


#
# Automagically generated by Approximatrix Simply Fortran
#
FC="C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\gfortran.exe"
CC="C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\gcc.exe"
AR="C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\ar.exe"
TOUCH="C:\Program Files (x86)\Fortran\SF\fwin\wtouch.exe"
WRC="C:\PROGRA~2\Fortran\SF\MINGW-~1\bin\windres.exe"
RM=del
IDIR=-ID:/JWasilewski/AppData/Local/sfpm/32/include
# -I error: Directory C:\Program Files (x86)\Fortran\SF\mingw-w64\include\ does not exist
LDIR=-LC:/PROGRA~2/Fortran/SF/MINGW-~1/lib/ -LD:/JWasilewski/AppData/Local/sfpm/32/lib

SPECIALFLAGS=-march=athlon64 -m32 $(IDIR)
RCFLAGS=-O coff -F pe-i386
PRJ_FFLAGS=
PRJ_CFLAGS=-mms-bitfields
PRJ_LFLAGS=-lgtk-win32-2.0.dll -lgdk-win32-2.0.dll -lgthread-2.0.dll -lgdi32 -lole32 -latk-1.0.dll -lgdk_pixbuf-2.0.dll -lpangowin32-1.0.dll -lpango-1.0.dll -lgobject-2.0.dll -lgmodule-2.0.dll -lglib-2.0.dll -lintl.dll
FFLAGS=$(SPECIALFLAGS)  $(PRJ_FFLAGS) -Jmodules
CFLAGS=-m32 -o3 $(IDIR) $(PRJ_CFLAGS)

"build\example.o": ".\example.c"
    $(CC) -c -o "build\example.o" $(CFLAGS) ".\example.c"
clean: .SYMBOLIC
    $(RM) "build\example.o"
    $(RM) "helloworld.exe"
"helloworld.exe":  "build\example.o"
    $(FC) -o "helloworld.exe" -static -m32 "build\example.o" $(LDIR) $(PRJ_LFLAGS)
all: "helloworld.exe" .SYMBOLIC

----
John

Re: GTk+ sample 'Hello' not working

John,

Can you open example.c in the editor?

Jeff Armstrong
Approximatrix, LLC

Re: GTk+ sample 'Hello' not working

Yep

Re: GTk+ sample 'Hello' not working

John,

I just did a fresh install of Gtk on a clean system, and I'm not having the issue you've reported.  Additionally, I see that your makefile makes no mention of the application's icon, which is odd if you're working with the shipped example.

Did you create the project from scratch yourself, or did you use the example project?

Jeff Armstrong
Approximatrix, LLC

Re: GTk+ sample 'Hello' not working

I used the supplied example.
I just selected it, saved as directed, then clicked 'build'.

I've just used SFPM to uninstall and then re-install.
Same result when I try to BUILD.

When I look in the build and modules directories, there are no object files there.

I noticed that there is an icon file.  I've tried BUILDing with and without the icon selected in options>project.  Same result
.

I've just noticed that you have included a GTk+ help link in tools.  I must say, GTk+ looks very promising indeed.
I hope we are going to able to use it with SF GFortran.
---
John

Re: GTk+ sample 'Hello' not working

John,

Examining your makefile more carefully, I believe the issue is the optimization flag you have configured in Compiler Options.  I see the flag

-o3

in your compiler flags.  The optimization flag is actually

-O3

and it is case-sensitive.  I'm not sure in exactly what way the compiler call is failing, but the lowercase -o is probably instructing the compiler to generate the output file "3," overriding the previous request to generate the output file "build/example.o."  Everything should work fine if you change this compiler flag.

Jeff Armstrong
Approximatrix, LLC

Re: GTk+ sample 'Hello' not working

It does indeed.
We shouldn't expect you to spoonfeed us like this!
---
Thanks Jeff,
John