# Randomness with errors

**URL:** https://discourse.cmake.org/t/randomness-with-errors/6438
**Category:** Usage
**Created:** [September 8, 2022, 9:39am UTC](https://discourse.cmake.org/t/randomness-with-errors/6438 "2022-09-08T09:39:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bambo09](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/e95f7d/32.png) [@bambo09](https://discourse.cmake.org/u/bambo09)
#### Post date: [September 8, 2022, 9:39am UTC](https://discourse.cmake.org/t/randomness-with-errors/6438/1 "2022-09-08T09:39:23Z")

</div>

The C++ compiler

```
"C:/Programy/Programming/Qt/Qt_5_14_1/Tools/mingw730_64/bin/mingw32-make.exe"

```

is not able to compile a simple test program.

It fails with the following output:

```
Change Dir: C:/Users/abcd1/Documents/Qt_Projects/poco-master-build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Programy/Programming/Qt/Qt_5_14_1/Tools/mingw730_64/bin/mingw32-make.exe -f Makefile cmTC_7167c/fast && C:/Programy/Programming/Qt/Qt_5_14_1/Tools/mingw730_64/bin/mingw32-make.exe -f CMakeFiles\cmTC_7167c.dir\build.make CMakeFiles/cmTC_7167c.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/abcd1/Documents/Qt_Projects/poco-master-build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_7167c.dir/testCXXCompiler.cxx.obj
C:\Programming\Qt\Qt_5_14_1\Tools\mingw730_64\bin\mingw32-make.exe -o CMakeFiles\cmTC_7167c.dir\testCXXCompiler.cxx.obj -c C:\Users\2017\Documents\Qt_Projects\poco-master-build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx
C:\Programming\Qt\Qt_5_14_1\Tools\mingw730_64\bin\mingw32-make: invalid option -- c
Usage: mingw32-make [options] [target] ...
Options:
  -b, -m Ignored for compatibility.
  -B, --always-make Unconditionally make all targets.
  -C DIRECTORY, --directory=DIRECTORY
                              Change to DIRECTORY before doing anything.
  -d Print lots of debugging information.
  --debug[=FLAGS] Print various types of debugging information.
  -e, --environment-overrides
                              Environment variables override makefiles.
  --eval=STRING Evaluate STRING as a makefile statement.
  -f FILE, --file=FILE, --makefile=FILE
                              Read FILE as a makefile.
  -h, --help Print this message and exit.
  -i, --ignore-errors Ignore errors from recipes.
  -I DIRECTORY, --include-dir=DIRECTORY
                              Search DIRECTORY for included makefiles.
  -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
  -k, --keep-going Keep going when some targets can't be made.
  -l [N], --load-average[=N], --max-load[=N]
                              Don't start multiple jobs unless load is below N.
  -L, --check-symlink-times Use the latest mtime between symlinks and target.
  -n, --just-print, --dry-run, --recon
                              Don't actually run any recipe; just print them.
  -o FILE, --old-file=FILE, --assume-old=FILE
                              Consider FILE to be very old and don't remake it.
  -O[TYPE], --output-sync[=TYPE]
                              Synchronize output of parallel jobs by TYPE.
  -p, --print-data-base Print make's internal database.
  -q, --question Run no recipe; exit status says if up to date.
  -r, --no-builtin-rules Disable the built-in implicit rules.
  -R, --no-builtin-variables Disable the built-in variable settings.
  -s, --silent, --quiet Don't echo recipes.
  -S, --no-keep-going, --stop
                              Turns off -k.
  -t, --touch Touch targets instead of remaking them.
  --trace Print tracing information.
  -v, --version Print the version number of make and exit.
  -w, --print-directory Print the current directory.
  --no-print-directory Turn off -w, even if it was turned on implicitly.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                              Consider FILE to be infinitely new.
  --warn-undefined-variables Warn when an undefined variable is referenced.

This program built for x86_64-w64-mingw32
Report bugs to <bug-make@gnu.org>
mingw32-make.exe[1]: *** [CMakeFiles\cmTC_7167c.dir\build.make:77: CMakeFiles/cmTC_7167c.dir/testCXXCompiler.cxx.obj] Error 2
mingw32-make.exe[1]: Leaving directory 'C:/Users/abcd1/Documents/Qt_Projects/poco-master-build/CMakeFiles/CMakeTmp'
mingw32-make.exe: *** [Makefile:126: cmTC_7167c/fast] Error 2

```

CMake will not be able to correctly generate this project.  
Call Stack (most recent call first):  
CMakeLists.txt:3 (project)

CMake Error at C:/Programy/Programming/cmake\_3\_24/share/cmake-3.24/Modules/CMakeTestCXXCompiler.cmake:62 (message):  
– The CXX compiler identification is unknown  
– Detecting CXX compiler ABI info  
– Detecting CXX compiler ABI info - failed  
– Check for working CXX compiler: C:/Programy/Programming/Qt/Qt\_5\_14\_1/Tools/mingw730\_64/bin/mingw32-make.exe  
– Check for working CXX compiler: C:/Programy/Programming/Qt/Qt\_5\_14\_1/Tools/mingw730\_64/bin/mingw32-make.exe - broken  
– Configuring incomplete, errors occurred!  
See also “C:/Users/abcd1/Documents/Qt\_Projects/poco-master-build/CMakeFiles/CMakeOutput.log”.  
See also “C:/Users/abcd1/Documents/Qt\_Projects/poco-master-build/CMakeFiles/CMakeError.log”.

Whatever i put it doesn’t work. There are only 3 possible combinatins, gcc for c compiler, g++ /c++ for c++, and i also tried mingw32-make, noen of it works, but in the past it worked. This thing complains about the compiler, and when i specify it, still it doesn’t work, idk what to do then, any idea?

---

<div class="post-metadata">

### Author: ![fenrir](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenrir/32/734_2.png) [@fenrir](https://discourse.cmake.org/u/fenrir)
#### Post date: [September 8, 2022, 10:11am UTC](https://discourse.cmake.org/t/randomness-with-errors/6438/2 "2022-09-08T10:11:27Z")

</div>

How do you actually call CMake? Something made CMake think that “C:/Programy/Programming/Qt/Qt\_5\_14\_1/Tools/mingw730\_64/bin/mingw32-make.exe” is what it should use as a compiler. I really doubt it made such a decision by itself, so it’s ether an environment variable or an explicit parameter to the CMake invocation.

---

<div class="post-metadata">

### Author: ![bambo09](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/e95f7d/32.png) [@bambo09](https://discourse.cmake.org/u/bambo09)
#### Post date: [September 8, 2022, 10:25am UTC](https://discourse.cmake.org/t/randomness-with-errors/6438/3 "2022-09-08T10:25:43Z")

</div>

As i said, i tried all variants, and none works, so it’s not the reason. I have gcc for c, c++/g++ and few others for c++, the reason why i put mingw32-make it’s because on other forums someoen was talking about it still nothing. So idk why it doens’t work, you tell me rather.

---

<div class="post-metadata">

### Author: ![fenrir](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenrir/32/734_2.png) [@fenrir](https://discourse.cmake.org/u/fenrir)
#### Post date: [September 8, 2022, 10:47am UTC](https://discourse.cmake.org/t/randomness-with-errors/6438/4 "2022-09-08T10:47:38Z")

</div>

You still did not show how you tried it nor the error from the actual compilers. mingw32-make is a make program not a compiler - it cannot work.  
Show an actual attempt with a COMPILER - your command line and the errors you get.

---

<div class="post-metadata">

### Author: ![bambo09](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/e95f7d/32.png) [@bambo09](https://discourse.cmake.org/u/bambo09)
#### Post date: [September 9, 2022, 1:09pm UTC](https://discourse.cmake.org/t/randomness-with-errors/6438/5 "2022-09-09T13:09:11Z")

</div>

There’s nothing to show at this point, as i said i tried various compilers but the problem is that the particular library doesn’t compile with anythung, i tried vs compilers etc, but the cmake as always mislead the issue, i tought it was a compilers or cmake setup that didn’t want to compile anything, turns out that the setup i made is working, but not with this lib.
