Cannot Get up on Win 10

Windows specific questions.
Post Reply
hmonnier
Posts: 1
Joined: Jan 12, 2018 18:18

Cannot Get up on Win 10

Post by hmonnier »

Hopefully someone has an idea. I have tried with both the 32 bit and 64 bit downloads.
The symptoms are the same with both. The install goes thru without any errors.
When I execute the .exe file, the screen flashes once, the nothing else. I have tried executing as an admin and also without admin. Fails in the same manner both ways.
Running the latest win10......
thanks Henri Monnier, Georgetown, SC
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Cannot Get up on Win 10

Post by Tourist Trap »

hmonnier wrote:Hopefully someone has an idea. I have tried with both the 32 bit and 64 bit downloads.
The symptoms are the same with both. The install goes thru without any errors.
When I execute the .exe file, the screen flashes once, the nothing else. I have tried executing as an admin and also without admin. Fails in the same manner both ways.
Running the latest win10......
thanks Henri Monnier, Georgetown, SC
Hello,

I downloaded the portable 64bits version of FB last Sunday and unzipped it. I was able to run fbc (the compiler) to compile a hello world program. Not had much time to do more since setting up windows to become a programming platform takes a while, installing of visual studio, get the doc offline, get the updates, install other programming languages and compiler, install cygwin (just to list part of the todo that is left to be done here).

Anyway FB seems to respond perfectly in the portable version. I'll really try to launch more tests soon and let you know!
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Cannot Get up on Win 10

Post by jj2007 »

hmonnier wrote:When I execute the .exe file, the screen flashes once, the nothing else.
Hi Henri,
With "the .exe" you mean fbc.exe, I assume? What do you see when you launch fbc.exe from a command prompt?

From the readme:
Now you can use fbc.exe from the installation directory to compile FB
programs (*.bas files) into executables (*.exe files). Open a command
prompt (cmd.exe) and run fbc.exe from there, for example:
1. Click Start -> FreeBASIC -> Open console
2. In the opened command prompt, type in the following command and
press ENTER:
> fbc.exe examples\hello.bas
3. This should have created examples\hello.exe in the FreeBASIC
installation directory. You can run it by entering:
> examples\hello.exe
I just made an installation on Win10-64, and it works just fine.
Last edited by jj2007 on Jan 13, 2018 13:20, edited 2 times in total.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Cannot Get up on Win 10

Post by dodicat »

Use a portable (.zip) as Tourist Trap suggests.
Don't use the folder Program files.
I have my freebasic folder on the desktop.
integer
Posts: 408
Joined: Feb 01, 2007 16:54
Location: usa

Re: Cannot Get up on Win 10

Post by integer »

hmonnier wrote:...
When I execute the .exe file, the screen flashes once, the nothing ...
Get to the command prompt
Normally in the lower left corner of the Win10 screen is a box, with "Type here to search"
In that box type in: "command" <- without the quote marks
and then the [ENTER-key]
You will get the console command screen.
Change to the directory where you installed FreeBasic.
THEN, type in "fbc" and [ENTER]

The screen will fill with all the compiler parms.
then as jj2007 suggested, type in the next two lines:

fbc examples\hello.world
hello
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Cannot Get up on Win 10

Post by fxm »

Try to put the 'Sleep' keyword at the end of your program.
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Cannot Get up on Win 10

Post by badidea »

"FreeBASIC ... is a console mode application", see: https://freebasic.net/wiki/wikka.php?wa ... FAQ#item21

Better wiki page: https://www.freebasic.net/wiki/wikka.ph ... Installing

Best IDE for windows is probably FbEdit at at moment, see: viewtopic.php?t=10350
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Cannot Get up on Win 10

Post by MrSwiss »

FBEdit download link from, freebasic-portal.de: FBEdit ver. 1.0.7.6c download
(the IDE is multi language, the WebSite is in german)
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Cannot Get up on Win 10

Post by jj2007 »

Hmmm... one attempt to install & run FB, 7 answers, links to helpful things all over the place. Maybe a reason to reflect on a little extra button "Compile a helloworld.bas" during installation?
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Cannot Get up on Win 10

Post by Tourist Trap »

jj2007 wrote:Hmmm... one attempt to install & run FB, 7 answers, links to helpful things all over the place. Maybe a reason to reflect on a little extra button "Compile a helloworld.bas" during installation?
You are right. Installing FB doesn't mean that one will subscribe to the forum as a new member, or even look at it. Myself, I've downloaded FB (in a bundle with fbide) years before becoming a member and a happy follower of the community forum. So, clearly if we assume that most of the freebasic audience is expected to be compound of beginners, the installer (that generally a beginner will think of as the easier way) should say something about how to launch a very first program without any IDE, it should also mention FBIDE or FBEDIT and the forum address just in case.
I never tried the installer, I'm of those who don't like them in general, but I think that no such advice is given in the messagebox. Anyway the README may probably be helpful, or may require some addition for win10 users? -> edit... this is already done in the readme, people at the dev team don't seem to be awaiting for my lightnings ;)
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Cannot Get up on Win 10

Post by badidea »

jj2007 wrote:Hmmm... one attempt to install & run FB, 7 answers, links to helpful things all over the place. Maybe a reason to reflect on a little extra button "Compile a helloworld.bas" during installation?
At least better then no answer. The bad thing is, this question has been asked tens of times. I had hoped to nail this question by one link to the FB-wiki explaining this stuff step by step to new users. I could not find a good wiki page however. Some work to do here (a wiki account was created me for me recently, but I have not yet done anything with it). A 'readme' file also containing a link to this wiki page would be good.

For those who can read German, they have a better page https://www.freebasic-portal.de/tutoria ... cht-3.html
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Cannot Get up on Win 10

Post by jj2007 »

For Windows, a simple batch file named DragABasFileHere.bat might be sufficient:

Code: Select all

@echo off
set options=-gen gas -Wc -O2 -s console
echo ** compiling %~nx1 with %options% **
\MyFbPath\FreeBasic\fbc.exe %options% "%1"
if exist "%~dpn1.exe" (
  "%~dpn1.exe"
  >nul find /I "Sleep" "%1"
  if errorlevel 1 pause
) else (
  echo something went wrong, ask for help in the forum!
)
Tested with some of the bas files in the Examples folder, most of them build and run just fine. The find command serves to determine if a pause is needed because the source doesn't have a sleep command.
Post Reply