Skip to content

Conversation

Sahil-pixel
Copy link

Copy link
Owner

@davisking davisking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Please make only the minimal changes needed though.

Comment on lines -4 to -12
if (WIN32 AND NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
message(FATAL_ERROR "\n"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
"You must use Visual Studio to build a python extension on windows. If you "
"are getting this error it means you have not installed Visual C++. Note that "
"there are many flavors of Visual Studio, like Visual Studio for C\# development. "
"You need to install Visual Studio for C++. \n"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")
endif()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very much needed for windows users.

# When invoked from setup.py CMAKE_LIBRARY_OUTPUT_DIRECTORY will be set. But when you are just building via say
# `cd dlib/tools/python; mkdir build; cd build; cmake ..` it won't be set. It only matters for building the actual
# distribution. So skip this for people building directly with cmake (which they might do when testing stuff).
# Copy __init__.py for Python package
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove comments.

@Novfensec
Copy link

Novfensec commented Aug 23, 2025

@davisking This PR is not the way we build different libs for Android. We actually use .patch files to patch libs accordingly based on the current android system requirements which changes frequently.

See https://python-for-android.readthedocs.io/en/latest/recipes.html#methods-and-tools-to-help-with-compilation for more info.

Below is just a copy if this

@dlib-issue-bot
Copy link
Collaborator

Warning: this issue has been inactive for 35 days and will be automatically closed on 2025-10-07 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants