minGW32 + Arch +win

Интересует пока что глобальный вопрос - кто нибудь из обитателей данного форума занимался компиляцией вин-приложений из Линукса?

Жаль, что программистов тут не много (( Или это просто кажется…
R.

Удалённо поломал сервер с блогом, там есть статья, как я это делал. У меня же, там же есть репка с mingw32 либами, собранными из AUR. Вечером буду чинить.

PS в рассылку загляни, там быстрее читаются подобные, интересные вопросы :)
systemd должен умереть.
Я собираю, правда, через Hudson
Делал кросс-компиляцию своего Qt-шного проекта под винду из под линукса.
А в чём проблема то?
Присоединяюсь к ТСу. Не получается это сделать. Я установил mingw32-qt и другие пакеты из aur.
Я, кажется, не понимаю как это работает.
Мой ~/mingw32-build/win32-x-mingw.cmake
SET(CMAKE_SYSTEM_NAME Windows)
 
SET(CMAKE_C_COMPILER i486-mingw32-gcc)
SET(CMAKE_CXX_COMPILER i486-mingw32-g++)
SET(CMAKE_RC_COMPILER i486-mingw32-windres)
SET(CMAKE_FIND_ROOT_PATH  /usr/i486-mingw32)
 
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(QT_HEADERS_DIR "/usr/i486-mingw32/include")
set(QT_LIBRARY_DIR "/usr/i486-mingw32/lib")

Пытаюсь скомпилить main.cpp
#include <QtGui>
int main(int argc, char **argv)
{
	QApplication app(argc, argv);
	QLabel *plbl = new QLabel("Hello, World!\n");
	plbl->show();
	return app.exec();
}

CMakeLists.txt
ADD_EXECUTABLE(hello main.cpp)

Выполняю в этой директории
cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw32-build/win32-x-mingw.cmake

Вывод:
[ydz@ydz-xtop win32-build]$ cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw32-build/win32-x-mingw.cmake
The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/i486-mingw32-gcc
-- Check for working C compiler: /usr/bin/i486-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/i486-mingw32-g++
-- Check for working CXX compiler: /usr/bin/i486-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ydz/win32-build
Далее make
Scanning dependencies of target hello
[100%] Building CXX object CMakeFiles/hello.dir/main.cpp.obj
/home/ydz/win32-qt2-example/main.cpp:1:17: fatal error: QtGui: No such file or directory
compilation terminated.

Если в .cmake файл добавить find_package(Qt4 REQUIRED) то выдаст вообще ужас

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as /usr/lib
Warning: But QtCore couldn't be found.  Qt must NOT be installed correctly, or it wasn't found for cross compiling.
CMake Error at /usr/share/cmake-2.8/Modules/FindQt4.cmake:607 (MESSAGE):
  Could NOT find QtCore.  Check
  /home/ydz/win32-build/CMakeFiles/CMakeError.log for more details.
Call Stack (most recent call first):
  /home/ydz/mingw32-build/exmple2.cmake:17 (find_package)
  /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:89 (INCLUDE)
  
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:/home/ydz/win32-build/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:/home/ydz/win32-build/CMakeFiles/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!
И как быть? И как настроить QtCreator для сборки с помощью CMake?
 
Зарегистрироваться или войдите чтобы оставить сообщение.