compiling

Re: compiling

Postby mtajkov » Sun Sep 30, 2012 6:24 am

Antonio,

I copied *. h in the applications folder, but there's a new problem: <stdio.h> and "stdio.h".
If this change (<stdio.h> to "stdio.h"):
Code: Select all  Expand view

D:\2>on

D:\2>SET PATH="d:\Program Files\Microsoft Visual Studio 10.0"\VC\bin

D:\2>cl.exe -c -TP -W3 -I$d:\harbour\include -I$"d:\Program Files\Microsoft SDKs
\Windows\v7.0A"
\include -I$"d:\Program Files\Microsoft Visual Studio 10.0"\VC\in
clude one.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

one.c
d:\2\stdio.h(186) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(186) : error C4430: missing type specifier - int assumed. Note: C++
 does not support default-int
d:\2\stdio.h(186) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(186) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(186) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(186) : error C2059: syntax error : ')'
d:\2\stdio.h(187) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(187) : error C4430: missing type specifier - int assumed. Note: C++
 does not support default-int
d:\2\stdio.h(187) : error C2065: '_In_' : undeclared identifier
d:\2\stdio.h(187) : error C2144: syntax error : 'int' should be preceded by ')'
d:\2\stdio.h(187) : error C2448: '_flsbuf' : function-style initializer appears
to be a function definition
d:\2\stdio.h(187) : error C2146: syntax error : missing ';' before identifier 'F
ILE'

d:\2\stdio.h(187) : error C2059: syntax error : ')'
d:\2\stdio.h(192) : error C2146: syntax error : missing ';' before identifier 'F
ILE'

d:\2\stdio.h(192) : error C2065: '_In_z_' : undeclared identifier
d:\2\stdio.h(192) : error C2143: syntax error : missing ')' before 'const'
d:\2\stdio.h(192) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(192) : error C2059: syntax error : ')'
d:\2\stdio.h(195) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(195) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(195) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(195) : error C2182: 'clearerr' : illegal use of type 'void'
d:\2\stdio.h(195) : error C2059: syntax error : ')'
d:\2\stdio.h(197) : error C2146: syntax error : missing ';' before identifier 'e
rrno_t'

d:\2\stdio.h(197) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(197) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(197) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(197) : error C2059: syntax error : ')'
d:\2\stdio.h(199) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(199) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(199) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(199) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(199) : error C2059: syntax error : ')'
d:\2\stdio.h(200) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(205) : error C2146: syntax error : missing ';' before identifier 'F
ILE'

d:\2\stdio.h(205) : error C2065: '_In_' : undeclared identifier
d:\2\stdio.h(205) : error C2144: syntax error : 'int' should be preceded by ')'
d:\2\stdio.h(205) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(205) : error C2059: syntax error : ')'
d:\2\stdio.h(208) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(208) : error C2065: '_In_' : undeclared identifier
d:\2\stdio.h(208) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(208) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(208) : error C2059: syntax error : ')'
d:\2\stdio.h(209) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(209) : error C2065: '_In_' : undeclared identifier
d:\2\stdio.h(209) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(209) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(209) : error C2059: syntax error : ')'
d:\2\stdio.h(210) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(210) : error C2065: '_Inout_opt_' : undeclared identifier
d:\2\stdio.h(210) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(210) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(210) : error C2059: syntax error : ')'
d:\2\stdio.h(211) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(211) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(211) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(211) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(211) : error C2059: syntax error : ')'
d:\2\stdio.h(212) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(213) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(213) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(213) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(213) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(213) : error C2059: syntax error : ')'
d:\2\stdio.h(214) : error C2144: syntax error : 'char' should be preceded by ';'

d:\2\stdio.h(214) : error C2065: '_MaxCount' : undeclared identifier
d:\2\stdio.h(214) : error C3861: '_Out_z_cap_': identifier not found
d:\2\stdio.h(214) : error C2144: syntax error : 'char' should be preceded by ')'

d:\2\stdio.h(214) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(214) : error C2059: syntax error : ')'
d:\2\stdio.h(219) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(219) : error C2065: '_In_' : undeclared identifier
d:\2\stdio.h(219) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(219) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(219) : error C2059: syntax error : ')'
d:\2\stdio.h(227) : error C2144: syntax error : 'char' should be preceded by ';'

d:\2\stdio.h(227) : error C2065: '_In_opt_z_' : undeclared identifier
d:\2\stdio.h(227) : error C2143: syntax error : missing ')' before 'const'
d:\2\stdio.h(227) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(227) : error C2059: syntax error : ')'
d:\2\stdio.h(233) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(234) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(234) : error C2143: syntax error : missing ';' before '*'
d:\2\stdio.h(234) : error C2065: '_In_z_' : undeclared identifier
d:\2\stdio.h(234) : error C2143: syntax error : missing ')' before 'const'
d:\2\stdio.h(234) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(234) : error C4430: missing type specifier - int assumed. Note: C++
 does not support default-int
d:\2\stdio.h(234) : error C2059: syntax error : ')'
d:\2\stdio.h(236) : error C2146: syntax error : missing ';' before identifier 'e
rrno_t'

