mingw32-make access denied when building wxWidgets - c++

I get an error when I execute mingw32-make in cmd with the makefile.gcc found in the build\msw folder of the wxWidget decompressed zip. I followed the steps shown in this tutorial video.
The error is:
make (e=5): Acceso denegado.
mingw32-make: [makefile.gcc:5354: clean] Error 5 (ignored)
I tried adding "Everyone" with total control to the security tab in the properties option of the folder in which I had decompressed wxWidgets.
I changed the same option for make.exe file in C:\msys64\mingw64\bin
I read that it could be the antivirus, I'm using Windows Defender, I switched off the real time protection but it didn't change anything.

First of all, this is not a fatal error, as indicated by "(ignored)" at the end, so it's not clear what your actual problem is -- does the library get compiled or not?
Second, to debug problems such as this one, you could use the Process Monitor tool where you can find out accessing which file exactly triggers this error -- this could give you at least some idea. Without knowing it, it's really impossible to know what goes wrong on your machine.

Related

VS Code Error when compiling C++ Program: 'cmd' is not recognized as an internal or external command

I attempted to follow through on VS Code's method on making C++ code work on their editor. I did this successfully on my laptop but when I tried compiling it, I was met with the error:
* Executing task: C/C++: g++.exe build active file
Starting build...
C:\msys64\mingw64\bin\g++.exe -fdiagnostics-color=always -g "C:\Users\salty\Documents\Programming\C++ Scripts\myProgram\main.cpp" -o "C:\Users\salty\Documents\Programming\C++ Scripts\myProgram\main.exe"
'cmd' is not recognized as an internal or external command,
operable program or batch file.
Build finished with error(s).
* The terminal process failed to launch (exit code: -1).
* Terminal will be reused by tasks, press any key to close it.
This is the entire error message plus extra things in my editor.
If I try and copy and paste the command in the message into Windows Power Shell, it actually works (New .exe file appeared in the correct directory and runs without fault).
These are my environment variables for User, and these are my System variables.
I've tried uninstalling and re-installing and changing the paths around. I'm new to C++ programming and how compilers work in general, but I'm not sure why VS Studio says it doesn't recognize cmd among others it could've not recognized.
Why is it giving me this error?
Edit: I believe I didn't include a return 0; line in the program. Correcting this did not fix the issue.
I am not sure what I poked into place or if I just was too incompetent to realize something, however adding %SystemRoot%\system32 to my PSModulePath environment variables somehow fixed the issue, and since that action I have yet to replicate the compile error.
I don't know if adding that variable to my environments permanently fixed it or VS Studio needed a moment to process some things. Thanks anyways!

Trouble building BGFX on Windows w/ MinGW

Trying to build bgfx. Following the documentation for building it, I run make mingw-gcc.
This, originally resulted in Set MINGW environment variable & make.exe": *** [mingw-gcc-debug32] Error 127 so I set the MINGW environment variable, and this got rid of the Set MINGW environment variable message. However, I still get the same error:
make.exe": *** [mingw-gcc-debug32] Error 127, and I also noticed:
C:/(directory to my project)/extern/bgfx/C:/MinGW/msys/1.0/bin/make.exe: No such file or directory. Like the directory to make.exe was being appended onto the end of the directory to bgfx. I'm at a complete loss as to why or even how this is happening, and I've no idea how to fix it. I've tried changing the MINGW environment variable, using mingw32-make, specifying mingw-gcc-release64, etc... To be honest, I don't even know if this is related solely to bgfx or if it's a problem with make or whatever Idk... Shooting my shot here to see if anyone can help.
Thanks.

Building U-Boot is failing

