Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) STLQt CreatorUbuntutoQt CreatorWindows How to cross-compile a Qt Creator project from Ubuntu to a windows executable? Approach 20: Hello World, changing project file

 

Approach to cross-compile a Qt Creator project from Ubuntu to a windows executable?.

 

 

 

 

 

Environment information

 

Operating system(s) or programming environment(s):

IDE(s):

Project type:

Compiler(s):

Libraries used:

 

 

 

 

 

Project file

 

#-------------------------------------------------
#
# Project created by QtCreator 2010-09-29T14:58:49
#
#-------------------------------------------------
QT       += core
QT       -= gui
TARGET = CppHelloWorld
CONFIG   += console windows
CONFIG   -= app_bundle qt
TEMPLATE = app
SOURCES += main.cpp
QMAKESPEC = win32-msvc
LIBS+= -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -lstdc++
#LIBS+= -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -lgcc
LIBS+= -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -lsupc++
#LIBS+= -L/usr/i586-mingw32msvc/lib -lmingw32
#LIBS+= -L/usr/i586-mingw32msvc/lib -lmsvcrt
QMAKE_CC   = i586-mingw32msvc-g++
QMAKE_CXX  = i586-mingw32msvc-g++
QMAKE_LINK = i586-mingw32msvc-ld
QMAKE_SPECS = msvc
QMAKE_CFLAGS = -o
QMAKE_CXXFLAGS = -o
#QMAKE_LFLAGS = -c
#QMAKE_LFLAGS = -o -arch=win32

 

 

 

 

 

Source code

 

Hello World source code.

 

 

 

 

 

Process

 

This process seems to fail, due to many 'undefined reference to [main/STL something]' errors. I wish I understood more what I was doing...

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict