Tag Archives: gcc

Workaround: windowserror: [error 193]% 1 is not a valid Win32 Application

WindowsError: [Error 193] %1 is not an valid Win32 application

Specific solutions:

This is because your computer is 64-bit

But your file is 32-bit, so you have this conflict

By this point, you should know that you have deleted the 32-bit Python download

There’s a similar answer on StackOverflow, you can click on it and see

Python Download interface portal, click to access

Python3 is best downloaded

Python 3.5.4 rc1-2017-07-25
Download Windows x86 executable installer

Python2 is best downloaded

Python 2.7.14 rc1-2017-08-27
Download Windows x86 MSI installer

Afterword.
Finally, the old formula, publicity a wave of their own public number! (Attention!)
I in the big house, welcome everyone to pay attention, please sweep the following two-dimensional code (‘ ▽ ‘ ‘”)

If you feel helpful, you can scan the code, praise and encourage! Thank you very much!

Solution windowserror: [error 193]% 1 is not a valid Win32 Application

WindowsError: [Error 193] %1 is not an valid Win32 application

Specific solutions:

This is because your computer is 64-bit

But your file is 32-bit, so you have this conflict

By this point, you should know that you have deleted the 32-bit Python download

There’s a similar answer on StackOverflow, you can click on it and see

Python Download interface portal, click to access

Python3 is best downloaded

Python 3.5.4 rc1-2017-07-25
Download Windows x86 executable installer

Python2 is best downloaded

Python 2.7.14 rc1-2017-08-27
Download Windows x86 MSI installer

Afterword.
Finally, the old formula, publicity a wave of their own public number! (Attention!)
I in the big house, welcome everyone to pay attention, please sweep the following two-dimensional code (‘ ▽ ‘ ‘”)

If you feel helpful, you can scan the code, praise and encourage! Thank you very much!

Error: unrecognized command line option “-std=c++11”, to solve the problem that ubuntu does not support c++11

The cause of this compilation error is not high enough in the g++ GCC version.
Add the source

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test

$ sudo apt-get update

Install version 4.8

$ sudo apt-get install gcc-4.8 g++-4.8

View the local installation version

$ ls -lh /usr/bin/g++*

You should see that 4.6 and 4.8 are shipped.
Switch version

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8

$ sudo update-alternatives --config gcc

here select version 4.8 serial number
Check the g++ version again

$ g++ --version

Confirm that the current version is 4.8, the problem has been solved!
From: http://my.oschina.net/chenyoca/blog/226455

Solution to stray’\357′ in program when gcc is compiled

Link: http://blog.chinaunix.net/uid-23089249-id-61541.html

I got a few header files from my colleagues. It’s ok to compile with GCC, but a whole bunch of them came up when I compiled with ARM-Linux-gcc!

SerialPort.h:1: error: stray ‘\357’ in program

SerialPort.h:1: error: stray ‘\273’ in program

SerialPort.h:1: error: stray ‘\277’ in program

Look at these errors confused, after looking up the Internet, found that some characters in the file compiler does not support. If you look for these characters one by one, you’ll probably be looking for a long time! The simplest solution:
Put the files into The Windows system, use “Notepad” to open these files, and then “save as”, choose the code ASNI, and then under Linux to re-compile with the compiler, generally can pass!

Experience:

The first time: unknown;

Second time: when compiling QT program, prompt this error; According to the above method solved.

launch failed.Binary Not found in Linux / Ubuntu solution

launch failed.Binary not found the solution:

first of all when you’re confused about mingw solutions online, I’ll tell you to stop reading about mingw. Under Linux, mingw is not used, but

is directly completed by Linux GCC

1, look at your Eclipse Console output, if there is g++ not found, it means your system g++ did not install successfully.

Solution: Ctrl+Alt+t to terminal (console) mode, enter sudo apt-get install g++

2, not yet?

Project-> Properties-> C/C++Build-> Settings-> Binary Parsers

check GNU Elf Parser and Elf Parser

and then don’t forget about Project-> Build All (Ctrl+B), then run (Ctrl+ F11)

. If you see the item below come out called Binaries, Congradulations! Configured successfully, ready to run!

3, not yet?

check your file name is XXX. CPP ?And XXX must not contain “. “such symbols


under Windows is best used mingw…

http://hi.baidu.com/doctorjohnson/blog/item/2fafa2431187e11d9213c67e.html

Compiler problem, error: ‘for’ loop initial declarations are only allowed in C99 mode

using GCC to compile the code is to report

error: ‘for’ loop initial declarations are only allowed in C99 mode

note: use option -std=c99 or -std=gnu99 to compile your code

The

error is due to the increment being initialized in GCC directly in the for loop:

  1. for (int I = 0; I< len; I++) {
  2. }

    this syntax is incorrect in GCC, you must first define the I variable:

    1. int I;
    2. for (I = 0; i< len; I++) {
    3. }

      this is because GCC is based on the c89 standard, instead of the C99 standard, you can define the I variable within the for loop:

      gcc src.c -std=c99 -o src