I am trying to build u-boot
Toolchain:
http://web.archive.org/web/20130823131954/http://www.angstrom-distribution.org/toolchains/
U-boot: git.denx.de
I am following this site to build this u-boot
http://beagleboard.org/linux
It says to put cross compiler path before building.
export PATH=/usr/local/angstrom/arm/bin:$PATH
1) I can see angstrom folder in /usr/local. Also I think that we need the toolchain's actual place of binaries. Let suppose in /home/myhome/BBB/angtrom_x_y_z/usr/local/angstrom/arm/bin
So which path actually i should export?
2)I have tried to put both paths, but I am getting errors.
3)I have downloaded three toolchains
angstrom-2011.03-i686-linux-armv5te-linux-gnueabi-toolchain
angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3
angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3
1st gives errors as
CROSS_COMPILE=arm-angstrom-linux-gnueabi- make am335x_evm
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
GEN include/autoconf.mk
arm-angstrom-linux-gnueabi-gcc: 0: No such file or directory
arm-angstrom-linux-gnueabi-gcc: unrecognized option '-G'
cc1: error: unrecognized command line option "-mabicalls"
make[1]: *** [include/autoconf.mk] Error 1
make: *** No rule to make target `am335x_evm'. Stop.
second one is I think for 64 bit processor, I have i386 one, so it also doesn't worked
Third one is corrupted.
Can anybody tell me how to compile it as the site says. Maybe the site is outdated but still if anybody can tell me a straightforward way how to do this.
It looks like Angstorm toolchian is too old to deal with recent U-Boot. I tried your procedure and get other errors. I'm not sure why you try to use that old toolchain and if you have to use it. But I quickly check Linaro toolchain gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux, which I use for boards like Cubietruck and A20-OLinuXino-MICRO and it works fine.
git clone git://git.denx.de/u-boot.git
cd u-boot
export PATH=${PATH}:${PATH_TO_TOOLCHAIN}/gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux/bin
CROSS_COMPILE=arm-linux-gnueabihf- make am335x_evm_defconfig
CROSS_COMPILE=arm-linux-gnueabihf- make -j$(nproc)

Cross compile ActiveMQ for ARM

Disclaimer: I am new here, I've done my best to follow the posting guidelines so please let me know if this needs any extra information. I am also relatively new to Linux development.
Background:
I am in the process of building a library using ActiveMQ-cpp on Linux. I have built and run it successfully on the host Ubuntu PC, but attempting to cross-compile it for the target ARM-based machine is producing some very abstruse errors.
The first step involves building APR (http://apr.apache.org/) using the arm-linux-gcc compiler. After some research, the following command runs the configuration script with little fuss:
CC=/usr/local/arm-linux/bin/arm-linux-gcc ./configure --prefix=/root/apr-arm --host=arm-linux cross_compiling=yes ac_cv_file__dev_zero=no ac_cv_func_setpgrp_void=no apr_cv_tcp_nodelay_with_cork=no apr_cv_process_shared_works=no
This allows the next step - running the makefile.
Current Issue: Entering make on the command line exits prematurely at the following line:
[...]
/root/.local/share/Trash/files/apr-1.5.1/build/mkdir.sh include/private
tools/gen_test_char > include/private/apr)escape_test_char.h
/bin/bash: tools/gen_test_char: cannot execute binary file
make[1]: *** [include/private/apr_escape_test_char.h] Error 126
make[1]: Leaving directory `/root/.local/share/Trash/files/apr-1.5.1'
make: *** [all-recursive] Error 1
Attempted Fixes: A solution to the following question, posted by the asker, has not worked. It is possible that I've not followed the process correctly (Apache Cross Compilation Error ./gen_test_char: cannot execute binary file)
In the same theme, I tried temporarily removing the problem gen_test_char program from its directory but the clever script just rebuilds it.
My aim is to either avoid this error and continue the build process on Ubuntu, or perhaps consider other means of building the library. I have built it with no trouble in VS2013 on Windows, so if it is possible to cross compile that project for ARM architectures I would happily go ahead with that.
APR need gen_test_char to be compiled for system not for arm, why you got "bin/bash: tools/gen_test_char: cannot execute binary file" error because make program is going to execute gen_test_char on your system and if you cross compile then every time you got this error.
To avoid this error please follow below steps:
1) Cross compile APR which is going to fail
2) compile APR for system and copy gen_test_char to cross compiled APR's directory.
3) Again cross compile
After performing above steps you should not get "cannot execute binary file" error.
Cross compile APR which is going to fail
compile APR for system and copy gen_test_char to cross compiled APR's directory.
change the name of gen_test_char to gen_test_char_host
in Makefile file change the name of gen_test_char to gen_test_char_host because make creates it again.
Again cross compile
you may see some struct redefinition which needs to find the file and comment the redefined struct manually.

dev c++ compiler error

i am getting this error at compile (actually this is a very simple project and the syntax is absolutely ok)
E:\proj1\Makefile.win [Build Error] [main.o] Error 1
this is my compiler log (dev c++ v 4.9.9.2)
Compiler: Default compiler
Building Makefile: "E:\proj1\Makefile.win"
Executing make...
make.exe -f "E:\proj1\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
'C:\Users\r' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
make.exe: *** [main.o] Error 1
Execution terminated
my user path is 'c:\Users\r&d', i think the '&' is makeing trouble in compile process , does anybody has any idea ?, i can not reinstall windows because i have got many softwares installed on my current windows and it is very time consuming to me, how can i fix this /
r&d is definitely a problem. Try surrounding it with quotes: "c:\users\r&d" and hope for the best. If it doesn't work, change the folder to something without an ampersand (you don't need to reinstall Windows for that, just create another user).
You can try creating another user without the ampersand, and then copying your profile to it to keep all your settings and application preferences, as well as documents.
You might want to try another build enviroment, like code:blocks which has its own internal build system. You probably want make sure you are using the latest gcc mingw compiler and build system from mingw(use their installer, I think it was http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/ ), and even if you don't go with code::blocks, make sure you are using the new branch of devc++ that was forked and still being developed. One last thing is if you go with code::blocks, use a nightly build in the forum, http://forums.codeblocks.org/index.php/board,20.0.html as they are much more up to date.
The escape character in Windows is ^. So try
C:\Users\r^&d