Go back to Richel Bilderbeek's homepage.

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

 

 

 

 

 

(C++) file not recognized: File format not recognized

 

Misc error

 

 

 

 

 

History

 

I was busy solving the Qt FAQ How to cross-compile a Qt Creator project from Ubuntu to a windows executable?.

 

 

 

 

 

Project environment

 

Operating system: Ubuntu 10.04 LTS Lucid Lynx

IDE: Qt Creator 2.0.0

Project type: console application

Compiler: G++ 4.4.1

Libraries used:

 

 

 

 

 

Qt project file

 

#-------------------------------------------------
#
# Project created by QtCreator 2010-09-23T19:13:58
#
#-------------------------------------------------
QT       += core
QT       -= gui
TARGET = CppQtCrosscompileToWindowsExample1
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
#Set the C compiler to the mingw32 C compiler
QMAKE_CC  = i586-mingw32msvc-gcc
#Set the C++ compiler to the mingw32 C++ compiler
QMAKE_CXX = i586-mingw32msvc-g++

 

 

 

 

 

main.cpp

 

#include <iostream>

int main()
{
  std::cout <<
    "I am developed under Unbuntu, "
    "and I will run under Windows\n";
}

 

 

 

 

 

Solution

 

Unknown

 

 

 

 

 

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

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict