delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
From: | "Dave Korn" <dk AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: gcc Unicode and _WinMain AT 16 |
Date: | Wed, 2 Jun 2004 17:52:49 +0100 |
MIME-Version: | 1.0 |
In-Reply-To: | <4.3.2.7.2.20040601000627.018162d8@popmail.compuserve.com> |
Message-ID: | <NUTMEGHOzyfyz5b6KZm0000015b@NUTMEG.CAM.ARTIMI.COM> |
X-OriginalArrivalTime: | 02 Jun 2004 16:52:49.0468 (UTC) FILETIME=[0992AFC0:01C448C2] |
> -----Original Message----- > From: cygwin-owner On Behalf Of Clive Levinson > Sent: 01 June 2004 08:17 > gcc -c -Wall -mno-cygwin app.cpp -o app.o > windres -i resource.rc -o resource.o > gcc -Wall -mno-cygwin app.o -o app.exe resource.o -s -mwindows > > The app entry is: > int WINAPI WinMain(HINSTANCE instance,HINSTANCE prevInstance,LPTSTR > cmdLine,int cmdShow) > > This compiles,builds, and executes fine. > > However, I need to build a Unicode version of the app. The > only change I made > was to define UNICODE & _UNICODE before including windows.h. I thought it was only necessary to define UNICODE. _UNICODE seems like it ought to be a compiler-internals sort of thing. (ANSI reserves all identifiers beginning with _ for the compiler/library's internal use) > It compiles, but > when linking I get the error: > main.c: undefined reference to `_WinMain AT 16' I notice you're using gcc to both compile and link your C++ file. Does using g++ instead of gcc for both stages help any? cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |