mingw32-g++.exe: error: (invalid): No such file or directory - c++

--- Not a useful topic --- Problem occurred in project...
I viewed this page: mingw32-g++.exe: error: CreateProcess: No such file or directory
I installed MinGW(32) first, and installed MinGW64 (by mingw-builds).
And this error occurred. I know i installed EGCS(64bit MinGW).
I tried to uninstall(by wizard) and reboot but i still can't build in C::B.
And i now uninstalled mingw(the original version) and installed TDM-GCC-32 and 64.
The configure is not wrong, and the files is correct.
My %Path%:
PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program File
s (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Window
s;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Progra
m Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\sy
swow64;C:\Program Files (x86)\Windows Live\Shared;depot_tools;C:\Program Files (
x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Microsoft SQL Server\110\Too
ls\Binn\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program File
s (x86)\NArrange 0.2.9\;C:\TDM-GCC-64\bin;C:\TDM-GCC-32\bin

I'm going to assume from your above comment that the mingw toolchain you installed on your machine is working properly. The next thing you need to verify is that code::blocks is looking in the right place for that install.
To do this goto Settings->Compiler. This brings up the "Global compiler settings" window. Click on the "Toolchain executables" tab. You should see something like the following:
Check that the "Compiler's installation directory" has the correct path for your mingw install. Also check and make sure the various fields below point to the correct compiler executable name.

Your global variable setup is incorrect for cb_release_type. It is (invalid) in base field.
You need to re-point the base to some other useful directory.
For example i put c:\codeblocks\src\bin and compilation started
Thanks

Related

MSBUuild is looking for "...\v4.0\V110\Microsoft.Cpp.Default.props" when we have ".../\v4.0\V140\Microsoft.Cpp.Default.props"

While building the project "Common.vcxproj", We are getting Error message : error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
The machine has the tool installed at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Default.props" , but the .vcxproj is looking for "V110" folder.
In the Project file ""
and We have registry key = "VCTargetsPath" and value = $([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V140\'))
Question is why the MSBUuild is looking for "...\v4.0\V110\Microsoft.Cpp.Default.props" when we have ".../\v4.0\V140\Microsoft.Cpp.Default.props"?
Thanks
Question is why the MSBUuild is looking for
"...\v4.0\V110\Microsoft.Cpp.Default.props" when we have
".../\v4.0\V140\Microsoft.Cpp.Default.props"?
Please try these:
1) please check register editor and enter both HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild\ToolsVersions\14.0 and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 and then make sure that it uses v140's path as this link shows.
2) Right-click on your project in VS 2015 IDE-->Properties-->Configuration Properties-->General-->change Platform Toolset to v140.
3) Also, check whether you define any VCTargetPath under Project Properties(right-click on your project)-->xxxxx-->Command Line
4) Run npm install -g --production windows-build-tools in Powershell as administrator
5) If these does not work, please go back to step one, and then change VCTargetsPath to C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\ directly.
Or run [Environment]::SetEnvironmentVariable("VCTargetsPath", "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140", "Machine") in powershell.
Hope these could help you.

Sublime Text 2 Wants to Only Build Using Java

For some reason, if I try to run and build a .py .cpp .tex or etc and I try to build any file it tries to run java and returns an error like this:
[Error 2] The system cannot find the file specified
[cmd: [u'javac', u'C:\\Users\\name\\Documents\\evolve1\\case0\\herp.cpp']]
[dir: C:\Users\name\Documents\evolve1\case0]
[path: C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\ImageMagick-6.8.9-Q16;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime Alternative\QTSystem;C:\Program Files\MATLAB\R2012b\runtime\win64;C:\Program Files\MATLAB\R2012b\bin;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\WinMerge;C:\Python27\;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Avogadro\bin]
[Finished]
This is weird on multiple levels, but I'm primarily concerned with getting it to stop building with Java (which I never use anyways) and im a tad confused about why its looking in that particular dir in the third line considering I never even ran code in there.
Select Tools -> Build System -> Automatic, and Sublime should pick the correct build system depending on the syntax of the source file. For example, when editing a .py file, after saving and hitting CtrlB, you should build with Python. If for some reason that doesn't work, just select your desired build system before you build.

Compilation issue with '.cu file'

I am trying compile a ".cu" file on Windows 8 but getting the following error:
nvcc fatal: Can not find compiler 'cl.exe' in PATH
I tried adding "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin" in PATH variable but it did not help. Any solution/suggestions?
Instead of manually modifying the PATH environment variable, you can execute a batch script "vsvars32.bat" located in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools" directory. This script sets all the environment variables correctly.

