Page 1 of 1

Error compiling with Harbour from CVS

Posted: Mon Nov 13, 2006 8:49 pm
by Enrico Maria Giordano
This is what I get compiling any PRG:
┌────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for Harbour 2.8 - October 2006 Harbour development power │
│ (c) FiveTech, 1993-2006 for Microsoft Windows 95/98/NT/2000/ME and XP │
└────────────────────────────────────────────────────────────────────────────┘

Compiling...
Harbour Compiler Alpha build 46.2 (Flex)
Copyright 1999-2006, http://www.harbour-project.org/
Compiling 'foldertest.prg' and generating preprocessed output to 'foldertest.ppo'...
Lines 32, Functions/Procedures 1
Generating C source output to 'foldertest.c'... Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
foldertest.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'WinMain' referenced from C:\BCC55\LIB\C0W32.OBJ
* There are errors
Do I have to build Harbour with any special flag?

EMG

Posted: Tue Nov 14, 2006 12:34 am
by Antonio Linares
Enrico,

yes, use -DHARBOUR_MAIN_WIN

Posted: Tue Nov 14, 2006 8:18 am
by Enrico Maria Giordano
Using

Code: Select all

SET CFLAGS=-DHARBOUR_MAIN_WIN
I get
obj\b32\hbrun.c:
obj\b32\external.c:
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_main' referenced from C:\BCC55\LIB\C0X32.OBJ

** error 1 ** deleting bin\b32\hbrun.exe
EMG

Posted: Tue Nov 14, 2006 9:35 am
by Antonio Linares
Enrico,

Yes, we get it too, the hbrun make file should be modified.

Posted: Tue Nov 14, 2006 12:50 pm
by Enrico Maria Giordano
Can you fix the problem or report it to the Harbour developers list?

EMG

Posted: Tue Nov 14, 2006 12:53 pm
by Antonio Linares
Enrico,

We are going to revert that change, that I wrongly introduced for building with MSVC, as its already solved.

Posted: Tue Nov 14, 2006 12:58 pm
by Enrico Maria Giordano
Yes, I just read it in the developers list.

Thank you.

EMG