does gfx refuse to work on windows?

Windows specific questions.
oyster
Posts: 206
Joined: Oct 11, 2005 10:46

does gfx refuse to work on windows?

Postby oyster » Mar 15, 2020 7:36

I am using FreeBASIC-1.07.1-win64_2.7z on windows 7 64 bits. The following code is actually the official test

When I run the produced Exe file, only a white window appears. There is no text at all. So what is the problem? Thanks

Code: Select all

'' examples/manual/gfx/drawstring.bas
''
'' NOTICE: This file is part of the FreeBASIC Compiler package and can't
''         be included in other distributions without authorization.
''
'' See Also: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgDrawString
'' --------

Const w = 320, h = 200 '' screen dimensions

Dim x As Integer, y As Integer, s As String

'' Open a graphics window
ScreenRes w, h

'' Draw a string in the centre of the screen:

s = "Hello world"
x = (w - Len(s) * 8) \ 2
y = (h - 1 * 8) \ 2

Draw String (x, y), s

'' Wait for a keypress before ending the program
Sleep
fxm
Posts: 9557
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: does gfx refuse to work on windows?

Postby fxm » Mar 15, 2020 8:10

oyster wrote:I am using FreeBASIC-1.07.1-win64_2.7z on windows 7 64 bits.

What is this file?
I only know the official version: FreeBASIC-1.07.1-win64.7z

What is your compilation command line?
oyster
Posts: 206
Joined: Oct 11, 2005 10:46

Re: does gfx refuse to work on windows?

Postby oyster » Mar 15, 2020 11:17

I used different download managers at the same time, _2 means that it is auto-renamed.

I use the way to compile

Code: Select all

L:\prg\basic\FreeBASIC-1.07.1-win64\fbc drawstring.bas


or

Code: Select all

L:\prg\basic\FreeBASIC-1.07.1-win64\fbc -s gui drawstring.bas

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 2 guests