d:\2\stdio.h(236) : error C2065: '_Deref_out_opt_' : undeclared identifier
d:\2\stdio.h(236) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(236) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(236) : error C2059: syntax error : ')'
d:\2\stdio.h(238) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(238) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(238) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(238) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(238) : error C2059: syntax error : ')'
d:\2\stdio.h(240) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(240) : error C2065: '_Inout_' : undeclared identifier
d:\2\stdio.h(240) : error C2146: syntax error : missing ')' before identifier 'F
ILE'

d:\2\stdio.h(240) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(240) : error C2059: syntax error : ')'
d:\2\stdio.h(242) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(242) : error C2065: '_In_' : undeclared identifier
d:\2\stdio.h(242) : error C2144: syntax error : 'int' should be preceded by ')'
d:\2\stdio.h(242) : error C2448: 'fputc' : function-style initializer appears to
 be a function definition
d:\2\stdio.h(242) : error C2146: syntax error : missing ';' before identifier 'F
ILE'

d:\2\stdio.h(242) : error C2059: syntax error : ')'
d:\2\stdio.h(243) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(243) : error C2065: '_In_' : undeclared identifier
d:\2\stdio.h(243) : error C2144: syntax error : 'int' should be preceded by ')'
d:\2\stdio.h(243) : error C2448: '_fputchar' : function-style initializer appear
s to be a function definition
d:\2\stdio.h(243) : error C2059: syntax error : ')'
d:\2\stdio.h(244) : error C2144: syntax error : 'int' should be preceded by ';'
d:\2\stdio.h(244) : error C2065: '_In_z_' : undeclared identifier
d:\2\stdio.h(244) : error C2143: syntax error : missing ')' before 'const'
d:\2\stdio.h(244) : warning C4229: anachronism used : modifiers on data are igno
red
d:\2\stdio.h(244) : error C2059: syntax error : ')'
d:\2\stdio.h(245) : error C2146: syntax error : missing ';' before identifier 's
ize_t'

d:\2\stdio.h(245) : error C2065: '_ElementSize' : undeclared identifier
d:\2\stdio.h(245) : error C2065: '_Count' : undeclared identifier
d:\2\stdio.h(245) : fatal error C1003: error count exceeds 100; stopping compila
tion
D:\2>


It's amazing what happens!

Regards,
Miloš
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
mtajkov
 
Posts: 129
Joined: Sun Mar 08, 2009 4:33 pm

Re: compiling

Postby Antonio Linares » Sun Sep 30, 2012 8:50 am

Milos,

Why don't you use this make that I provided:

http://code.google.com/p/fivewin-contributions/downloads/detail?name=vs2010_make_example.zip&can=2&q=

and use the same paths ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41461
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: compiling

Postby mtajkov » Mon Oct 01, 2012 3:17 pm

Antonio,

I use it all the time your file.

When I delete a SET PATH=$(VCDIR) from test.mak I get the object files but now it is a problem with the lib files.

link.log:
Code: Select all  Expand view
c:\harbour\lib\hbrtl.lib : fatal error LNK1136: invalid or corrupt file
 


I think all the time I have a problem with paths to include and lib files. But I do not know what it is that the real problem?

Regards,
Miloš
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
mtajkov
 
Posts: 129
Joined: Sun Mar 08, 2009 4:33 pm

Re: compiling

Postby Antonio Linares » Mon Oct 01, 2012 6:05 pm

Miloš,

Have those Harbour libs being built using MSVC ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41461
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: compiling

Postby mtajkov » Mon Oct 01, 2012 6:18 pm

Antonio,

Sorry, but how do I know?

Regards,
Miloš
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
mtajkov
 
Posts: 129
Joined: Sun Mar 08, 2009 4:33 pm

Re: compiling

Postby Antonio Linares » Mon Oct 01, 2012 8:10 pm

Milos,

If you use a file viewer (I use Total Commander) to inspect a Harbour library, you will see something like this:

ð} N m € ../../../abs.c ˆ £abs ˆ Borland C++ 5.82 ˆ è ../../../abs.cy]ã@ ˆ' éf]ã@../../../../../include\error.ch ˆ) éf]ã@!../../../../../include\hbapierr.h ˆ) éf]ã@!../../../../../include\hbapiitm.h ˆ( éf]ã@ ../../../../../include\hbtrac


As you see, Borland is at the begining. This is not a very technical way but it works :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41461
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: compiling

Postby Antonio Linares » Mon Oct 01, 2012 8:11 pm

For a Microsoft lib it will be similar to this:

!<arch>
/ 1342456168 0 177885 `
m I– I– I– I– I– I– I– I– I– I– I– I– I– I– I– `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ `\ ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž ¯ž 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41461
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: compiling

Postby mtajkov » Wed Oct 03, 2012 4:26 am

Antonio,

You're right! I used the BCC library :(
I will still continue to use the xHB. It's simpler!

Thank you!

Regards
Miloš
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
mtajkov
 
Posts: 129
Joined: Sun Mar 08, 2009 4:33 pm

Re: compiling

Postby nnicanor » Fri Oct 12, 2012 6:43 pm

To build properly with MVC if you not use default configuration made with MVC Express installer you must to setup environmet variables for C compiler INCLUDE and lib and provide c and harbour paths, if you use diferents c Versions you must install prior version firts last version to setup environment you can use vcvars32.bat.

Regards,

Nicanor
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 123 guests