c1010070: Failed to load and parse the manifest

I have an existing wxWidgets project which I am trying to compile under Visual Studio 2010 (the project was created probably with older version of Visual Studio - could be even VS2003). I compiled wxWidgets library (also included paths in my project). When compiling my project now, I get this error:
1>------ Build started: Project: Terminals, Configuration: Debug Win32 ------
1>Build started 8/24/2015 10:56:23 AM.
1>InitializeBuildStatus:
1> Touching "Debug\Terminals.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1>ResourceCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>Link:
1> All outputs are up-to-date.
1>Manifest:
1>
1>wx\msw\wx.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the path specified.
1>
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.59
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can someone help?
This happens if your project's path has a space in it, for example in my case the project is within my Windows account, so the path begins with "C:\Users\Adam Reece...". I then get "C:\Users\Adam" within a "cannot find" like error when building the manifest.
This is 100% a bug with Visual Studio recently of which Microsoft refuses to recognise. You are not in the wrong for having a space in your path as it's been supported since Windows 95. However as a workaround you either need to make sure there are no spaces in the full path to your project, or disable generation of the manifest. (Project properties -> Linker -> Manifest File -> Generate Manifest -> Change to No (/MANIFEST:NO).)
Based on your description, I suggest you to validate your manifest file and make sure it is correct. You can use Manifestchk.vbs or “ mt.exe -manifest 1.manifest -validate_manifest “.
Moreover, from your error message, you need make sure the complier can find your manifest file configure your configuration correctly.
Go to “Configuration Properties -> Linker -> Manifest File”; turn the
“Generate Manifest” to “No”.
Go to “Configuration Properties -> Manifest Tool “; add your manifest
file path, like: (give mainfest file name like “f:/xxxx.manifest”) to
“Additional Manifest Files”; and turn the “Embed Manifest” to “No”.
Eventually, rebuild again.
If you have any more questions, please feel free to let me know.
This error message always happen when Visual Studio could not find the file. There are some potential causes:
Numbers or spaces in the project name
Project name too long
Started creating the project from a blank project that doesn't have
all of the parts.
I'd suggest trying each of the following to see if it fixes the issue- but backup your project/solution directory first.
A) Clean and rebuild the solution
B) Right click on the solution for the project (in Solution Explorer) and rename the solution to a very simple name (e.g., soln). Then do the same for the project (e.g., rename to proj). Do a rebuild all and see if the problem goes away. If it does you can rename the solution and project to something more meaningful.
C) Right click on the project and open it's properties. Go To Link | Manifest and turn off use of the manifest. Rebuild.
D) Create a new Win32 console project. Have Visual Studio create the initial CPP and .H files you need. Open your old source files and copy the code from those into the new files. Rebuild the new project.
I had the same problem and found the solution that DOES NOT require creating a new user profile...
Yes, it is caused by spaces in usernames. But why? Because mt.exe uses TEMP/TMP environment variables. On one of my machines, the username was with the old 8.3 format in TEMP (C:\users\gerson~1) and that worked. This gave me a hint as to how to adress the problem:
set your users' TEMP to some folder that has no spaces
set your users' TMP to some folder that has no spaces
Ensure you restart VS so that the settings changes take effect. Your build should work now ;)
I had this error together with msb3073. I solved the issue by modifying the project's vcxproj file, changing from:
<PostBuildEvent>
<Command>mt.exe -manifest DesignedForWindows7.manifest -i [...]
</Command>
</PostBuildEvent>
to
<AfterBuildEvent>
<Command>mt.exe -manifest DesignedForWindows7.manifest -i [...]
</Command>
</AfterBuildEvent>
where, in place of [...], there is some command line code that I just copied-pasted.
Be careful that there might be more than one such code block in the vcxproj file
UPDATE 02/07/21: Found a solution for Win10.0..... SDK
https://stackoverflow.com/a/49276285/16360714
I got c1010070: Failed to load and parse the manifest
because my Windows User Profile had a space in it e.g. C:\Users\ John Doe\ and I was trying to use UE4 with C++ and Visual Studio 2017, Win 8.1 SDK
FINAL SOLUTION AT END
Solution 0: CHange TMP and TEMP Windows environment variables to folders with no space. This could break other programs. I kept it changed though while trying other solutions.
Solution 1: Exclude C\User\John Doe ... folders from the project
Solution 2: Try to change your Windows Profile Folder Name (tutorials on YouTube)
Solution 3: Create a new Windows local account with no whitespace and use it for dev
Solution 1 Explanation
If you are using UE4, Makefile will be your Project Configuration default. So you won't have access to Linker or Manifest Tool Settings.
I was getting the following errors when building:
Severity Code Description Project File Line Suppression State
Error c1010070 Failed to load and parse the manifest. The system cannot find the file specified. VirtuPilotv3 C:\Users\John
Severity Code Description Project File Line Suppression State
Error LNK1327 failure during running mt.exe VirtuPilotv3 K:\VRDEVELOPMENT\Virtu-Pilot\Intermediate\ProjectFiles\LINK 1
1
Severity Code Description Project File Line Suppression State
Error MSB3073 The command "K:\VRDEVELOPMENT\UE_4.26\Engine\Build\BatchFiles\Build.bat VirtuPilotv3Editor Win64 Development -Project="K:\VRDEVELOPMENT\Virtu-Pilot\VirtuPilotv3.uproject" -WaitMutex -FromMsBuild" exited with code 6. VirtuPilotv3 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44
I noticed the Macro $(PATH) in Property Page>General>Executable Directories contained a C:\ Users folder path "C:\Users\John Doe.dotnet\tools" to be specific.
So I added the .dotnet folder to my exclude directories and BINGO! I could build and open the editor. [1 VISUAL STUDIO WARNING]
Discovered C:\Users\John Doe.dotnet\tools is found under Windows "path"Environment Path Variables Image variable
I'll probably make a copy of the .dotnet folder to something like C:\VisualStudioCustom and add that folder as Windows Path New .dotnet folder set as path. This Should Solve the problem for all projects. As the new folder will automatically get added to Visual Studios Macro $(PATH). [IT ACTUALLY WORKED, NO VS ERRORS]

