Unrecognized command line option "-m32"

This message occurs because C/C++test will implicitly change the compilation line to add the "-m32" compiler option for some compilers. This is generally not an issue, however sometimes the user is using a compiler that does not support this "-m32" option (This usually means that an "unsupported" compiler is being used. "Unsupported" means it is not one of the compilers we test our product with and is not listed in our product's documentation). In this case, we need to create a C/C++test custom compiler configuration which does not add the "-m32" option.

More information about the custom compiler configurations can be found in the C/C++test User Guide, under the section Parasoft C++test User's Guide > Cross-Platform and Embedded Testing > Configuring Testing with the Cross Compiler. The C/C++test User Guide can be opened through C/C++test from the Help > Help Contents menu.


  • Open up your project properties. Right-click on your project and select Properties > Parasoft > C++test > Build Settings
  • Make sure you have selected the correct Compiler settings Family from the drop-down. Make sure the C compiler, C++ compiler, and Linker executables are correct as well.

  • If you have made any changes to this page, save the changes with the OK button, and rerun the test (Static Analysis or Unit Testing). If you still receive the same error of Unrecognized command line option "-m32", continue with the next steps

  • In C/C++test, select File> New> Other. Then choose C++test> Custom compiler. Then click Next. The New Custom Compiler dialog will open.

  • Select Add custom compiler, then click Next.

  • In the next page, specify the following custom compiler settings:
  • Compiler name: The unique name that will be used to identify this custom compiler in the C++test GUI.
  • Compiler family: The family of compilers which corresponds to your actual compiler (if you are not sure, choose one of the GCC compilers).
  • Compiler identifier: The unique name that will be used to identify the directory in which its configuration settings are stored. This name should conform to all limitations that your OS file system imposes on directory names
  • C compiler executable: The C compiler executable.
  • C++ compiler executable: The C++ compiler executable.
  • Linker executable: The linker executable. The compiler and linker settings must be consistent.
  • When you are done, click Next.

  • Copy the location of the path of the C compiler definition file, then click Finish.

  • Navigate to the path you copied from the previous step.
  • Open each file in this directory in a text editor (files: c.psrc, cpp.psrc, and gui.properties), then remove all instances of "-m32" from each file and save the changes. There are multiple instance of "-m32" in each file, so take care to remove all "-m32" strings.
  • ex. if a file contains the line

edgtk.preprocessorCommand {exe} {opts} -ftabstop=1 -E -xc++ -m32 {in} -o {out}

it should be changed to become

edgtk.preprocessorCommand {exe} {opts} -ftabstop=1 -E -xc++ {in} -o {out}

  • In C/C++test, go back to the project properties build settings (see Steps 1 and 2), and change the Compiler setting Family drop-down to your new compiler configuration. Double-check that all the compiler settings are correct. Save the changes by clicking OK.

  • Rerun the test, and you should no longer see the error message. If you do, restart C/C++test and run the analysis again.

Sign In or Register to comment.