"gcc" command refers to "perl" - perl

Platform: Windows 7 64 bit
Hi all,
I want to compile with gcc. So I have added the path to the gcc binary to the PATH environment variables. Whenever I type gcc in the command prompt, I wish to see something like "no input file specified" (from gcc itself). But instead I get the message "perl is not recognzied".
To cut short, when I type gcc in the command prompt it refers to perl for some reason. I have check all environment variables, and there is nothing that points to perl...
I have rebooted for several times already, without success.
It is not much of a problem to use the full path to gcc when I want to compile just a single file. But when I use make it does not work. Because make uses the gcc command again. Which then refers to "perl".
Any suggestions?
Thanks in advance.

How odd.
Try:
set CC=x:\path\to\gcc
make ...
(See http://www.gnu.org/s/hello/manual/make/Implicit-Variables.html.)

Don't use make on Windows. Use dmake -- available at: http://search.cpan.org/dist/dmake/
make on MinGW(32|64) is somewhat broken at the best of times. Windows Perl's are usually built with dmake (or nmake if you are using Visual C++).

Related

How to install Coq

I have been installing Coq using the download links from the https://coq.inria.fr/ for both Windows and Mac. However, when I try coqc or coqtop on terminal or command prompt I get error messages saying that the command is not found. Although with that being said, I can still run Coq almost perfectly fine on the Coq IDE but when I compile buffer, in particularly the exercises from Software Foundations, i get the following message.
Running: coqc -I '/Users/zhangsheng/Desktop/G/repos/Coqy/cis500' '/Users/zhangsheng/Desktop/G/repos/Coqy/cis500/Basics.v' 2>&1
From what I understand, 2>&1 seems to be some form of misdirection and I feel that is the reason why coqc and coqtop don't seem to work on my terminal/command prompt.
Could someone kindly suggest the 'best' way to install Coq on either Mac or Windows or both such that I don't get the problems I mentioned above?
Although I am not a Windows or OSX user, I imagine that you're having this problem because the Coq installer does not update the system's PATH variable. This variable is a list of directories used by the terminal to look up the programs corresponding to commands you type. If you don't want to install Coq via a different method, you should probably find where the coqc and coqtop binaries are installed, and add these directories to your PATH. Here are a few references on how to do this: OSX, Windows.

compile qt code using gcc in ubuntu

I am new with Linux. I want to compile my code which written in qt creator using gcc in terminal. I don't know how should I do this task. the output will be called in Matlab. please give me information in this area. I search through the internet but i didn't find useful information to solve my problem.
Thanks
In QT Creator select "New project" -> Non-QT project -> plain C or C++ application, you can then edit your source in QT Creator, go to a Terminal & compile it using gcc or make your own makefile. From the Matlab instructions "The exclamation point character (!) sometimes called bang, is a shell escape. The character indicates that the rest of the input line is a command to the operating system. Use it to invoke utilities or call other executable programs without quitting MATLABĀ®".

Cannot run any Perl scripts on Windows 8.1

I installed Active Perl 5.20
and also Strawberry Perl 5.20 after uninstalling Active Perl.
In both cases, when I open cmd and type 'perl' I get:
Unknown Unicode option letter ':'.
This error also prevents all scripts from running on my Windows 8.1 installation.
I uninstalled Perl and did a fresh install and it still doesn't work.
Are there dependencies that I need to install?
I googled the error but the results pertain to Linux installations where the script specified something wrong. But I get this error when I even try to use any perl command line or script. So my problem is not a faulty script.
That is the error message you get from using an invalid value for the -C command-line option. At a guess I'd say you have the PERL_UNICODE environment variable set to a string that contains a colon :.
Take a look at Command Switches in perldoc perlrun for more detail on this.
I too had this problem on windows 8.1 . The problem is that, once on installation, .pl files are not automatically recognized by Perl engine. So please select a .pl file and right click and say open with and set the default program to C\perl\bin\ inside it click perl.exe and recognize it. Once this is done your perl works flawlessly.

Vim plugin does not recognize existing Perl support

I've been using the CoqIDE plugin for Vim on Linux machines for editing Coq files. Now I'm trying to install it on Windows 8. But when I try to source the plugin, I get
Your vim doesn't support Perl. Install it before using CoqIDE mode.
which is strange, because with :version I clearly see +perl/dyn included. Is this different from the +perl that I need?
I heard somewhere that you need to have Perl installed before Vim to get a Perl-enabled Vim, so I tried that as well. I uninstalled Vim, installed Strawberry Perl 5.18.2.2 (64bit), and reinstalled Vim. Still the same problem.
If the solution involves manually compiling binaries, I would really appreciate detailed instructions as I don't have any experience with it.
+perl/dyn just specifies that Vim has been compiled with dynamic Perl support; it doesn't yet check that the Perl library can be loaded successfully. To do that, try executing a Perl command, e.g.:
:perl VIM::Msg("Hello")
This probably yields on your system:
E370: Could not load library perl510.dll
Sorry, this command is disabled: the Perl library could not be loaded.
Next, you'd then have to investigate whether a proper Perl version has been installed and the DLL is accessible (though the PATH).
Download DWIMPerl for windows. I'm running win7 64 and gvim 7.4.2. Using strawberryperl and activeperl resulted in :echo has('perl') to yield 0. By switching to DWIMPerl (and ensuring my PATH env variables are proper) :echo has('perl') now yields 1 using the standard gvim distribution. This is important for vim extensions like dbext which require proper support for perl interfaces.

How do I get eshell working correctly in emacs?

For some reason, when I type in commands I'm used to on linux, it works perfectly, as it does in bash... But in eshell, it doesn't work.
I've narrowed the problem to a trivial and small sample, as follows:
$ du
c:/Program: command not found
$ which bash
c:/Program Files (x86)/Git/bin/bash.exe
How do I get this working? (du is whatever it is by default... It's implemented in elisp, I haven't made any unusual changes there, that is, it's a compiled lisp function in `em-unix.el')
I would've expected something along the lines of "You have used 1.3 GiB of disk space", rather than that command not found error.
It doesn't use bash.exe, but it can use du.exe, when present.
On my system:
c: gutov $ which bash.exe
which: no bash.exe in ...
c: gutov $ which du.exe
h:/Apps/System/gnuwin32/bin/du.exe
From your error message I can tell that it calls some command and fails because it doesn't properly quote the path to executable (which contains spaces). Maybe you should do M-x report-emacs-bug.
Overall, I recommend:
1) Uninstall Git and reinstall it selecting the second option when asked about your PATH environment ("Run Git from the Windows Command Prompt"). This will remove the unix tools packaged with it from PATH.
2) Install in some directory without spaces and add to PATH unix tools from GnuWin32 project, or from Eli Zaretski's ports. The latter contains fewer packages overall, but it has a much faster find, for example. You can mix them.
Alternatively, maybe you can get away with just reinstalling Git into directory without spaces.