binary_log_types.h: No such file or directory

I was compiling a small mysql C project and
got stuck with the below error :
C:\Program Files (x86)\MySQL\MySQL Server 5.7\include/mysql_com.h:22:30: fatal error: binary_log_types.h: No such file or directory.
I did a dir binary_log_types.h /b /s at C: drive but i didn't find any binary_log_types.h file as such.
What is a possible workaround?
After a bit of research I figured out that for some reason the two files binary_log_funcs.h and binary_log_types.h are missing from the mysql 5.7 community installer installation.
Fix :
1) Download the MySQL Server Source code from the MySQL Site.
2) Extract the the tar archive. ( I used Winrar for this)
3) Goto Your\Download\Location\Here\mysql-5.7.7-rc\mysql-5.7.7-rc\libbinlogevents\export\
4) Copy the binary_log_funcs.h and binary_log_types.h from this folder and
paste them in Path\to\your\mysql\server\include.
5) Rebuild the Code::Blocks application.
Note : Make sure that Code::Blocks has the permission to access the the files and folders in the C: directory. Also, this could be a temporary fix as I strongly feel that I didn't do a complete mysql installation which should automatically include these files. Anyway I am temporarily happy :)
Just confirmed the existence of this bug in MySQL 5.7.9 (64bit) as well:
C:\Program Files\MySQL\MySQL Server 5.7\include\mysql_com.h(22): fatal error C1083: Cannot open include file: 'binary_log_types.h': No such file or directory`
I got this error message while compiling in Visual Studio 2013 Update 5, code based on communication with MySQL to store data in a database.
My solution is a variant of sjsam's own answer. Go to the GitHub MySQL repository and open this folder/directory:
https://github.com/mysql/mysql-server/blob/5.7/libbinlogevents/export/ :
There are 2 files in that folder:
binary_log_funcs.h
binary_log_types.h
Save the 2 files to your own computer by using the file links (or copy the text from the file contents, then save the text to straight text files with the same names as the originals), then put both files in your MySQL Server 5.7\include\ folder. Depending on your configuration, this can be one of these 2:
C:\Program Files\MySQL\MySQL Server 5.7\include\
C:\Program Files (x86)\MySQL\MySQL Server 5.7\include\
Congratulations, you have now solved your issue. But I am wondering why the developers at mysql.com haven't added those 2 files to the MySQL Community Server 5.7.9 installer package...
the following statement, from: http://dev.mysql.com/doc/refman/5.6/en/binary-log.html
indicates the mysql server must be started with the right parameter
for the log to exist.
"To enable the binary log, start the server with the --log-bin[=base_name] option. If no base_name value is given, the default name is the value of the pid-file option (which by default is the name of host machine) followed by -bin. If the basename is given, the server writes the file in the data directory unless the basename is given with a leading absolute path name to specify a different directory. It is recommended that you specify a basename explicitly rather than using the default of the host name; see Section B.5.8, “Known Issues in MySQL”, for the reason. "
There is lots of related info at that same web page.