Geany compiling - c

Don't know where to put this...
But I'm running Geany on 2 systems (laptop and desktop). On my laptop it works perfectly, but on my desktop when I run the code i get this error:
'"./whatevername"' is not recognized as an internal or external command, operable program or batch file
I can't figure out wtf is wrong with it. Any ideas?

If I may give a small help: you need to set the PATH variable. On Windows machines, it's in the registry. Here's how you do it:
http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
Otherwise, whatever your compiler migth be (gcc, tcc, cpp) will not be found.

Related

Debug not working on CS50 practice problem

Trying to do CS50 week 1 practice problem "Debug'. I've followed it step by step repeatedly for hours and cant seem to get away from this error.
When I 'make' debug, I get an error saying
The term 'make' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again..
I can run Debug on code.cs50.io, but I'm unable to run debug on the actual VS Code App on windows 11. I tried to copy paste the code itself into code.cs50.io but I get this error
make debug
debug50 ./debug
Can't debug this program! Are you sure you are running debug50
on an executable, a Python script, or a Java program?
Unsupported File: ./debug
I am very new to VS Code and coding in general, so can someone please explain this to me ?
I did cs50 but it was a couple of years ago. I can’t remember if I did it on windows or linux. Anyway, I think the clue here is:
The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again..
If you have not installed make then you have to install it.
Try here:
https://stackoverflow.com/a/57042516/11112270
If you do have it installed, then the binary executable is not in $PATH env variable.
Try here:
https://stackoverflow.com/a/44958882/11112270
IMO, just develop on linux since it’s much easier to get tools you need. Unless cs50 requires windows?

'"./testing"' is not recognized as an internal or external command, operable program or batch file

so I'm trying to run a c program on a compiler called geany but keep running on to this error whenever I try and run the program. I know there isn't any mistake on the actual code as I am able to compile it. I am also able to run it on online IDE's. It just will not run on an IDE on my computer. I've tried visual studio, and another third party ide and I am still getting a similar error.

Can not use gtk3 FileChooser on Mac OSX?

I migrated my program built with gtk+3.0 from linux to Mac OS X(10.6.8).
And I compiled the program without errors.
However, after I started the program and I chose to open a file, the terminal shows following message.
GLib-GIO-CRITICAL **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
Then, the program ends with Segmentation fault.
How to solve it?
Thanks for any helps.
Seems you're not the one having this problem, and it also happens on Windows on MinGW. Luckily, that person gave a solution:
The thing, as it seems as I was running the test-widget example (that I
built with gtksourceview-3.0.0 using MSVC), was that I need to compile the
org.gtk.Settings.FileChooser.gschema.xml file (from GTK+-3.x, under
$(srcroot)/gtk) with the glib-compile-schemas utility that is from GLib,
which will generate gschemas.compiled in the same folder.
After that, place that gschemas.compiled file in the this folder:
$(parent_folder_of_the_gtk3_dll)\share\glib-2.0\schemas
and one will be set to use the gtkfilechooser without the puzzling
[GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser'
is not installed] error.
I will add to my GLib project files to compile the glib-compile-schemas
utility and add to my GTK+-3.x project files to compile the
the org.gtk.Settings.FileChooser.gschema.xml shortly.
I ran in to this problem with a program that I crosscompiled with mingw for windows, the solutions is to run glib-compile-schemas [path to org.gtk.Settings.FileChooser.gschema] in my case was that file in ./share/glib-2.0/schemas.It will generate gschemas.compiled, that is the file FileChooser is looking for.

Using the lcc-win compiler from the command line

I have installed the lcc compiler so that I can compile c programs on my windows machine - but I am having troubles getting it to work...
I added C:\lcc\bin to my PATH environment variable, but when I type in:
lcc args
into my command line, I get this message: 'lcc is not recognized as an internal or external command, operable program or batch file'.
If I actually navigate to the folder C:\lcc\bin, I can execute lcc no problem
Is there something else I have to do other than set the PATH variable?
thanks!
I had also problems using lcc. By accident I started the editor that was also included in the package. Since then it works. I notice that I have to perform this operation each time I install it on a new computer. I suppose that it has to do with some initialization files that are required, but only created by the editor. Maybe this will also helps you.

Compiling with C.vim on Windows?

C.Vim works, as evidenced by the commands I've been using, syntax highlighting, and template. But I use \rc and nothing happens. \rr tells me that there is no .exe, and an Everything search tells me that it's not a directory issue.
In all the resources I've read, I don't see anything that says I need to point it to a specific compiler, though I've installed Visual Studio 2010.
How do I get C.vim to compile my code? I'm a relative beginner with Vim and C.
Edit: I've set the Windows Environment Variable to C:/cygwin/bin where I've downloaded and installed the GCC packages, but am still getting the same error.
Edit2: I've downloaded Msys and Mingw as well. I tried setting up Eclipse as well, following the instructions here. Running make from the command line tells me that GNU Make 3.81 is running. Running :make in Vim tells me:
shell returned 2
(1 of 1) : make *** No targets specified and no makefile found
Trying Eclipse, I get another make error:
make: *** No rule to make target `all'; Stop.
Edit3: I got Code::Blocks running, which is what I used to run. (It's been a while since I programmed, and even then I was a beginner.) I didn't really have to configure it at all, though I would still prefer to use Vim, so help is still much appreciated.
Edit4: running make vimFirst (vimFirst.c is my file) compiles! Running the program with :! vimFirst.exe works as expected. Now returning to the original question, how to do it with C.vim? It would be so much more convinient to type \rc and have the program compile and run, which is about 1/10 of the typing of the other method.
Edit4: running make vimFirst (vimFirst.c is my file) compiles! Running the program with :! vimFirst.exe works as expected. Now returning to the original question, ... type \rc and have the program compile and run...
Check your maps for \rc and \rr:
:map \rc
:map \rr
If no mapping exists, you might have no_plugin_maps or something similar set in your vimrc.
I think you'll get what you want if you set them up like this:
nmap \rc :make %<<CR>
nmap \rr :! %<.exe<CR>
If you're really familiar with Visual Studio and want to use nmake to build your code, you should check out the :compiler option. :compiler msvc will setup your makeprg and errorformat for nmake and Visual Studio's compiler.
I'm not sure what make is currently using to build your code, so I don't know what compiler setting you'd want.

Resources