This question already has answers here:
How to install and use "make" in Windows?
(14 answers)
Closed 2 years ago.
I am downloading a library from the github
/////////////////////
https://github.com/ossrs/srs
///////////////////////////
The steps which i follow are
Create a folder
Run power shell and point to the folder
Git clone the source
The issue i am facing is the Make command in the step 2 of installation
The power shell does not accept the make command , so how do i make the source.
Make is an UNIX command for the UNIX make utility. To compile it on Windows, you can use Visual Studio, by running the Developer Command Prompt for VS, and using Microsoft's version of this tool - nmake: nmake -f Makefile
However, it looks like the configure script in /src of the package can only run on UNIX, so if you want to build this package yourself, it will be easier to use the Windows Subsystem for Linux, which will let you run a Linux environment that supports the commands in the configure file as well as the Make set up.
Method 1:
You can try git clone using the https address of your repository
git clone https://github.com/ossrs/srs.git
This will add a folder to the directory where you did git clone
Method 2:
Download Zip from git repository as shown in the image above
Unzip the files and add it to your project.
You can simply click on the green Code button, then Download ZIP instead of using powershell and git.
Related
I am trying to build python wheels for multiple platforms using cibuildwheel on Github Actions, and I have succeeded with the MacOS and Linux images only after installing/upgrading automake, bison, flex, and swig. After that, to compile the C++ library and build the wheel it is essentially just autoreconf/configure/make/make install/python setup.py bdist_wheel. On the Windows image, I have tried many different things, but I am just too unfamiliar with Windows to make any progress. Chocolatey has winflexbison3 and swig, but does not appear to have autotools available. The Windows image README mentions pacman as a package manager, but I haven't successfully called it because it's not on PATH.
Is it possible to use a POSIX shell script like bash (not cmd or PowerShell) to do the whole build inside of Github's Windows image? If so, how can I install automake/autoconf/bison/flex/swig and then autoreconf/configure/make/make install? Specifically, how do I write the script and how do I call it in the Github Actions yml file?
I want to embed the python script in my c++ Qt application, By searching on the net I found that PythonQt is exactly what I am looking for but when I went to it's github repo there is build description given for windows system but not for ubuntu system so after cloning the repo if I include it's src in my Qt .pro file it gives me output that
Python.h not found, I think the reason is that I didn't build it in my system. Is there anyone who could tell me that how to build PythonQt in ubuntu. The link for their repo is this: https://github.com/MeVisLab/pythonqt
If this didn't work you can also suggest me some other thing which will help me to embed python scripts into my Qt c++ application.
First clone the repo by using the following command
https://github.com/MeVisLab/pythonqt.git
After that cd into the clone folder and execute the below command to build it into your system.
qmake
This command will generate the MakeFile into your current directory run the following command to completely build the PythonQt in your system.
sudo make all
sudo make install
While executing those commands if you get the following error
fatal error: 'private/qmetaobjectbuilder_p.h'
Run the below command to solve this
sudo apt install qtbase5-private-dev
Firstly, I know nothing about C/C++, but I am trying to compile LCI https://github.com/justinmeza/lci under Windows 10 with Visual Studio 2015, but I'm getting the following error:
Cannot open include file: 'getopt.h': No such file or directory.
I see that getopt is not part of Visual C so people are saying you have to implement your own. It looks like this is what I need:
https://github.com/skandhurkat/Getopt-for-Visual-Studio/blob/master/getopt.h
Problem is, I don't really know what to do with this file. I've been reading a fair bit and messing around for ages just to compile lci.exe!
Already emailed the OP about this, but here's the steps I followed in order to build lci successfully. The missing step seemed to be that Justin Meza neglected to mention that you need to install CMake as well in order for the install script to work. CMake will allow you to build C code against the glibc headers.
Install MinGW
Install Python 3.5.1 (or latest Windows version)
Install Git for Windows (if you haven't already)
Make sure to enable Git for the Windows command prompt
Install CMake
Add MinGW and Python to your PATH environment variable. I'd double check that your paths to the executables are correct, mine looked like this:
C:\Program Files\mingw-w64\mingw64\bin
C:\Users{username}\AppData\Local\Programs\Python\Python35-32
Run a command prompt as administrator, and go to your Documents folder and clone the lci repository (if you haven't already):
git clone https://github.com/justinmeza/lci.git
Go into the lci directory, and run:
install.py --prefix="C:/Program Files/lci"
Add lci to you PATH, if using the default location add this to the end of your PATH:
C:\Program Files\lci\bin
I would have included some links to the various programs above in steps 1-4 but apparently I don't have enough reputation on StackOverflow for that...you should be able to find them easily enough in a quick Google search.
You should now be able to run lci from any command prompt. A good test would be to run the "HAI WORLD" code at lolcode.org.
Just copy getopt.h to the directory where .c files are, so the compiler can find it.
Based on the linked source code and it's contents, the project you're trying to build appears to be written for Linux. It might be possible to sufficiently rewrite it to be able to compile under Microsoft Windows, and Microsoft's compiler; or perhaps install something like MinGW.
However, given your stated lack of development experience, this does not appear to be something that you could easily handle on your own.
I downloaded the sdk (3.0a1). According to cocos2d-x guide, I have to run the create-multi-platform-projects.py command in order to create a project, but the script doesn't exist in the package I have downloaded.
The guide says
Note: These instructions are only valid for cocos2d-x v3.0-alpha0 or newer
So I suppose that I have downloaded the right package (windows 8.0 64bit).
The script has been moved to tools/project-creator/ and renamed to create_project.py. You can use the script the same way like
./create_project.py -p MyGame123 -k com.MyCompany.AwesomeGame -l cpp
I'm using GCC on Windows 7 (using the TDM's build). I installed MSYS to be able to execute Make and compile using makefiles. However, it is tedious to every time start up the MSYS Bash shell, navigate to the directory of the project and run make.
What I want is to automate this process. I prefer to have a batch file in Windows, or something similar, from which I then invoke the MSYS Bash shell. It should navigate to the directory the batch file resides in and call make.
Is this possible? Can I send commands to MSYS Bash from cmd (like navigation/invoking make)? Or can I let the MSYS Bash run a "Bash script", which sets the commands to be executed much like batch scripts?
PS: This is something similar to Stack Overflow question Executing MSYS from cmd.exe with arguments.
Not an MSYS expert, but does something like this work for you:
rem Call this something like compile-project.bat
c:
cd \src\project
bash -c "make"
You don't have to use bash to execute make, or any of the other MSYS programs. If you put the MSYS bin directory on your path, you can execute them from a Windows command shell. Alternatively, the bash shell has an enormously powerful scripting language built in. But I'm not clear if that's what you are asking about - you should clarify your question with an actual example of what you want to do, spelling out the steps you want automated.
My own setup is to have a Windows Explorer context menu called "Bash here" which opens a bash shell in the directory I select. This is done via the following registry entries:
[HKEY_CLASSES_ROOT\Directory\shell\mybash]
#="Bash Here"
[HKEY_CLASSES_ROOT\Directory\shell\mybash\command]
#="cmd /c c:\\bash.cmd %1"
And the following bash.cmd file in c::
#echo off
title bash
cd %1%
bash
Note that the MSYS bin directory is on my path. And of course, any registry hacking is at your own risk.
Just add executables to your Windows PATH:
C:\msys64\mingw64\bin
C:\msys64\usr\bin
Keep in mind, this adds a lot of executables to your path which might conflict with other applications. The ..\usr\bin directory contains all installed MSYS2 packages. There is a lot of unnecessary stuff. ..mingw64\bin directory has a smaller list.
Source
On my MSYS-1.0.11 with the MSYS developers packages, I can call a bash script (CurrentScript.sh) with a cmd/bat file in the current folder with this command:
R:\MinGW\MSYS-1.0.11\bin\sh "%cd%\CurrentScript.sh"