how to build cef project for linux version on windows

alice alice 80 Reputation points
2024-12-30T02:13:57.9733333+00:00

https://github.com/chromiumembedded/cef-project

I have only one computer and it is windows 11.

I installed WSL and command wsl --install -d Ubuntu24.04.

I open visual studio and git clone cef project on my windows.

On my visual studio, it show this.

User's image

And then, I don't know what can I do .

By the way, I can build cef project for windows version on my windows11

Now, I want to build it on wsl with the same computer.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,356 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,453 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 32,406 Reputation points Microsoft Vendor
    2024-12-30T08:07:12.44+00:00

    @alice alice ,

    The link that you shared do describes the method to build that specific project(CEF) for Linux, MacOS and Windows.

    It says:

    The CEF examples included in this project can be built using either CMake or Bazel.

    And

    Using CMake

    4 #To perform a Linxu build using a CEF binary distribution matching the host

    #architecture (x64, ARM or ARM64):

    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..

    make -j4

    The steps don’t indicate/confirm that Visual Studio is needed when performing a Linux build for CEF project. Instead, for performing a Windows build it indicates to use Visual Studio like

    #To perform a Windows build using a 64-bit CEF binary distribution:

    cmake -G "Visual Studio 17" -A x64 ..

    #Then, open build\cef.sln in Visual Studio 2022 and select Build > Build Solution.

    So, have you tried the corresponding commands(cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. and make -j4 )? If you got any error message, or blocked, you probably need to confirm with Windows(wsl) team about whether wsl supports the commands and how to run those commands properly.

    I added Windows 11 tag on this ticket, for better help.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.