Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find compiler set in environment variable CXX #4134

Open
agGitHub opened this issue Oct 21, 2021 · 2 comments
Open

Could not find compiler set in environment variable CXX #4134

agGitHub opened this issue Oct 21, 2021 · 2 comments
Labels
Bug Global flag to mark a deviation from expected behaviour

Comments

@agGitHub
Copy link

Hi,

I am trying to compile the project for Android. I do that on my PC following this procedure:

https://github.com/assimp/assimp/wiki/Android-compilation-on-Windows-%28Quick-overview%29

In CMake-gui, I get the following error log when I click on 'Configure':

The C compiler identification is unknown
CMake Error at C:/Users/user1/mylibs/cmake-3.22.0-rc1-windows-x86_64/share/cmake-3.22/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
  Could not find compiler set in environment variable CXX:

  C:\Program Files (x86)\Microsoft Visual
  Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64.

Call Stack (most recent call first):
  CMakeLists.txt:56 (PROJECT)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!
See also "C:/Users/user1/mylibs/assimp-master_build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/user1/mylibs/assimp-master_build/CMakeFiles/CMakeError.log".

In my Windows environment variables, I set the following path variables:

CC: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat
CXX: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64

What am i doing wrong? How to get rid of this error?

Thanks.

@agGitHub agGitHub added the Bug Global flag to mark a deviation from expected behaviour label Oct 21, 2021
@RichardTea
Copy link
Contributor

RichardTea commented Oct 23, 2021

Neither of those paths are a compiler.
Unset them, the instructions don't mention those and by doing that you have broken all cmake-based compilation.

It might help to check the cmake forums on setting up your Android dev environment, as it's quite clear yours is not configured and you're unsure how to do it.

Assimp is native code so you need to set up the Android NDK properly first.

If you're still stuck, try asking in the gitter chat, there's a few people who use this library on Android who may be able to help further

@mpcarlos87
Copy link
Contributor

@agGitHub

I already asked for a PR: #4454
Here is also my branch if you want to try it before it is merged: https://github.com/mpcarlos87/assimp/tree/Android-Script-Update

Requirements:

  • CMake
  • NDK (latest if possible) I've tried 23.1.7779620

How to execute:

  • navigate into assimp\scripts\android_crosscompile inside PowerShell
  • Execute make_android.bat and pick the options (Android ABI and architecture)

Any comment is more than welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour
Projects
Status: No status
Development

No branches or pull requests

3 participants