Installing FreeBASIC and FBIde
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Installing FreeBASIC and FBIde
Have just bought a new laptop Window8 touch screen and am facing the nightmare of trying to download and install FreeBasic with the FBIde again. I am useless at setting paths etc nothing ever seems to work right so used the installer option at
http://fbide.freebasic.net/download
chose,
FBIde + FreeBASIC installer
Wrote and ran a test program with this result?
Command executed:
"C:\FreeBasic\fbc.exe" "C:\Program Files (x86)\FreeBASIC\hello.bas"
Compiler output:
C:\FreeBasic\bin\win32\ld.exe: cannot open output file C:\Program Files (x86)\FreeBASIC\hello.exe: Permission denied
Results:
Compilation failed
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.23.0 (08-14-2011) for win32 (target:win32)
OS: Windows NT 6.2 (build 9200)
http://fbide.freebasic.net/download
chose,
FBIde + FreeBASIC installer
Wrote and ran a test program with this result?
Command executed:
"C:\FreeBasic\fbc.exe" "C:\Program Files (x86)\FreeBASIC\hello.bas"
Compiler output:
C:\FreeBasic\bin\win32\ld.exe: cannot open output file C:\Program Files (x86)\FreeBASIC\hello.exe: Permission denied
Results:
Compilation failed
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.23.0 (08-14-2011) for win32 (target:win32)
OS: Windows NT 6.2 (build 9200)
Re: Installing FreeBASIC and FBIde
Hi Basic Coder2.
Just download the zip files and expand then into a desktop folder.
Just keep fbide inside the freebasic folder in a little folder called Ide or something.
No need whatsoever for paths, as soon as you start fbide I'll ask for the location of fbc.exe, just direct it to it the file with the mouse.
Stick the .chm file somewhere also after you have expanded it.
Then direct fbide to the help file.
If you want to directly get fbc by console, get a hold of start_shell.exe, or even make you own start_shell.exe with
shell("cmd").
Put this .exe beside fbc.exe.
Luckily fbide doesn't need things on path like ScITE and various other editors.
I have two desktop folders, one with fbc from this site, and the other, the Full Monty with gcc from the German site.
Just download the zip files and expand then into a desktop folder.
Just keep fbide inside the freebasic folder in a little folder called Ide or something.
No need whatsoever for paths, as soon as you start fbide I'll ask for the location of fbc.exe, just direct it to it the file with the mouse.
Stick the .chm file somewhere also after you have expanded it.
Then direct fbide to the help file.
If you want to directly get fbc by console, get a hold of start_shell.exe, or even make you own start_shell.exe with
shell("cmd").
Put this .exe beside fbc.exe.
Luckily fbide doesn't need things on path like ScITE and various other editors.
I have two desktop folders, one with fbc from this site, and the other, the Full Monty with gcc from the German site.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: Installing FreeBASIC and FBIde
Sounds like security settings are an issue.Compiler output:
C:\FreeBasic\bin\win32\ld.exe: cannot open output file C:\Program Files (x86)\FreeBASIC\hello.exe: Permission denied
I don't know if the Windows 8 interface changes file/folder permissions at all, but FreeBASIC isn't being given access to create that exe in the destination folder.
Try right-clicking the folder, Properties | Security | Advanced (Or Edit)
Make sure that the permissions are set appropriately so that FreeBASIC can write those files.
An alternative is that something has a file lock on hello.exe. I'm not sure that's very likely, however.
Re: Installing FreeBASIC and FBIde
Windows Vista and up restrict writing to certain system folders like Program Files to help deflect some simple security issues. Simple resolution is copy any files you want to compile to a directory you can write to like C:\projects or your My Documents folder.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Installing FreeBASIC and FBIde
Thank you for all your replies. I am going to have to spend time learning this Windows8 stuff which may take some time then I will come back to trying to install freeBasic and the fbIde. The problem is being told to do X is not much use if not also being told exactly (step by step) how to do X.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: Installing FreeBASIC and FBIde
BasicCoder2:
This isn't so much a Windows 8 issue as it is a general computer security problem.
From your post, it looks as though you are putting your FreeBASIC programs in the C:\Program Files (x86)\FreeBASIC directory.
Move your development environment (FBIde, Compiler, .bas files, etc.) into another folder, such as C:\Dev\FreeBASIC.
You shouldn't have any problems creating executables in folders you have created. The Program Files folder is protected by default, which is why the compiler isn't able to create hello.exe.
Let me know if you need additional (ex: more detailed) instructions...
This isn't so much a Windows 8 issue as it is a general computer security problem.
From your post, it looks as though you are putting your FreeBASIC programs in the C:\Program Files (x86)\FreeBASIC directory.
Move your development environment (FBIde, Compiler, .bas files, etc.) into another folder, such as C:\Dev\FreeBASIC.
You shouldn't have any problems creating executables in folders you have created. The Program Files folder is protected by default, which is why the compiler isn't able to create hello.exe.
Let me know if you need additional (ex: more detailed) instructions...
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Installing FreeBASIC and FBIde
@anonymous1337
I ran the FBIde0.4.6r4-FreeBASIC0.23 installer program and installed it in C:/FreeBasic folder and it seems to work ok except it starts with a warning pop up window asking if I want FBIde.exe to make changes to this computer. I don't know what changes it would make to the computer itself.
I ran the FBIde0.4.6r4-FreeBASIC0.23 installer program and installed it in C:/FreeBasic folder and it seems to work ok except it starts with a warning pop up window asking if I want FBIde.exe to make changes to this computer. I don't know what changes it would make to the computer itself.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: Installing FreeBASIC and FBIde
BasicCoder2:
Thank you for being patient. I think you can learn more about your computer in the process of solving this kind of problem. Roles/permissions and file securities are actually really important, at least in professional development environments.
I understand that you have installed FBIde in the specified location of "C:\FreeBASIC", but it appears that your code is in a different folder. When FBC compiles your code, it will try and compile "C:\Program Files (x86)\FreeBASIC\hello.bas" into "C:\Program Files (x86)\FreeBASIC\hello.exe". Chances are, it doesn't have permissions to write files in that directory.
Can you do me a favor and check to make sure that "hello.bas" isn't stored in the "C:\Program Files (x86)\FreeBASIC" directory?
FBIde is really just a fancy text editor. FBC.exe is what turns code files into executable programs. Windows has a problem with FBC trying to create executable files in one of its privileged folders - program files.
All it knows is that FBIde wants admin privileges, so it asks whether or not that's okay. Just standard Windows warnings :)
Thank you for being patient. I think you can learn more about your computer in the process of solving this kind of problem. Roles/permissions and file securities are actually really important, at least in professional development environments.
I understand that you have installed FBIde in the specified location of "C:\FreeBASIC", but it appears that your code is in a different folder. When FBC compiles your code, it will try and compile "C:\Program Files (x86)\FreeBASIC\hello.bas" into "C:\Program Files (x86)\FreeBASIC\hello.exe". Chances are, it doesn't have permissions to write files in that directory.
Can you do me a favor and check to make sure that "hello.bas" isn't stored in the "C:\Program Files (x86)\FreeBASIC" directory?
FBIde is really just a fancy text editor. FBC.exe is what turns code files into executable programs. Windows has a problem with FBC trying to create executable files in one of its privileged folders - program files.
That's just a standard message that appears when programs require administrative privileges to run. I'm not sure exactly if FBIde needs to make many changes to your system in order to install, but Windows has no way of telling that.it seems to work ok except it starts with a warning pop up window asking if I want FBIde.exe to make changes to this computer. I don't know what changes it would make to the computer itself.
All it knows is that FBIde wants admin privileges, so it asks whether or not that's okay. Just standard Windows warnings :)
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Installing FreeBASIC and FBIde
Thank you for responding to the problem.anonymous1337 wrote:BasicCoder2:
Thank you for being patient.
Since your first post I have reinstalled FBIde in the folder C:\FreeBasic instead of in the folder "C:\Program Files (x86)\FreeBASIC and it now compiles source code and runs the compiled code from any folder (or usb RAM stick) without any problems which was the problem I started this thread about. This is another problem when I start up FBIde itself.
What happens is when I start FBIde from the File Explorer or its shortcut Desktop icon or its tile in the Start screen it pops up a request for permission to run FBIde claiming FBIde wants to modify the computer.
Clicking on the text "Change when these notifications appear" it pops up another window titled,
"User Account Control Settings" where you can choose under what conditions you want to be notified about changes to your computer.
The current setting is the default "Notify me only when apps try to make changes to my computer". I don't see why FBIde would be making any changes to the computer whenever it starts up. I figure it must be a windows8 issue for I don't remember it happening with the older Windows. All the other apps that came with Windows do not trigger the request to continue. The programs compiled from FBIde start up and run ok.
Re: Installing FreeBASIC and FBIde
I had this problem with the PC utilities firewall in Win 2000.
I cured it by changing the firewall settings, but every now and then it would revert back to default, just to keep me on my toes I suspect.
I use XP now, I don't know anything about Win 8 unfortunately, but could it be the Windows firewall?
I cured it by changing the firewall settings, but every now and then it would revert back to default, just to keep me on my toes I suspect.
I use XP now, I don't know anything about Win 8 unfortunately, but could it be the Windows firewall?
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Installing FreeBASIC and FBIde
@dodicat
Yes it seems like it could be a Windows8 firewall or even Norton. As mentioned above you can change the settings but I assume it would change for every application taking away protection from any new app that might be dangerous. Maybe when I learn more about Windows8 I will find the answer. Learning a different way of doing something you can already do the old way requires some effort but I guess it keeps the brain in good working condition :) An ideal operating system would accept questions and give answers or even fix the problem all by itself using feedback from the user like, "nope I didn't mean that" or "yes it works now".
Yes it seems like it could be a Windows8 firewall or even Norton. As mentioned above you can change the settings but I assume it would change for every application taking away protection from any new app that might be dangerous. Maybe when I learn more about Windows8 I will find the answer. Learning a different way of doing something you can already do the old way requires some effort but I guess it keeps the brain in good working condition :) An ideal operating system would accept questions and give answers or even fix the problem all by itself using feedback from the user like, "nope I didn't mean that" or "yes it works now".
Last edited by BasicCoder2 on Apr 21, 2013 21:50, edited 1 time in total.
Re: Installing FreeBASIC and FBIde
Afaik Windows Defender (the Microsoft antivirus) is default enabled on Win8.
First test if turning it off (completely) solves anything, and then you can try reenabling it with some directories excluded.
But that doesn't solve UAC issues, stay away from "Program Files/" and "Program Files(x86)/"
First test if turning it off (completely) solves anything, and then you can try reenabling it with some directories excluded.
But that doesn't solve UAC issues, stay away from "Program Files/" and "Program Files(x86)/"
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: Installing FreeBASIC and FBIde
Protip: You can often tell the more experienced developer as being the one who (appropriately) uses the more specific accronym/tech jargon for the given situation.
anonymous1337 wrote:Windows roles/permissions
I'm afraid of calling this law anything out of fear that rookie programmers will begin terminology debates, the consequences of which are as-of-yet unforeseen :)marcov wrote:UAC (User Account Control)