code::blocks can't create files - codeblocks

I just barely installed Code::Blocks so that I can learn how to program in fortran with a real IDE (with debugging and other fun things). But I'm running into a puzzling problem while trying to get it to work--Code::Blocks seems to be unable to create any files at all.
Info: I'm running Linux Mint 17 and built Code::Blocks from source (version 13.12 for Debian, which seemed like the closest I could get). When I try to create a new project, it gives the following error for every single file in the project:
Warning
Couldn't save project path/filename
(Maybe the file is write-protected?)
This is when I run code::blocks from the terminal as a super user. When I simply run Code::Blocks without super user, I get the following:
Error
Couldn't create the project directory
path/
No idea what's going on here, and I can't find a similar question. Help?

I finally found the answer.
Do not create new file or new project in C
Try to create in other disks.
Folders situated in C are protected folders
and you can save your file or save as file just fine

I was facing the same problem but after following this below procedure I was able to run the program
Procedure:
In code-block go to the Setting, click on Tool chain executable then click on auto detect
This will solve the problem

One possible cause for your problem is that you specified an invalid path to a new project when starting one.
If you see "Invalid file path" in the "Resulting filename field", you generally should not hit "Next".
Below is a screenshot showing how your dialog should look when you've filled in the file path properly:
In case anyone is curious, I overlooked this initially in CodeBlocks 17.2 on Windows 10 before finding this question and posting this answer.

Linux mint 19.1 with a fresh install of Code::Blocks 16.01.
I was getting the same message as below when trying to create a project and the dialog box never showed the "invalid path" message.
"Couldn't create the project directory: /home/mydir/Code/CppTraining/HelloWorld/"
I found I was able to create the path after I removed one level of subfolders. It seems code::blocks doesn't like project paths to have more than one or two levels of subfolders?

If you're flipping back and forth from Linux to Windows, this problem may occur and it's extremely frustrating as a Linux user to debug.
Windows doesn't understand that the tilde "~/" means your home folder, so you actually have to type "C:\Users\<yourusername>\<path>"
, instead of just typing "~/<path>"
Hope this helps anyone that has run into this.

Related

AnyLogic PLE v8.76 quit unexpectedly when launching on mac

I use AnyLogic PLE v8.76 on mac. It worked fine for a week, but today I got problem launching the software. I keep getting this message:
And this is the error shown:
I tried to download Anylogic again, but I still got the same problem...
I did not download any other softwares or change things on my mac.
Can somebody help me?
Thank you!
Best option, as often advised by the AnyLogic support team, is to clear the workspace.
Try the following:
Make hidden files and folders visible on your Mac - cmd+shit+.
Navigate to your user folder (Either from he side bar, or Macintosh HD -> Users->(yourname)
Find the .AnyLogic... folder, on mine it is called .AnyLogicProffesional
Delete the following two folders workspace8.x and configuiration8.x where the 8.x indicates your version number of the currently installed AnyLogic version.
These files keep settings and the currently loaded models on the disk and will remain even if you download a new version of AnyLogic, which is why downloading a new version does not always solve these kinds of problems.
If the issue still persists contact support, they might ask you to send the error report you got from your Mac (so copy and paste it to a document the next time you get it) as well as some error logs that get stored in these hidden files and folders. (Now you at least know where to find them ;-) )
If my solution did not provide the answer, please add an answer if you manage to find it.

"could not find mandatory..." error when trying to run tutorial case in OpenFOAM version 8

