No premake script(premake5.lua) found error - visual-studio

This is my first posted question so sorry for any mistakes I make. I recently was trying to setup Box2D on visual studio 2017 and I was told that you must use premake5 to first create the sample project and then you can begin using Box2D. The problem is that when I call premake5 vs2017 Downloads/Box2D-master/Box2D-master/Box2/premake5.lua in command prompt (I have also tried with vs2015 and vs2013 ), the program throws an error No Premake script (premake5.lua) found!. I have triple checked file paths but nothing seems to be working. Do you have any ideas?

This worked for me:
$ git clone https://github.com/erincatto/Box2D.git
$ cd Box2D/Box2D
$ premake5 vs2017

Related

ninja: error: loading 'build.ninja': The system cannot find the file specified. when build hello world in Visual studio

I have followed esp-idf guideline to install and test to build the hello world and blink sample code but both the code met this problem.
Visual studio try to build hello world
> Executing task: ninja <
ninja: error: loading 'build.ninja': The system cannot find the file specified.
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.
I have tested all the ways I can find to fix it but I'm not sure anything I missed or not.
This is one of the way that I test but also met some problem.
cmd try to run the command below
C:\Espressif\frameworks\esp-idf-v4.4>python -m pip install --user -r %IDF_PATH%/requirements.txt
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
This possible problem is the python environment is exist so I cannot do this command, but I try many ways to disabled or deactivated it still cannot.
python path
system environment
After trying to debug this for a long time, I made a backup copy of the entire project folder, then just went hog-wild deleting files. I deleted almost every file I didn't author. Only left the main/CMakeLists.txt, main/component.mk, main/main.c, main/main.h, .gitignore, CMakeLists.txt, and Makefile. Then I ran idf.py set-target esp32 and idf.py -p /dev/ttyACM0 flash monitor and it worked fine again.
VS Code & ESP-IDF on Ubuntu 20.04.05 LTS
Check if the compiler is properly selected. If you don't select a proper c/c++ compiler, then you might get this error. I had mingw in my system, but vs code did not auto detect the compiler. Then I manually added mingw and selected it for compilation after which this issue was resolved.
What worked for me after updating to the new stable release (v5.0) was
Go to the folder S:\esp\esp-idf\esp-idf-v5.0
Run command prompt at this directory and execute install.bat and later export.bat
After trying to build the program in VSCode the error "ninja: error: loading 'build.ninja'" shows up.
Update the path in the ESP-IDF extension in VSCode using ESP-IDF:Configure Paths
locate your project folder e.g. "V:\simpleTest_using_EspIDF_v5_0"
Open command prompt and execute: idf.py build
Now it builds also in VSCode using the Espressif IDF extension.
You not have a build.ninja file. Find this file on proje

Cannot build cocos2d-x 4.0 cpp-test

Im just starting with cocos2d-x. I start by following the guide here. https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/Windows.html
Regarding prerequisites:
Windows 7+ - have windows 10
VS 2017+ - have visual studio 2019
CMake 3.1+ - installed latest
Python 2.7.5+, Python 2.7.10 reccomended , NOT Python 3+ - installed Python 2.7.10
Downloaded Cocos2dx v4 from github repo.
I run this command
python setup.py
https://i.imgur.com/td7Yo8c.png
Then i run this command
cd COCOS2DX/tests/cpp-tests
mkdir win32-build
cd win32-build
cmake ..
Then I rebuild the generated solution and get this error.
https://i.imgur.com/bZ8QUZF.png
Please advise.
Thanks.
use cmake .. -G"Visual Studio 16 2019" -Tv142 -A Win32
I can't quite make out details in picture, but you have failure accessing the Cocos library.
I got Cocos2d-x 3.17.2 working on VS2017 for cpp-test on Win10.
The generated Win32 solution for some reason did not include the cocos library.
I had to manually include libcocos2d, librecast, and libSpine projects in solution, fix dependencies and add libcocos2d resource to cpp-test project to make it compile.
As an aside, I am finding the test code quite helpful for showing how to accomplish things - just find a test doing what you are trying to do, and examine / step through the code to see how.
If you still have problems, perhaps ask for help on the Cocos2d-x forum:
https://discuss.cocos2d-x.org/

Cannot generate solution file of v8 with gyp for visual studio 2013

This is really painful.
I followed the instruction from https://github.com/v8/v8/wiki/Building%20with%20Gyp.
fetch v8
cd v8
And when fetching is finished,
set DEPOT_TOOLSPWIN_TOOLCHAIN=0
Instruction said to use command "python build\gyp_v8" but obviously, my v8 clone does not have "build\gyv_v8" file. I googled about this, And found gyp_v8 is in that "gypfiles" folder, not in "build" folder. So command I used was
python gypfiles\gyp_v8
It seemed like working at first. cmd put out the response "Updating projects from gyp files...". No warning or error. But nothing happens!
I think it should generate solution file for my VS. But even after process is finished, no solution file was found.
Am I missing something?
Im almost dying for this. T-T
Please, help me.
Try setting this environment variable before running GYP:
set GYP_GENERATORS=msvs
Then, after running GYP, do a recursive search for .sln files in your V8 directory :)
It seems the google is using a new build system instead of gyp. It is called "gn" and i could generate the Visual Studio solution by executing following code in the v8 directory:
gn gen --ide=vs out/Default
The all.sln is then located in .\v8\out\Default\
Source: http://dev.chromium.org/developers/how-tos/get-the-code

