Is it possible to create a Windows exe on Linux using C++ with CMake? -


i'm working home windows pc on code, compile on linux pc on ssh connection. since resulting program creates gui, can't test it. possible create, besides linux program, windows exe can run on home computer? here cmakelists (using qt5):

cmake_minimum_required(version 2.8.11) project(p3)  set(cmake_prefix_path $env{qt5_qmake_dir}) message(status "qt5_qmake_dir: " ${cmake_prefix_path})  set(executable_output_path ${project_source_dir}/bin) set(library_output_path ${project_source_dir}/lib) set(cmake_include_current_dir on) set(cmake_verbose_makefile on) set(cmake_automoc on)  # possibly set debug testing set(cmake_build_type release)  include_directories(${cmake_current_binary_dir}) #project source directories  find_package(qt5widgets required) find_package(qt5core required) find_package(qt5gui required)  find_package(openmp) if (openmp_found)    message("openmp found")    set(cmake_c_flags "${cmake_c_flags} ${openmp_c_flags}")    set(cmake_cxx_flags "${cmake_cxx_flags} ${openmp_cxx_flags}")    set(cmake_exe_linker_flags "${cmake_exe_linker_flags} ${openmp_exe_linker_flags}") endif()  include_directories(   ${qt5widgets_include_dirs}   ${qt5core_include_dirs}   ${qt5gui_include_dirs} )  add_definitions(${qt5widgets_definitions}) set(cmake_cxx_flags "${cmake_cxx_flags} ${qt5widgets_executable_compile_flags}")  if(unix)    set(cmake_cxx_flags "${cmake_cxx_flags} -std=c++11") endif()  add_executable(p3    #.cpps , .hs )  set_property(target p3 property cxx_standard 11) target_link_libraries(p3 ${qt5widgets_libraries}) 

you use linux-hosted mingw this, have build qt yourself. complicated process , not linux applications run on windows.

maybe, can use ssh x11 forwarding windows-hosted ssh client x11 support instead (mobaxterm, example) application window server?


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -