Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Windows Application Newbie Question cpp
Windows Application Newbie Question cpp [message #222130] Wed, 18 July 2007 12:17
Eclipse UserFriend
Originally posted by: akinagr.gmail.com

Eclipse IDE: eclipse-cpp-europa-win32
compiler : gcc version 3.4.5 mingw ,MinGW Toolbox

C++ project Ececutable Empty project Mingw GCC

Simple code :

#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PSTR szCmdLine,
int iCmdShow)
{
MessageBox (NULL, "Hello", "Hello Demo", MB_OK);
return (0);
}


**** Build of configuration Debug for project hello ****

**** Internal Builder is used for build ****
g++ -O0 -g3 -Wall -c -fmessage-length=0 -omain.o ..\main.cpp
g++ -ohello.exe main.o
Build complete for project hello
Time consumed: 1218 ms.
***********************************************************

My Newbie problem is constole.
When these application run they are attached to the console, and they can
also open new windows. How Application does not open a console ?

I find this info :
http://blogs.adobe.com/simplicity/2007/04/window_and_console friendly_win_1.html
http://www.mingw.org/docs.shtml

Bat if add -mwindows (properties -> mingw c++ linkes -> miscellaneous
->-Xlinker -mwindows ) build dont work :


**** Build of configuration Debug for project hello ****

**** Internal Builder is used for build ****
g++ -Xlinker -mwindows -ohello.exe main.o
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bi n\ld.exe:
unrecognised emulation mode: windows
Supported emulations: i386pe
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 219 ms.
************************************************************ *******

should make something else?How works this?

Thanks and sorry for my English
Previous Topic:patch files
Next Topic:Can't start eclipse
Goto Forum:
  


Current Time: Mon Sep 23 13:29:03 GMT 2024

Powered by FUDForum. Page generated in 0.30109 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top