I'm trying to learn about OpenFOAM Computational Fluid Dynamics software in order to use it for my undergraduate thesis. I am currently following Joszef Nagy's tutorial to run your first simulation. Everything up to about the 18:30 mark has worked completely fine. Editing initial conditions, timestep, savestep, total run time, and so on have all worked without a hitch. I have navigated to the correct directory, which in his video is /OpenFOAM/OpenFOAM-2.3.0/tutorials/incompressible/icoFoam/elbow_tri but on my installation my path goes /opt/openfoam8/tutorials... and the rest. I first tried to run the command as it was given in the video, which is
fluentMeshToFoam elbow.msh
And the command worked just fine, up until the point it needed to write the changes to constant/polymesh, at which point it gave the error
FOAM FATAL ERROR:
The parent directory does not allow write permission to the process,
or one of the directories in "/opt/openfoam8/tutorials/incompressible/icoFoam/elbow_tri/constant/polyMesh" did not allow search (execute) permission.
From function bool Foam::mkDir(const Foam::fileName&, mode_t)
in file POSIX.C at line 346.
So what i understand happened is it succeeded in creating the mesh, but didn't have the proper permissions to write the mesh file to the constant/polyMesh folder.
With this in mind, I instead tried the command
sudo fluentMeshToFoam elbow.msh
But this time i was given the much shorter error
FOAM FATAL ERROR :
Could not find mandatory etc entry (mode=ugo)
'controlDict'
But, this time, it didn't even go through the mesh creation process. I was given this error right out of the gate. Can someone who is familiar with OpenFOAM explain why this is happening? I have had a LOT of problems even trying to get this software installed on my computer, so I'm getting very frustrated at this point and can hardly think straight.
Thanks so much.
NB: I am running Ubuntu version 20.04 LTS and OpenFOAM version 8.
This, and several other problems, can be resolved by running OpenFOAM from the correct folder. After you have installed OpenFOAM, be sure to make a folder in your home directory called OpenFOAM with a sub folder called run, as detailed on their website. To run a tutorial case, copy it from the tutorials folder in your installation and move it to this run folder and run it from there.
RUNNING OPENFOAM CASES DIRECTLY FROM THE INSTALLATION FOLDER IS A RECIPE FOR DISASTER. DO NOT DO IT.

#include errors detected. Please update your includePath

I am working with Visual Studio Code, and when I am starting to code in C, an error message shows up:
include errors detected. Please update your includePath. Squiggles
are disabled for this translation unit
(C:\Users\user\Desktop\c2\main.c)
Any help?
Well, in case you tend to tranfer your code from one system to another, some things may get messed up.
VSCODE creates a specific folder when you start a new project called -you guessed it- "vscode" where some useful information about JSON and the compiler are stored. If you move your project to a different pc and try to open it via vscode, it is likely that the info stored in VSCODE-directory will not apply to this system.
In my case, I had a path like: "Users/user1..." in a system that did not have any user named user1 so i had to configure the VSCODE directory or even delete it altogether and let VSCODE create a new one.

BeagleBoneBlack Cloud9 Not Working On Runtime SIOCADDRT: File exists Issue

I recently picked up the BBB I have from some time ago (the Debian image is quite old) and have been following a book on my journey. I'm relatively new to embedded electronics.
Now, I'm having trouble with running Cloud9 on my BBB, and I can't find anyone with the same issue:
I can create files and restart the workspace, but whenever I click on "run", I get the following messages:
SIOCADDRT: File exists
Also, a small error message appears for a second, and it says the following:
set option aggressive-resize -> on
After that, all of my files are stopped for run time. I do want to note, that I can run all of the .js files in the terminal that I can open in Cloud9 and that works perfectly fine.
I'm really not sure as to what is causing this. When I check the web page itself, I get the following errors:
Disregard terminal: output203990
XML Parsing Error: no root element found
Location: http://192.168.7.2:3000/vfs/1/9cmZHC5eYxOHaB7N/workspace///tab2?access_token=token
Line Number 1, Column 1:
It seems like the BBB is having trouble communicating between Cloud9 and its own self. I have tried 2 browsers--Firefox and Edge. If anyone else has encountered the same problem or could suggest a possible fix without me loading a new image onto the board (which would be the ultimate solution), that'd be helpful!
I'm not sure what the issue was, but flashing a newer Debian image got rid of the problem.

Can't deploy Windows Phone App - An attempt was made to load a program with an incorrect format

I'm trying to deploy my app to a device and i get the following error
Error 27 An attempt was made to load a program with an incorrect format.
the odd thing is that the file and project this error relates to are both blank.
It was a WP7 app but i tried converting it to WP8 app in hope of fixing it but that didn't help. Anyone got any ideas how to figure out what's wrong?
the only thing i could find for this error talks about a specific assembly being compiled for the wrong platform. but this is not an option in the Windows Phone project settings
Check the files in your project. Files that are not part of the project should be marked as "Buid Action = none" and "Copy to Output Directory = Do not copy". Some examples are file files "text". Try this, worked for me.
Did you get any conversion warnings when you converted the project? I've worked around problems like this in the past by creating a new Windows Phone solution, re-creating the same projects in the new solution, creating any needed sub-folders into those projects, and then copying over the code and content files. This is usually quick if there aren't a lot of projects & folders.
Not sure if this is the case with you, or if you've already solved the issue (since it is an old thread), but this happens sometimes when you target the wrong CPU type. For example, your project targets x86 while you have a 64-bit machine.
Follow these steps to (hopefully) fix the issue:
Go to project properties
Go to Build tab
Select Any CPU from Platform dropdown
Save and recompile

Resources