MAC command git-tf not Found

Hello all.
I search a lot but nothing really help.
I'm using xcode 5 to develop IOS app, with Team Foundation Server 2013 via git repository. For the first 2 projects all was fine with git-tf commands series. But after that it gives me git-tf command not found ,it's somehow weird to stop working suddenly.
Any help will be appreciated
-bash: git-tf: command not found
You might search for any git-tf contents in your filesystem using:
sudo find / -name git-tf
Prepend sudo to avoid warnings about unsearchable folders. If git-tf can't be found you may decide to reinstall it, following the instructions on the project-page.
Otherwise you should check your $PATH-variable - as mentioned on the git-tf-instructions.

How to build wxWidgets 2.9.1 with Visual Studio 2010?

I have a freshly downloaded Visual Studio C++ 2010 Express and wxWidgets 2.9.1. The build folder under wx\build\msw has solution files for VC++ versions 6 through 9 (2008).
I tried to open the latest solution, wx_vc9.sln. It converted all the projects with a bunch of warnings. When I try to build every project gets the error:
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB6001: Invalid command line
switch for "cmd.exe". The path is not
of a legal form.
Trying to open the previous version of the solution, wx_vc8.sln, generates the same conversion warnings and the same build errors.
I Googled for some hints and found a suggestion to start with the .dsw file. I opened wx.dsw and it generated an error for each of the project files:
D:\3rdParty\wx\build\msw\wx_wxregex.dsp
: error : Project upgrade failed.
Finally in desperation I tried nmake /f makefile.vc and was greeted with yet another error:
NMAKE : fatal error U1077: 'cl' :
return code '0xc0000135'
Anybody have any hints? Thanks.
There are two ways of solving this, firstly if you update to a more recent version of the wxWidgets SVN trunk this is fixed (and so it will be fixed in 2.9.2 when it is released). If you don't want to work from trunk of wait for 2.9.2 then if you do a find and replace over all .vcxproj files and replace
>$(INTDIR) $(OUTDIR);%(AdditionalInputs)
with
>%(FullPath);%(AdditionalInputs)
it should then compile fine.
For future reference, trust me people, avoid all nonsense and start up your Visual Studio 2010 Command Prompt and navigate to [wxwidgets directory]\build\msw
Then compile using the makefile with the following command :
nmake -f makefile.vc BUILD=release MONOLITHIC=0 SHARED=0 UNICODE=1
Of course change the options as needed.
You will be saving a lot of trouble this way, this is the way I did.
The Key to Compilation using Visual C++ 2010 Express and wxWidgets 2.9.3 is to keep Pressing F7 Again-and-Again-and-again.... till you you get '0 Failed' Message below. Because many Projects have dependencies which are not satisfied immediately, so it is necessary to keep compiling with 'F7' till all are satisfied.
Download wxWidgets. I downloaded the .7-Zip File (only 12 MB ! ), and installed it at C:\wxWidgets The Structure should be like so that you see the following Folders like C:\wxWidgets\lib and C:\wxWidgets\build etc etc...
Basically the process should be to go to C:\wxWidgets\build\msw , and open wx_vc9 Solution File for VC-2008, and convert it to VC-2010 when asked. Then Choose 'DLL-Release Win32' on Top, and Press F7. Wait for Compilation to take place and see the Message. Then keep Pressing F7 again and again till you get '0 Failed' Message below. Then you would want to Compile 'DLL-Debug' Release in the same manner.
The compiled DLL Files can then be found at C:\wxWidgets\lib\vc_dll. Now, To Add vc_dll Folder to your PATH, Right-Click on My-Computer -> Properties -> Advanced System Settings -> Environment-Variables -> User-Variables. Search for 'Path' -> 'Edit', and then Just Append ;C:\wxWidgets\lib\vc_dll to the End.
This makes running your compiled Application easier, as your .EXE can now easily find DLLs.
When you are packaging, then you obviously need to bundle specific Release-DLL'S along.
Then you can compile the Samples located at C:\wxWidgets\samples.
I just go to individual Project Folder, like for e.g. C:\wxWidgets\samples\drawing, and Open drawing_vc9 Project, then Convert it as Prompted, and then hit F7 to create Release Version. Now if you go inside C:\wxWidgets\samples\drawing\vc_mswudll\ Folder, you have your 'drawing.exe' ready-to-be-run !
Have fun !
Use the wx.dsw, took me a while to finally get it but it'll build fine after that. I also suggest using one of the sample projects such as 'minimal' as the base and just fix all the config paths to match what you want to build (as manually setting up I encountered issues).
If you already used the wx_vc9 (like you said you did) you are probably best off just deleting all of wx and restarting with it and using wx.dsw like I said above.

Resources