Hi Alex,
When trying to compile with Harbour from CVS and MSVC 8 (2005) I get:
rddcdx.lib(dbfcdx1.obj) : warning LNK4254: section '.CRT' (40000040)
merged into
'.data' (C0000040) with different attributes
Microsoft discourages merging sections with different attributes
due to a serious security problems it may generate. For example
sections which are ReadOnly might become ReadWrite. This is generaly
considered a very bad practice and sooner or later MS will remove
this possibility (IMO).
I know this is because of the :
#define HB_MSC_STARTUP
which I have commented out, and I added
set HB_BUILD_MODE=cpp
However when compiling most of the contrib libraries I get (for example):
..\..\bin\vc\\harbour.exe -i..\..\include -n -q0 -w2 -es2 -gc0
-o..\..\obj\vc\\\ .\adordd.prg
cl.exe -c -I..\..\include -Ot2b1 -EHs-c- -FD -Gs
-D_CRT_SECURE_NO_DEPRECATE -W3 -nologo -D__WINDOWS__ -DWIN32
-D__WIN32__ -Fo..\..\obj\vc\\\ ..\..\obj\vc\\\adordd.c
adordd.c
..\..\include\hbinit.h(218) : fatal error C1189: #error : Unknown
initialization method.
..\..\bin\vc\\harbour.exe -i..\..\include -n -q0 -w2 -es2 -gc0
-o..\..\obj\vc\\\ .\w32_tole.prg
cl.exe -c -I..\..\include -Ot2b1 -EHs-c- -FD -Gs
-D_CRT_SECURE_NO_DEPRECATE -W3 -nologo -D__WINDOWS__ -DWIN32
-D__WIN32__ -Fo..\..\obj\vc\\\ ..\..\obj\vc\\\w32_tole.c
w32_tole.c
..\..\include\hbinit.h(218) : fatal error C1189: #error : Unknown
initialization method.
which is, I guess, the same issue. So most importantly for me I don't
get hbtip.lib created.
If I ignore the link errors, my app works fine.
Can we make this MSVC version dependent (>= 7?) and does anyone know
what should be done for the contribs?
Actualy contribs do not respect HB_BUILD_MODE which plain *bug*.
I'll try to fix it shortly.
Or, shouldn't we compile MSVC in C mode by default?
*IMO* absolutly no. Please note "IMO". I am in an oposition to
other developers who force "C" mode due to ANSI compatibility,
but I think this is a wrong argument against lack of definition
of initialisation method "before main()" in "C" mode.
--
Marek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour