topic
stringlengths
1
63
text
stringlengths
1
577k
Build with Visual Studio 2015 errors
I will test it when it arrives. Thank you.
Build with Visual Studio 2015 errors
Thanks to you for your great feedback and for making us aware of the new MS tools <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Build with Visual Studio 2015 errors
The only problem is that these new FWH libs are not backwards compatible. I just tested them They require the new Harbour and VS2015
Build with Visual Studio 2015 errors
Antonio, I have no problem with that. VS 2015 is on a test machine with Win 10. My current "production" computer will not be affected. I simply copy source code from the production machine to the test machine where the new libs will be found. Tim
Build with Visual Studio 2015 errors
very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Build with Visual Studio 2015 errors
OK ... I still have 3 problems: UNDEFINED __vaCopy in _hb_vsnprintf found in hbcommon.lib __iob_func in hbssl.lib ( I don't think you rebuilt this one ) _except_handler4_ommon in MSVCRTD.lib though I told it not to link this file by default ... it still goes to it. Tim
Build with Visual Studio 2015 errors
Tim, Please try to link vcruntime.lib too
Build with Visual Studio 2015 errors
That took care of the MSVCRT issue, but not hbssl and hbcommon libs.
Build with Visual Studio 2015 errors
Tim, I have never built hbssl myself, so I will have to check how to do it... As far as I know we have to use OpenSSL maybe some hbssl user can help us here
Build with Visual Studio 2015 errors
I am trying to build it this way: c:\harbour\contrib\hbssl>c:\harbour\bin\hbmk2 hbssl -comp=msvc hbmk2: Building sub-project (level 2): hbssls.hbp hbmk2[hbssls]: Warning: Missing dependency: openssl Surely Rafa Carmona or another FWH user may be able to help us on this
Build with Visual Studio 2015 errors
Antonio, creo, pero no lo he usado nunca, que has de tener instalado el OpenSSl en C:\OpenSSl... He encontrado esto ¿ <!-- m --><a class="postlink" href="http://www.openssl.org/source/openssl-0.9.8h.tar.gz">http://www.openssl.org/source/openssl-0.9.8h.tar.gz</a><!-- m --> ? Pero no se si es la version a utilizar <!-- m --><a class="postlink" href="http://p-nand-q.com/programming/windows/building_openssl_with_visual_studio_2013.html">http://p-nand-q.com/programming/windows ... _2013.html</a><!-- m -->
Build with Visual Studio 2015 errors
Cristobal, These are the steps that Rafa Carmona explained: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=23539&p=157479&hilit=openssl#p126479">viewtopic.php?f=6&t=23539&p=157479&hilit=openssl#p126479</a><!-- l --> Lets see if we can build it...
Build with Visual Studio 2015 errors
[url:1muzlab6]http&#58;//developer&#46;covenanteyes&#46;com/building-openssl-for-visual-studio/[/url:1muzlab6]
Build with Visual Studio 2015 errors
Before calling: nmake -f ms\nt.mak this call must be done: call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" and I get this error: [quote:1r9t1jxr]C:\openssl>nmake -f ms\nt.mak Microsoft (R) Program Maintenance Utility Version 14.00.22310.1 Copyright (C) Microsoft Corporation. All rights reserved. Building OpenSSL cl /Fotmp32\cryptlib.obj -Iinc32 -Itmp32 /MT /Ox /O2 /Ob2 /W3 /WX /Gs0 /GF /Gy /no 32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPREC -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE - RB5 -DOPENSSL_NO_DYNAMIC_ENGINE /Zl -c .\crypto\cryptlib.c cryptlib.c .\crypto\cryptlib.c(556): error C2220: warning treated as error - no 'object' file generate .\crypto\cryptlib.c(556): warning C4456: declaration of 'h' hides previous local declaratio .\crypto\cryptlib.c(474): note: see declaration of 'h' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl. Stop.[/quote:1r9t1jxr] Suggestions are welcome <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Build with Visual Studio 2015 errors
Error solved removing the word "HANDLE" from line 556 Compiling...
Build with Visual Studio 2015 errors
Next error: [quote:1jc9cons] cl /Fotmp32\b_print.obj -Iinc32 -Itmp32 /MT /Ox /O2 /Ob2 /W3 /WX /Gs0 /GF /Gy /nol 2_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -D B5 -DOPENSSL_NO_DYNAMIC_ENGINE /Zl -c .\crypto\bio\b_print.c b_print.c .\crypto\bio\b_print.c(381): error C2220: warning treated as error - no 'object' file gener .\crypto\bio\b_print.c(381): warning C4267: '=': conversion from 'size_t' to 'short', possi NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl. Stop.[/quote:1jc9cons]
Build with Visual Studio 2015 errors
Solved changing line 381 of c:\openssl\crypto\bio\b_print.c this way: *num = ( short ) currlen; Next error: [quote:1v0chur3] cl /Fotmp32\rand_win.obj -Iinc32 -Itmp32 /MT /Ox /O2 /Ob2 /W3 /WX /Gs0 /GF /Gy /no 32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPREC -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE - RB5 -DOPENSSL_NO_DYNAMIC_ENGINE /Zl -c .\crypto\rand\rand_win.c rand_win.c .\crypto\rand\rand_win.c(404): error C2220: warning treated as error - no 'object' file gen .\crypto\rand\rand_win.c(404): warning C4456: declaration of 'm' hides previous local decla .\crypto\rand\rand_win.c(201): note: see declaration of 'm' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl. Stop.[/quote:1v0chur3]
Build with Visual Studio 2015 errors
Solved comenting the line 404 of c:\openssl\crypto\rand\rand_win.c // MODULEENTRY32 m; next error: [quote:dfss9ztf] cl /Fotmp32\rand_win.obj -Iinc32 -Itmp32 /MT /Ox /O2 /Ob2 /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN 32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE /Fdout32 -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_K RB5 -DOPENSSL_NO_DYNAMIC_ENGINE /Zl -c .\crypto\rand\rand_win.c rand_win.c .\crypto\rand\rand_win.c(544): error C2039: 'dwSize': is not a member of '_MEMORYSTATUS' C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(545): note: see declaration of '_MEMORYSTATUS' .\crypto\rand\rand_win.c(547): warning C4133: 'function': incompatible types - from 'MEMORYSTATUS *' to 'LPMODULEENTRY32' .\crypto\rand\rand_win.c(549): error C2039: 'dwSize': is not a member of '_MEMORYSTATUS' C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(545): note: see declaration of '_MEMORYSTATUS' .\crypto\rand\rand_win.c(549): error C2198: 'RAND_add': too few arguments for call .\crypto\rand\rand_win.c(550): warning C4133: 'function': incompatible types - from 'MEMORYSTATUS *' to 'LPMODULEENTRY32' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"' : return code '0x2' Stop.[/quote:dfss9ztf]
Build with Visual Studio 2015 errors
Solved with these changes in c:\openssl\crypto\rand\rand_win.c line 544: [code=fw:1witi5wg]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// m.dwSize = sizeof(MODULEENTRY32);</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>good<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; starttime = GetTickCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>module_first<span style="color: #000000;">&#40;</span>handle, <span style="color: #000000;">&#40;</span> LPMODULEENTRY32 <span style="color: #000000;">&#41;</span> &m<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RAND_add<span style="color: #000000;">&#40;</span>&m, sizeof<span style="color: #000000;">&#40;</span>MODULEENTRY32<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span>module_next<span style="color: #000000;">&#40;</span>handle, <span style="color: #000000;">&#40;</span> LPMODULEENTRY32 <span style="color: #000000;">&#41;</span> &m<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&& <span style="color: #000000;">&#40;</span>!good<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|| <span style="color: #000000;">&#40;</span>GetTickCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - starttime<span style="color: #000000;">&#41;</span> < MAXDELAY<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>close_snap<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; close_snap<span style="color: #000000;">&#40;</span>handle<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CloseHandle<span style="color: #000000;">&#40;</span>handle<span style="color: #000000;">&#41;</span>;<br />&nbsp;</div>[/code:1witi5wg]
Build with Visual Studio 2015 errors
Next error: [quote:2ba9etr4] link /nologo /subsystem:console /opt:ref /out:out32\constant_time_test.exe @C:\Users\ADMINI~1\AppData\Local\Temp\nmF6 D2.tmp constant_time_test.obj : error LNK2019: unresolved external symbol ___iob_func referenced in function _main C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\OLDNAMES.lib : warning LNK4272: library machine type 'UNKNOWN' con flicts with target machine type 'X86' out32\constant_time_test.exe : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x460' Stop.[/quote:2ba9etr4] iob_func again...
Build with Visual Studio 2015 errors
These libs have been already built: c:\openssl\out32\libeay32.lib c:\openssl\out32\ssleay32.lib Not sure what else we need now...
Build with Visual Studio 2015 errors
According to hbssl.hbp we need these DLLs: -depimplibs=openssl:../out32dll/libeay32.dll -depimplibs=openssl:../out32dll/ssleay32.dll -depimplibs=openssl:../dll/libeay32.dll -depimplibs=openssl:../dll/ssleay32.dll -depimplibs=openssl:../libeay32.dll -depimplibs=openssl:../ssleay32.dll We may try to solve the iob_func error and see if the DLLs get built. Not sure yet why the iob_func error is happening this time
Build your FWH app using hbmk2.exe and MSVC 32&64
Using hbmk2.exe to build our FWH app 32 bits using Microsoft Visual Studio Community 2022: test.hbp [code=fw:37lszryg]<div class="fw" id="{CB}" style="font-family: monospace;">-gui<br /><br />-Ic:\fwh\include<br /><br />test.prg<br /><br />-Lc:\fwh\lib<br /><br />-lFiveH32<br />-lFiveHC32<br /><br />-lgdiplus<br />-lole32<br />-lOleDlg<br />-lversion<br /><br />xhb.hbc<br />hbct.hbc<br />hbwin.hbc<br />hbmzip.hbc<br />hbziparc.hbc<br />hbfoxpro.hbc<br /><br />-ldflag=/NODEFAULTLIB:<span style="color: #000000;">msvcrt</span><br /><br />test.rc<br /> </div>[/code:37lszryg] go32.bat [code=fw:37lszryg]<div class="fw" id="{CB}" style="font-family: monospace;">call <span style="color: #ff0000;">"%ProgramFiles%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>022<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> x86<br />c:\harbour\bin\hbmk2 test.hbp -comp=msvc<br />test.exe</div>[/code:37lszryg] test.prg [code=fw:37lszryg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oBmpTiled, oWnd, oMsgBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> BITMAP oBmpTiled <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"background"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"My app"</span><br /><br />   BuildBar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> MSGBAR oMsgBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"My app"</span> NOINSET<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> DrawTiled<span style="color: #000000;">&#40;</span> hDC, oWnd, oBmpTiled <span style="color: #000000;">&#41;</span><br /><br />   oBmpTiled:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oMenu<br /><br />   <span style="color: #0000ff;">MENU</span> oMenu<br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Files"</span><br />   <span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oMenu   <br /><br /><span style="color: #00C800;">function</span> BuildBar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd 3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">70</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:37lszryg] test.rc [code=fw:37lszryg]<div class="fw" id="{CB}" style="font-family: monospace;">background BITMAP c:\fwh\<span style="color: #0000ff;">bitmaps</span>\backgrnd\iosbg.bmp</div>[/code:37lszryg]
Build your FWH app using hbmk2.exe and MSVC 32&64
64 bits version using FWH 64 and MSVC 64 bits: test64.hbp [code=fw:1vo4spti]<div class="fw" id="{CB}" style="font-family: monospace;">-gui<br /><br />-Ic:\fwh\include<br /><br />test.prg<br /><br />-Lc:\fwh\lib<br /><br />-lFiveH64<br />-lFiveHC64<br /><br />-lgdiplus<br />-lole32<br />-lOleDlg<br />-lversion<br /><br />xhb.hbc<br />hbct.hbc<br />hbwin.hbc<br />hbmzip.hbc<br />hbziparc.hbc<br />hbfoxpro.hbc<br /><br />-ldflag=/NODEFAULTLIB:<span style="color: #000000;">msvcrt</span><br /><br />test.rc<br /> </div>[/code:1vo4spti] go64.bat [code=fw:1vo4spti]<div class="fw" id="{CB}" style="font-family: monospace;">call <span style="color: #ff0000;">"%ProgramFiles%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>022<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> amd64<br />c:\harbour\bin\hbmk2 test64.hbp -comp=msvc64<br />test.exe</div>[/code:1vo4spti] test.prg (same code as previous msg) [code=fw:1vo4spti]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oBmpTiled, oWnd, oMsgBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> BITMAP oBmpTiled <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"background"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"My app"</span><br /><br />   BuildBar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> MSGBAR oMsgBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"My app"</span> NOINSET<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> DrawTiled<span style="color: #000000;">&#40;</span> hDC, oWnd, oBmpTiled <span style="color: #000000;">&#41;</span><br /><br />   oBmpTiled:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oMenu<br /><br />   <span style="color: #0000ff;">MENU</span> oMenu<br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Files"</span><br />   <span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oMenu   <br /><br /><span style="color: #00C800;">function</span> BuildBar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd 3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">70</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1vo4spti] test.rc [code=fw:1vo4spti]<div class="fw" id="{CB}" style="font-family: monospace;">background BITMAP c:\fwh\<span style="color: #0000ff;">bitmaps</span>\backgrnd\iosbg.bmp</div>[/code:1vo4spti]
Build your FWH app using hbmk2.exe and MSVC 32&64
Hi Antonio, What is the advantage of hbmk2.exe?
Build your FWH app using hbmk2.exe and MSVC 32&64
Hakan, Simplicity and easy of use
Build your FWH app using hbmk2.exe and MSVC 32&64
Good Morning Antonio, I can´t find download for MSVC 2019. Could I try it with MSVC 2022? Which option should us choose in this screen? [img:sbspese7]https&#58;//i&#46;imgur&#46;com/4qrUWuK&#46;jpg[/img:sbspese7]
Build your FWH app using hbmk2.exe and MSVC 32&64
Vilian, > Could I try it with MSVC 2022 ? Please use 2022 Please select "desenvolvimiento para desktop com C++"
Build your FWH app using hbmk2.exe and MSVC 32&64
Thank you Antonio, I'm tryng to compile a little samples, but it's showing the error message bellow: [code=fw:3qyopxlp]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">&#91;</span>vcvarsall.bat<span style="color: #000000;">&#93;</span> Environment initialized <span style="color: #00C800;">for</span>: <span style="color: #ff0000;">'x86'</span><br />hbmk2<span style="color: #000000;">&#91;</span>testsql07<span style="color: #000000;">&#93;</span>: <span style="color: #000000;">Warning</span>: <span style="color: #000000;">Cannot</span> find xhb.hbc <span style="color: #000000;">&#40;</span>referenced <span style="color: #0000ff;">from</span> testsql07.hbp<span style="color: #000000;">&#41;</span><br />hbmk2<span style="color: #000000;">&#91;</span>testsql07<span style="color: #000000;">&#93;</span>: <span style="color: #000000;">Warning</span>: <span style="color: #000000;">Cannot</span> find hbct.hbc <span style="color: #000000;">&#40;</span>referenced <span style="color: #0000ff;">from</span> testsql07.hbp<span style="color: #000000;">&#41;</span><br />hbmk2<span style="color: #000000;">&#91;</span>testsql07<span style="color: #000000;">&#93;</span>: <span style="color: #000000;">Warning</span>: <span style="color: #000000;">Cannot</span> find hbwin.hbc <span style="color: #000000;">&#40;</span>referenced <span style="color: #0000ff;">from</span> testsql07.hbp<span style="color: #000000;">&#41;</span><br />hbmk2<span style="color: #000000;">&#91;</span>testsql07<span style="color: #000000;">&#93;</span>: <span style="color: #000000;">Warning</span>: <span style="color: #000000;">Cannot</span> find hbmzip.hbc <span style="color: #000000;">&#40;</span>referenced <span style="color: #0000ff;">from</span> testsql07.hbp<span style="color: #000000;">&#41;</span><br />hbmk2<span style="color: #000000;">&#91;</span>testsql07<span style="color: #000000;">&#93;</span>: <span style="color: #000000;">Warning</span>: <span style="color: #000000;">Cannot</span> find hbziparc.hbc <span style="color: #000000;">&#40;</span>referenced <span style="color: #0000ff;">from</span> testsql07.hbp<span style="color: #000000;">&#41;</span><br />hbmk2<span style="color: #000000;">&#91;</span>testsql07<span style="color: #000000;">&#93;</span>: <span style="color: #000000;">Warning</span>: <span style="color: #000000;">Cannot</span> find hbfoxpro.hbc <span style="color: #000000;">&#40;</span>referenced <span style="color: #0000ff;">from</span> testsql07.hbp<span style="color: #000000;">&#41;</span></div>[/code:3qyopxlp] I'm using this content into testsql07.hbp: [code=fw:3qyopxlp]<div class="fw" id="{CB}" style="font-family: monospace;">-gui<br /><br />-Ic:\fwh21\include<br /><br />testsql07.prg<br /><br />-Lc:\fwh21\lib<br /><br />-lFiveH32<br />-lFiveHC32<br /><br />-lgdiplus<br />-lole32<br />-lOleDlg<br />-lversion<br /><br />xhb.hbc<br />hbct.hbc<br />hbwin.hbc<br />hbmzip.hbc<br />hbziparc.hbc<br />hbfoxpro.hbc<br /><br />-ldflag=/NODEFAULTLIB:<span style="color: #000000;">msvcrt</span></div>[/code:3qyopxlp] Where can i find these files that are missing?
Build your FWH app using hbmk2.exe and MSVC 32&64
Vilian, Please do this: git clone <!-- m --><a class="postlink" href="https://github.com/harbour/core">https://github.com/harbour/core</a><!-- m --> harbour so it gets cloned at c:\harbour
Build your FWH app using hbmk2.exe and MSVC 32&64
Thank you <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
Build your FWH app using hbmk2.exe and MSVC 32&64
Hola Antonio, He seguido los pasos que indicas, pero tengo el siguiente error, usando el test.prg: [img:ailgwjjz]https&#58;//tssemsa&#46;com/sistemas/img/msvcharb&#46;jpg[/img:ailgwjjz] Que no encuentra la funcion BuildMenu() Estoy utilizando el Harboour de MSVC20201019, Visual Studio 2022 y FWH22.03 Saludos Carlos.
Build your FWH app using hbmk2.exe and MSVC 32&64
Ya esta solucionado Antonio. Le cambie el nombre a la funcion BuildMenu de tu Ejemplo a MenuSis y enlazo correctamente, y genero el ejecutable sin problema No se porque no encontraba la funcion con el nombre original? Saludos cordiales Carlos
Build your FWH app using hbmk2.exe and MSVC 32&64
Carlos, Ya habiamos detectado ese bug y está arreglado para el próximo build de FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Efectivamente la solución es cambiar el nombre de la función BuildMenu()
Build your FWH app using hbmk2.exe and MSVC 32&64
Enterado Antonio, gracias. Seguiré ahora con tratar de armar un proyecto que ya tengo funcionando con Borland, y que quiero ahora tener con MSVC. Saludos Carlos.
Build your FWH app using hbmk2.exe and MSVC 32&64
[quote="Antonio Linares":27h9xqew]Vilian, Please do this: git clone <!-- m --><a class="postlink" href="https://github.com/harbour/core">https://github.com/harbour/core</a><!-- m --> harbour so it gets cloned at c:\harbour[/quote:27h9xqew] Hi Antonio, After cloning, what should I do? There is not any binary file bin directory. Should I compile? How? Thanks.
Build your FWH app using hbmk2.exe and MSVC 32&64
Dear Hakan, Please use these batch files to build Harbour 32 and 64 bits using Visual Studio Community 2022: copy them into c:\harbour You have to download OpenSSL 32 and 64 bits from here: [url:g3tvgk0z]https&#58;//slproweb&#46;com/products/Win32OpenSSL&#46;html[/url:g3tvgk0z] and curl from here: [url:g3tvgk0z]https&#58;//curl&#46;se/download&#46;html[/url:g3tvgk0z] go32.bat [code=fw:g3tvgk0z]<div class="fw" id="{CB}" style="font-family: monospace;">call <span style="color: #ff0000;">"%ProgramFiles%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>022<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> x86<br />set HB_COMPILER=msvc<br />set HB_BUILD_MODE=c<br />set HB_USER_PRGFLAGS=-l-<br />set HB_BUILD_CONTRIBS<br /><br />rem set HB_BUILD_DEBUG=yes<br />rem set HB_TR_LEVEL=debug<br />rem set HB_USER_CFLAGS=-DHB_TR_LEVEL_DEBUG<br /><br />set HB_WITH_OPENSSL=c:\OpenSSL-Win32\include<br />set HB_WITH_CURL=c:\curl\include<br />set HB_OPENSSL_STATIC=yes      <br />set HB_STATIC_OPENSSL=yes  <br />set HB_STATIC_CURL=yes<br />set HB_WITH_LIBHARU<br />set HB_BUILD_DYN=no<br />set HB_BUILD_CONTRIB_DYN=no<br />del .\src\common\obj\win\msvc\hbver.obj<br />del .\src\common\obj\win\msvc\hbver_dyn.obj<br />del .\src\common\obj\win\msvc\hbverdsp.obj<br />win-make.exe<br />copy c:\harbour\lib\win\msvc\libcurl-x32.lib c:\harbour\lib\win\msvc\libcurl.lib<br />copy c:\harbour\lib\win\msvc\libssl-1_1-x32.lib c:\harbour\lib\win\msvc\ssleay32.lib<br />copy c:\harbour\lib\win\msvc\libcrypto-1_1-x32.lib c:\harbour\lib\win\msvc\libcrypto.lib</div>[/code:g3tvgk0z] go64.bat [code=fw:g3tvgk0z]<div class="fw" id="{CB}" style="font-family: monospace;">call <span style="color: #ff0000;">"%ProgramFiles%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>022<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> amd64<br />set HB_COMPILER=msvc64<br />set HB_BUILD_MODE=c<br />set HB_USER_PRGFLAGS=-l-<br />set HB_BUILD_CONTRIBS<br /><br />rem set HB_BUILD_DEBUG=yes<br />rem set HB_TR_LEVEL=debug<br />rem set HB_USER_CFLAGS=-DHB_TR_LEVEL_DEBUG<br /><br />set HB_WITH_OPENSSL=c:\OpenSSL-Win64\include<br />set HB_WITH_CURL=c:\curl\include<br />set HB_OPENSSL_STATIC=yes      <br />set HB_STATIC_OPENSSL=yes  <br />set HB_STATIC_CURL=yes<br />set HB_WITH_LIBHARU<br />set HB_BUILD_DYN=no<br />set HB_BUILD_CONTRIB_DYN=no<br />del .\src\common\obj\win\msvc64\hbver.obj<br />del .\src\common\obj\win\msvc64\hbver_dyn.obj<br />del .\src\common\obj\win\msvc64\hbverdsp.obj<br />win-make.exe<br />copy c:\harbour\lib\win\msvc64\libcurl-x64.lib c:\harbour\lib\win\msvc64\libcurl.lib<br />copy c:\harbour\lib\win\msvc64\libssl-1_1-x64.lib c:\harbour\lib\win\msvc64\ssleay32.lib<br />copy c:\harbour\lib\win\msvc64\libcrypto-1_1-x64.lib c:\harbour\lib\win\msvc64\libcrypto.lib</div>[/code:g3tvgk0z]
Build your FWH app using hbmk2.exe and MSVC 32&64
This is the right one for 64 bit: [url:2fkc621u]https&#58;//slproweb&#46;com/download/Win64OpenSSL_Light-3_0_2&#46;exe[/url:2fkc621u] And this for 32 bit: [url:2fkc621u]https&#58;//slproweb&#46;com/download/Win32OpenSSL_Light-3_0_2&#46;exe[/url:2fkc621u] EMG
Build your FWH app using hbmk2.exe and MSVC 32&64
Antonio, para salir de dudas de una vez por todas.... Que version de ssl descargar tanto para bcc como para msvc? en sus versiones 32 y 64 bits..
Build your FWH app using hbmk2.exe and MSVC 32&64
Carlos, Para 32 bits prueba con: [url:jdzx6ezy]https&#58;//slproweb&#46;com/download/Win32OpenSSL-3_0_2&#46;exe[/url:jdzx6ezy] Para 64 bits prueba con: [url:jdzx6ezy]https&#58;//slproweb&#46;com/download/Win64OpenSSL-1_1_1n&#46;exe[/url:jdzx6ezy] En la página de descargas tambien hay unas versiones "light" que podríamos probar. Yo los tengo descargados desde hace tiempo y no recuerdo si los descargué desde ahi
Build your FWH app using hbmk2.exe and MSVC 32&64
[quote="Antonio Linares":29fq6mfn]Carlos, Para 32 bits prueba con: [url:29fq6mfn]https&#58;//slproweb&#46;com/download/Win32OpenSSL-3_0_2&#46;exe[/url:29fq6mfn] Para 64 bits prueba con: [url:29fq6mfn]https&#58;//slproweb&#46;com/download/Win64OpenSSL-1_1_1n&#46;exe[/url:29fq6mfn] En la página de descargas tambien hay unas versiones "light" que podríamos probar. Yo los tengo descargados desde hace tiempo y no recuerdo si los descargué desde ahi[/quote:29fq6mfn] Hi Antonio, Can you please lead me to compile after installing Win32OpenSSL-3_0_2.exe? Thanks.
Build your FWH app using hbmk2.exe and MSVC 32&64
Dear Hakan, We already explained it here: <!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?p=249800&sid=cf5b3f87e1f151243044e5d25dfd8ca0#p249800">viewtopic.php?p=249800&sid=cf5b3f87e1f151243044e5d25dfd8ca0#p249800</a><!-- l --> Just run go32.bat to get Harbour 32 bits, or run go64.bat to get Harbour 64 bits
Build your FWH app using hbmk2.exe and MSVC 32&64
Previous post updated including: set HB_WITH_LIBHARU
Build-in Querybuilder
Hi, I want to implement a query-builder in an application. Is there an easy way to verify the correct syntax before running the query? The users of the application are engineers, so they know how to make queries. I want that they enter something like : [b:2zz268r6]NAME = 'FI123' OR PTDESC like '%B701%'[/b:2zz268r6] They don't have to enter the table-name. It's one that is selected, so i can already enter the beginning op the query.... I just add the antered text after the 'WHERE' clause It will be also nice that the is maybe an autocomplete, or a selection-list of the available field-names
Build-in Querybuilder
Marc, Please review FWH function FWExpBuilder( cExp, oRs, nClrTxt, nClrBack ) This function is used from FWH\samples\fivedbu.prg so you can test it [img:3jr40s39]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/exprbuilder&#46;JPG[/img:3jr40s39]
Build-in Querybuilder
Thank you Antonio, That's a very good start.
Build-in Querybuilder
Antonio, I have tested it, but I have a problem. I'm using a recordset. I first call FWExpBuilder() Then I call FWCheckExpression() to see if the result is ok, but I'm always get the error 'Variable does not exist' This is the fieldname of the oRs. I tested it with FWH64 May 2016 (FWH 6.04 Revd Build-3)
Build-in Querybuilder
Please copy here the expression that you build In case that you are using a local variable, turn it into a public one
Build-in Querybuilder
Here is a little test: adoHaalPointselRecordset() returns the recordset. [code=fw:2vk89msz]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">FUNCTION</span> tpsquery<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cfilter :=  <span style="color: #ff0000;">''</span><br />oRsQuery = adoHaalPointselRecordset<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />FWExpBuilder<span style="color: #000000;">&#40;</span> @cFilter, oRsQuery <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">IF</span> FWCheckExpression <span style="color: #000000;">&#40;</span>cfilter<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ELSE</span><br />    msgalert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Filter invalid'</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2vk89msz] This is the query: [img:2vk89msz]http&#58;//www&#46;vms&#46;be/tmp/Knipsel001&#46;JPG[/img:2vk89msz] Here the message: [img:2vk89msz]http&#58;//www&#46;vms&#46;be/tmp/Knipsel002&#46;JPG[/img:2vk89msz]
Build-in Querybuilder
I found the mysql_error() in the mariadb functions to display the last sql-error, but don't know how to display it <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
Build-in Querybuilder
I found it with calling 'SHOW ERRORS' <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Build.bat for MSVC 2015
I have successfully been able to use the MSVC 2015 ( Community ) IDE to build both 32 bit and 64 bit versions of my application ( with nearly 100 .prg files ). Prior to 16.03, I had no problem with UE Studio building a Harbour / MSVC 2013 / FWH app ( up to 16.02 ). However, with VS / VC 2015, Microsoft made some definite changes and I am apparently not finding the right libraries. I've tried a lot of options, but no go. So, the easiest thing would be for me to create 2 Build.bat files that work with multiple .prg files, and a .rc file. Build64.bat works fine for 1 file with no resources, but I need to do the whole application. [b:g720ij30]Can someone post a sample build32 and build64 batch files that handle multiple .prg files, and an .rc file ? It needs to be specific to MSVC 2015 ( Community ), Harbour, and FWH 16.03.[/b:g720ij30] Thank you. From that I can create what I need. For those who wonder why not use the IDE builds ? I have one issue for sure, and that has to do with checkboxes and radio buttons. When there are multiple of these in a dialog, if I check on one, the text for it ( and other entries ) disappears. It's funny, but my build from .mak files ( which is what UE Studio created but not successfully for 2015 ) do not have that problem, so apparently the IDE is bringing in a .lib that has an issue .... Tim
Build.bat for MSVC 2015
Tim, To build an app using nearly 100 prgs you should use a batch and a makefile as explained here: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=162896#p162896">viewtopic.php?p=162896#p162896</a><!-- l -->
Build.bat for MSVC 2015
Here is the .mak file, but I get the error mak(27) : fatal error U1034: syntax error : separator missing Line 27 references mServiceHistory.prg [code=fw:1ashlmr7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#Microsoft VS2015 make sample, <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2014</span><br /><br />HBDIR=c:\harbour<br />FWDIR=c:\fwh64<br />VCDIR=<span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>rogram Files (x86)<span style="color: #000000;">\M</span>icrosoft Visual Studio 14.0<span style="color: #000000;">\V</span>C"</span><br />SDKDIR=<span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>rogram Files (x86)<span style="color: #000000;">\W</span>indows Kits<span style="color: #000000;">\8</span>.1"</span><br />hdirl=%HBDIR%\lib\vc64<br /><br />PRGS =       \<br />c:\Projects\MLS2015\Source\TDATA.PRG \<br />c:\Projects\MLS2015\Source\emskey.prg \ <br />c:\Projects\MLS2015\Source\TRecord.prg \<br />c:\Projects\MLS2015\Source\TSEARCH.PRG \<br />c:\Projects\MLS2015\Source\mInvPartsPicklist.PRG    \<br />c:\Projects\MLS2015\Source\mLaborGlossary.prg   \<br />c:\Projects\MLS2015\Source\mServiceKits.PRG \<br />c:\Projects\MLS2015\Source\RPTglossary.prg \<br />c:\Projects\MLS2015\Source\mLaborChart.prg  \<br />c:\Projects\MLS2015\Source\mWrkQuote.prg    \<br />c:\Projects\MLS2015\Source\MLSphonebook.prg \<br />c:\Projects\MLS2015\Source\mTimeclocks.prg  \<br />c:\Projects\MLS2015\Source\MLSnotebook.prg  \<br />c:\Projects\MLS2015\Source\MLSphotos.prg    \<br />c:\Projects\MLS2015\Source\MLSmessagecenter.prg \<br />c:\Projects\MLS2015\Source\mWorkClose.prg   \<br />c:\Projects\MLS2015\Source\mFileIndex.prg   \ <br />c:\Projects\MLS2015\Source\mServiceHistory.prg \<br />c:\Projects\MLS2015\Source\G_GRAPH.PRG  \<br />c:\Projects\MLS2015\Source\G_SERVER.PRG \<br />c:\Projects\MLS2015\Source\QBCUST.PRG   \<br />c:\Projects\MLS2015\Source\mCustomer.prg    \<br />c:\Projects\MLS2015\Source\aswEmail.prg \<br />c:\Projects\MLS2015\Source\mClientFollowUp.prg \<br />c:\Projects\MLS2015\Source\mTextEditor.prg \<br />c:\Projects\MLS2015\Source\mClientUtilities.prg \<br />c:\Projects\MLS2015\Source\mPMscheduler.prg \<br />c:\Projects\MLS2015\Source\RPTclient.prg    \<br />c:\Projects\MLS2015\Source\MLScalendar.prg  \<br />c:\Projects\MLS2015\Source\mInvPurchaseOrder.prg \<br />c:\Projects\MLS2015\Source\mInvReturn.prg   \<br />c:\Projects\MLS2015\Source\mInvCore.PRG \<br />c:\Projects\MLS2015\Source\RPTinventory.prg \<br />c:\Projects\MLS2015\Source\mInvUtilities.prg    \<br />c:\Projects\MLS2015\Source\BldComp.PRG  \<br />c:\Projects\MLS2015\Source\emswab.prg   \<br />c:\Projects\MLS2015\Source\InspChk.PRG  \<br />c:\Projects\MLS2015\Source\MLSAutoFU.prg    \<br />c:\Projects\MLS2015\Source\MLSEditor.prg \<br />c:\Projects\MLS2015\Source\NumCnv.prg   \<br />c:\Projects\MLS2015\Source\StrucEdit.prg    \<br />c:\Projects\MLS2015\Source\rpreview.prg \<br />c:\Projects\MLS2015\Source\tCalc.prg    \<br />c:\Projects\MLS2015\Source\utillog.prg  \<br />c:\Projects\MLS2015\Source\ViewWOStatus.prg \<br />c:\Projects\MLS2015\Source\webmap.prg   \<br />c:\Projects\MLS2015\Source\woaudt.prg \<br />c:\Projects\MLS2015\Source\mWorkOrders.prg \<br />c:\Projects\MLS2015\Source\mWorkPrint.prg \<br />c:\Projects\MLS2015\Source\mARaccounts.PRG \<br />c:\Projects\MLS2015\Source\mARtransactions.PRG \<br />c:\Projects\MLS2015\Source\RPTreceivables.prg \<br />c:\Projects\MLS2015\Source\mARutilities.prg \<br />c:\Projects\MLS2015\Source\mAPaccounts.PRG \<br />c:\Projects\MLS2015\Source\mAPtransactions.PRG \<br />c:\Projects\MLS2015\Source\TDATA.PRG \<br />c:\Projects\MLS2015\Source\emskey.prg \<br />c:\Projects\MLS2015\Source\mls_func.prg \<br />c:\Projects\MLS2015\Source\MSGDATE.PRG \<br />c:\Projects\MLS2015\Source\PROSPELL.PRG \<br />c:\Projects\MLS2015\Source\TRecord.prg \<br />c:\Projects\MLS2015\Source\TSEARCH.PRG \<br />c:\Projects\MLS2015\Source\mInvPartsPicklist.PRG \<br />c:\Projects\MLS2015\Source\mLaborGlossary.prg \<br />c:\Projects\MLS2015\Source\mServiceKits.PRG \<br />c:\Projects\MLS2015\Source\RPTglossary.prg \<br />c:\Projects\MLS2015\Source\mLaborChart.prg \<br />c:\Projects\MLS2015\Source\mWrkQuote.prg \<br />c:\Projects\MLS2015\Source\MLSphonebook.prg \<br />c:\Projects\MLS2015\Source\mTimeclocks.prg \<br />c:\Projects\MLS2015\Source\MLSnotebook.prg \<br />c:\Projects\MLS2015\Source\MLSphotos.prg \<br />c:\Projects\MLS2015\Source\MLSmessagecenter.prg \<br />c:\Projects\MLS2015\Source\mWorkClose.prg \<br />c:\Projects\MLS2015\Source\mFileIndex.prg \<br />c:\Projects\MLS2015\Source\mServiceHistory.prg \<br />c:\Projects\MLS2015\Source\G_GRAPH.PRG \<br />c:\Projects\MLS2015\Source\G_SERVER.PRG \<br />c:\Projects\MLS2015\Source\QBCUST.PRG \<br />c:\Projects\MLS2015\Source\mCustomer.prg \<br />c:\Projects\MLS2015\Source\aswEmail.prg \<br />c:\Projects\MLS2015\Source\mClientFollowUp.prg \<br />c:\Projects\MLS2015\Source\mTextEditor.prg \<br />c:\Projects\MLS2015\Source\mClientUtilities.prg \<br />c:\Projects\MLS2015\Source\mPMscheduler.prg \<br />c:\Projects\MLS2015\Source\RPTclient.prg \<br />c:\Projects\MLS2015\Source\MLScalendar.prg \<br />c:\Projects\MLS2015\Source\mInvPurchaseOrder.prg \<br />c:\Projects\MLS2015\Source\mInvReturn.prg \<br />c:\Projects\MLS2015\Source\mInvCore.PRG \<br />c:\Projects\MLS2015\Source\RPTinventory.prg \<br />c:\Projects\MLS2015\Source\mInvUtilities.prg \<br />c:\Projects\MLS2015\Source\BldComp.PRG \<br />c:\Projects\MLS2015\Source\emswab.prg \<br />c:\Projects\MLS2015\Source\InspChk.PRG \<br />c:\Projects\MLS2015\Source\MLSAutoFU.prg \<br />c:\Projects\MLS2015\Source\MLSEditor.prg \<br />c:\Projects\MLS2015\Source\NumCnv.prg \<br />c:\Projects\MLS2015\Source\StrucEdit.prg \<br />c:\Projects\MLS2015\Source\rpreview.prg \<br />c:\Projects\MLS2015\Source\tCalc.prg \<br />c:\Projects\MLS2015\Source\utillog.prg \<br />c:\Projects\MLS2015\Source\ViewWOStatus.prg \<br />c:\Projects\MLS2015\Source\webmap.prg \<br />c:\Projects\MLS2015\Source\woaudt.prg \<br />c:\Projects\MLS2015\Source\mWorkOrders.prg \<br />c:\Projects\MLS2015\Source\mWorkPrint.prg \<br />c:\Projects\MLS2015\Source\mARaccounts.PRG \<br />c:\Projects\MLS2015\Source\mARtransactions.PRG \<br />c:\Projects\MLS2015\Source\RPTreceivables.prg \<br />c:\Projects\MLS2015\Source\mARutilities.prg \<br />c:\Projects\MLS2015\Source\mAPaccounts.PRG \<br />c:\Projects\MLS2015\Source\mAPtransactions.PRG \<br />c:\Projects\MLS2015\Source\mAPutilities.prg \<br />c:\Projects\MLS2015\Source\RPTpayables.prg \<br />c:\Projects\MLS2015\Source\mGLaccounts.PRG \<br />c:\Projects\MLS2015\Source\RPTledger.prg \<br />c:\Projects\MLS2015\Source\mPayroll.prg \<br />c:\Projects\MLS2015\Source\mPayrollProcessing.prg \<br />c:\Projects\MLS2015\Source\RPTpayroll.prg \<br />c:\Projects\MLS2015\Source\mPayrollUtilities.prg \<br />c:\Projects\MLS2015\Source\mBankAccount.prg \<br />c:\Projects\MLS2015\Source\RPTbank.prg \<br />c:\Projects\MLS2015\Source\mReports.prg \<br />c:\Projects\MLS2015\Source\RPTworkordersB.prg \<br />c:\Projects\MLS2015\Source\RPTworkorders.prg \<br />c:\Projects\MLS2015\Source\mASWgraphs.prg \<br />c:\Projects\MLS2015\Source\DemandForce.PRG \<br />c:\Projects\MLS2015\Source\VINDCD.PRG \<br />c:\Projects\MLS2015\Source\UtilCarFax.prg \<br />c:\Projects\MLS2015\Source\merchant.prg \<br />c:\Projects\MLS2015\Source\realtime.prg \<br />c:\Projects\MLS2015\Source\RReward.prg \<br />c:\Projects\MLS2015\Source\rprevfunc.prg \<br />c:\Projects\MLS2015\Source\mConfigSys.prg \<br />c:\Projects\MLS2015\Source\mListEditor.prg \<br />c:\Projects\MLS2015\Source\mInventory.prg \<br />c:\Projects\MLS2015\Source\mListArrays.PRG \<br />c:\Projects\MLS2015\Source\mWorkData.prg \<br />c:\Projects\MLS2015\Source\mWorkParts.prg \<br />c:\Projects\MLS2015\Source\mWorkLabor.prg \<br />c:\Projects\MLS2015\Source\mLookup.prg \<br />c:\Projects\MLS2015\Source\mWorkNeeds.prg \<br />c:\fwh\source\<span style="color: #00C800;">function</span>\errsysw.prg \<br />c:\Projects\MLS2015\Source\mAPutilities.prg \<br />c:\Projects\MLS2015\Source\RPTpayables.prg \<br />c:\Projects\MLS2015\Source\mGLaccounts.PRG \<br />c:\Projects\MLS2015\Source\RPTledger.prg \<br />c:\Projects\MLS2015\Source\mPayroll.prg \<br />c:\Projects\MLS2015\Source\mPayrollProcessing.prg \<br />c:\Projects\MLS2015\Source\RPTpayroll.prg \<br />c:\Projects\MLS2015\Source\mPayrollUtilities.prg \<br />c:\Projects\MLS2015\Source\mBankAccount.prg \<br />c:\Projects\MLS2015\Source\RPTbank.prg \<br />c:\Projects\MLS2015\Source\mReports.prg \<br />c:\Projects\MLS2015\Source\RPTworkordersB.prg \<br />c:\Projects\MLS2015\Source\RPTworkorders.prg \<br />c:\Projects\MLS2015\Source\mASWgraphs.prg \<br />c:\Projects\MLS2015\Source\DemandForce.PRG \<br />c:\Projects\MLS2015\Source\VINDCD.PRG \<br />c:\Projects\MLS2015\Source\UtilCarFax.prg \<br />c:\Projects\MLS2015\Source\merchant.prg \<br />c:\Projects\MLS2015\Source\realtime.prg \<br />c:\Projects\MLS2015\Source\RReward.prg \<br />c:\Projects\MLS2015\Source\rprevfunc.prg \<br />c:\Projects\MLS2015\Source\mConfigSys.prg \<br />c:\Projects\MLS2015\Source\mListEditor.prg \<br />c:\Projects\MLS2015\Source\mInventory.prg \<br />c:\Projects\MLS2015\Source\mListArrays.PRG \<br />c:\Projects\MLS2015\Source\mWorkData.prg \<br />c:\Projects\MLS2015\Source\mWorkParts.prg \<br />c:\Projects\MLS2015\Source\mWorkLabor.prg \<br />c:\Projects\MLS2015\Source\mLookup.prg \<br />c:\Projects\MLS2015\Source\mWorkNeeds.prg \<br />c:\fwh\source\<span style="color: #00C800;">function</span>\errsysw.prg \<br />c:\Projects\MLS2015\Source\Kukui.prg <br /> <br />.SUFFIXES: .prg .c .obj .rc .res <br /><br />MyApp.exe : $<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span> MyApp.res<br />   echo $<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span> > msvc.tmp<br /><br />   echo $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveH32.lib $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\lib\FiveHC32.lib >> msvc.tmp<br /><br />echo %fwdir%\lib\FiveH64.lib %fwdir%\lib\FiveHC64.lib  >> msvc.tmp<br /><br />echo %hdirl%\hbrtl.lib  >> msvc.tmp<br />echo %hdirl%\hbvm.lib  >> msvc.tmp<br />echo %hdirl%\gtgui.lib  >> msvc.tmp<br />echo %hdirl%\hblang.lib  >> msvc.tmp<br />echo %hdirl%\hbmacro.lib  >> msvc.tmp<br />echo %hdirl%\hbrdd.lib  >> msvc.tmp<br />echo %hdirl%\rddntx.lib  >> msvc.tmp<br />echo %hdirl%\rddcdx.lib  >> msvc.tmp<br />echo %hdirl%\rddfpt.lib  >> msvc.tmp<br />echo %hdirl%\hbsix.lib  >> msvc.tmp<br />echo %hdirl%\hbdebug.lib  >> msvc.tmp<br />echo %hdirl%\hbcommon.lib  >> msvc.tmp<br />echo %hdirl%\hbpp.lib  >> msvc.tmp<br />echo %hdirl%\hbcpage.lib  >> msvc.tmp<br />echo %hdirl%\hbwin.lib  >> msvc.tmp<br />echo %hdirl%\hbct.lib  >> msvc.tmp<br />echo %hdirl%\hbziparc.lib >> msvc.tmp<br />echo %hdirl%\hbmzip.lib >> msvc.tmp<br />echo %hdirl%\hbzlib.lib >> msvc.tmp<br />echo %hdirl%\hbpcre.lib >> msvc.tmp<br />echo %hdirl%\minizip.lib >> msvc.tmp<br />echo %hdirl%\xhb.lib >> msvc.tmp<br />echo %hdirl%\hbcplr.lib >> msvc.tmp<br />echo %hdirl%\png.lib >> msvc.tmp<br /><br />rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />echo %hdirl%\rddads.lib >> msvc.tmp<br />echo %hdirl%\ace32.lib >> msvc.tmp<br /><br />echo kernel32.lib  >> msvc.tmp<br />echo user32.lib    >> msvc.tmp<br />echo gdi32.lib     >> msvc.tmp<br />echo winspool.lib  >> msvc.tmp<br />echo comctl32.lib  >> msvc.tmp<br />echo comdlg32.lib  >> msvc.tmp<br />echo advapi32.lib  >> msvc.tmp<br />echo shell32.lib   >> msvc.tmp<br />echo ole32.lib     >> msvc.tmp<br />echo oleaut32.lib  >> msvc.tmp<br />echo uuid.lib      >> msvc.tmp<br />echo odbc32.lib    >> msvc.tmp<br />echo odbccp32.lib  >> msvc.tmp<br />echo iphlpapi.lib  >> msvc.tmp<br />echo mpr.lib       >> msvc.tmp<br />echo version.lib   >> msvc.tmp<br />echo wsock32.lib   >> msvc.tmp<br />echo msimg32.lib   >> msvc.tmp<br />echo oledlg.lib    >> msvc.tmp<br />echo psapi.lib     >> msvc.tmp<br />echo gdiplus.lib   >> msvc.tmp<br />echo winmm.lib     >> msvc.tmp<br />echo vfw32.lib     >> msvc.tmp<br /><br />   <span style="color: #00C800;">IF</span> EXIST MyApp.res echo MyApp.res >> msvc.tmp<br />   <br />   link @msvc.tmp /nologo /subsystem:<span style="color: #000000;">windows</span> /NODEFAULTLIB:<span style="color: #000000;">msvcrt</span> > link.log<br />   @type link.log<br />   @del $<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span><br /><br />$<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span> : $<span style="color: #000000;">&#40;</span>PRGS:.prg=.c<span style="color: #000000;">&#41;</span><br />$<span style="color: #000000;">&#40;</span>PRGS:.prg=.c<span style="color: #000000;">&#41;</span> : $<span style="color: #000000;">&#40;</span>PRGS<span style="color: #000000;">&#41;</span><br /><br />MyApp.res : <span style="color: #000000;">MyApp</span>.rc<br />   rc.exe -r -d__FLAT__ MLS10.rc <br />   <br />.prg.c:<br />   $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /n /i$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br /><br />.c.obj:<br />   cl.exe -c -TC -W3 -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -I$<span style="color: #000000;">&#40;</span>SDKDIR<span style="color: #000000;">&#41;</span>\include -I$<span style="color: #000000;">&#40;</span>VCDIR<span style="color: #000000;">&#41;</span>\include $<<br /> <br /> </div>[/code:1ashlmr7] Also, I assume I must also add all of the BMP files referenced in the RC file. Can you tell me why the separator error ? Tim
Build.bat for MSVC 2015
Tim, All PRGs names must be lowercase (name and extension) Check that there are no tabs in line 47: c:\Projects\MLS2015\Source\mServiceHistory.prg \
Build.bat for MSVC 2015
I re-cased all lines. I removed the offending line and re-entered it. I still get the same error. Tim
Build.bat for MSVC 2015
This works with hbmk2 m.bat [code=fw:1echj2h5]<div class="fw" id="{CB}" style="font-family: monospace;">@echo off<br /><br /><br />SET PATH=C:\Program Files <span style="color: #000000;">&#40;</span>x86<span style="color: #000000;">&#41;</span>\Microsoft Visual Studio <span style="color: #000000;">14.0</span>\VC\;c:\fwh64\Harbour_Vs2015\bin;C:\WINDOWS;C:\WINDOWS\SYSTEM32<br /><br /><br />call <span style="color: #ff0000;">"C:<span style="color: #000000;">\P</span>rogram Files (x86)<span style="color: #000000;">\M</span>icrosoft Visual Studio 14.0<span style="color: #000000;">\V</span>C<span style="color: #000000;">\b</span>in<span style="color: #000000;">\x</span>86_amd64<span style="color: #000000;">\v</span>cvarsx86_amd64.bat"</span><br />set VisualStudioVersion=<span style="color: #000000;">14.0</span><br /><br />hbmk2 -inc -comp=msvc mastro.hbm fwh.hbc -omastrosql <br /><br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br />ECHO ------------------ &nbsp;Application successfully built *<br />echo start mastrosql.exe /HIGH &nbsp;<br />mastrosql.exe<br /><br />GOTO EXIT<br /><br /><br />:<span style="color: #000000;">LINKERROR</span><br />ECHO ****************** Linking errors *<br />GOTO EXIT<br /><br /><br />:<span style="color: #000000;">EXIT</span><br />&nbsp;</div>[/code:1echj2h5] fwh.hbc [code=fw:1echj2h5]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>gt=gtgui<br /><br />incpaths=c:\bcc71<span style="color: #000000;">-64</span>\INCLUDE<br />libpaths=c:\bcc71<span style="color: #000000;">-64</span>\LIB<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>incpaths=include <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libpaths=lib<br />incpaths=C:\FWH64\include<br />libpaths=C:\FWH64\lib<br /><br /><span style="color: #000000;">&#123;</span>bcc64<span style="color: #000000;">&#125;</span>libs=five64 fivec64 &nbsp;<br /><br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=fiveh64 fivehc64 &nbsp;<br /><br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=hbwin <br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=gtgui &nbsp; &nbsp;<br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=hbct <br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=xhb <br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=hbziparc <br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=hbmzip <br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=minizip <br /><span style="color: #000000;">&#123;</span>win<span style="color: #000000;">&#125;</span>libs=png &nbsp;<br /><br /><br /><br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=kernel32 &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=user32 &nbsp; &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=gdi32 &nbsp; &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=winspool &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=comctl32 &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=comdlg32 &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=advapi32 &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=shell32 &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=ole32 &nbsp; &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=oleaut32 &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=uuid &nbsp; &nbsp; &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=odbc32 &nbsp; &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=odbccp32 &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=iphlpapi &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=mpr &nbsp; &nbsp; &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=version &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=wsock32 &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=msimg32 &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=oledlg &nbsp; &nbsp;<br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=psapi &nbsp; &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=gdiplus &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=winmm &nbsp; &nbsp; <br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>libs=vfw32 &nbsp; &nbsp; <br /><br /><br /><br />&nbsp;</div>[/code:1echj2h5] mastro.hbm [code=fw:1echj2h5]<div class="fw" id="{CB}" style="font-family: monospace;">#<span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>-ldflag=/FORCE:<span style="color: #000000;">multiple</span><br />#<span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>-ldflag=/NODEFAULTLIB:<span style="color: #000000;">libc</span><br /><br /><span style="color: #000000;">&#123;</span>msvc<span style="color: #000000;">&#125;</span>-ldflag= -W3 -O2 &nbsp;<br /><br />-tshead=timestamp.ch <br /><br />-n <br />-m <br />-w <br />-es2 <br />-gc0 <br />-p <br />-q<br /><br />tutor01.prg<br />tutor02.prg <br /><br /><br />mastrosql.res<br />&nbsp;</div>[/code:1echj2h5] Regards Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
Build.bat for MSVC 2015
Tim, Please remove the line that fails and try it again Don't reenter it Lets see if the error continues without it
Build.bat for MSVC 2015
Maurizio, You appear to have a Borland path reference in there which I am not using. Antonio, It's not that line. Here is a modified go64.bat file. I modified it, and put it in the same folder as the .prg files. [code=fw:1ehs2oof]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#Microsoft VS2015 make sample, <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2014</span><br /><br />HBDIR=c:\harbour<br />FWDIR=c:\fwh64<br />VCDIR=<span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>rogram Files (x86)<span style="color: #000000;">\M</span>icrosoft Visual Studio 14.0<span style="color: #000000;">\V</span>C"</span><br />SDKDIR=<span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>rogram Files (x86)<span style="color: #000000;">\W</span>indows Kits<span style="color: #000000;">\8</span>.1"</span><br />hdirl=%HBDIR%\lib\vc64<br /><br />PRGS = tdata.prg emskey.prg trecord.prg tsearch.prg minvpartspicklist.prg&nbsp; &nbsp;mlaborglossary.prg&nbsp; \<br />mservicekits.prg&nbsp; &nbsp; rptglossary.prg mlaborchart.prg&nbsp;mwrkquote.prg&nbsp; &nbsp;mlsphonebook.prg&nbsp; &nbsp; mtimeclocks.prg&nbsp;\<br />mlsnotebook.prg&nbsp;mlsphotos.prg&nbsp; &nbsp;mlsmessagecenter.prg mworkclose.prg&nbsp;mfileindex.prg&nbsp; mservicehistory.prg \<br />g_graph.prg&nbsp;g_server.prg&nbsp; &nbsp; qbcust.prg&nbsp; mcustomer.prg&nbsp; &nbsp;aswemail.prg&nbsp; &nbsp; mclientfollowup.prg mtexteditor.prg \<br />mclientutilities.prg mpmscheduler.prg&nbsp; &nbsp;rptclient.prg&nbsp; &nbsp;mlscalendar.prg&nbsp;minvpurchaseorder.prg minvreturn.prg&nbsp; &nbsp; \<br />minvcore.prg&nbsp; &nbsp; rptinventory.prg minvutilities.prg&nbsp; bldcomp.prg&nbsp;emswab.prg&nbsp; inspchk.prg&nbsp;mlsautofu.prg&nbsp; &nbsp;\<br />mlseditor.prg numcnv.prg&nbsp; &nbsp; strucedit.prg&nbsp; &nbsp;rpreview.prg&nbsp; &nbsp; tcalc.prg&nbsp; &nbsp;utillog.prg&nbsp;viewwostatus.prg webmap.prg&nbsp;\<br />woaudt.prg mworkorders.prg mworkprint.prg maraccounts.prg martransactions.prg rptreceivables.prg marutilities.prg \<br />mapaccounts.prg maptransactions.prg tdata.prg emskey.prg mls_func.prg msgdate.prg prospell.prg trecord.prg \<br />tsearch.prg minvpartspicklist.prg mlaborglossary.prg mservicekits.prg rptglossary.prg mlaborchart.prg \<br />mwrkquote.prg mlsphonebook.prg mtimeclocks.prg mlsnotebook.prg mlsphotos.prg mlsmessagecenter.prg mworkclose.prg \<br />mfileindex.prg mservicehistory.prg g_graph.prg g_server.prg qbcust.prg mcustomer.prg aswemail.prg mclientfollowup.prg \<br />mtexteditor.prg mclientutilities.prg mpmscheduler.prg rptclient.prg mlscalendar.prg minvpurchaseorder.prg minvreturn.prg \<br />minvcore.prg rptinventory.prg minvutilities.prg bldcomp.prg emswab.prg inspchk.prg mlsautofu.prg mlseditor.prg numcnv.prg \<br />strucedit.prg rpreview.prg tcalc.prg utillog.prg viewwostatus.prg webmap.prg woaudt.prg mworkorders.prg mworkprint.prg \<br />maraccounts.prg martransactions.prg rptreceivables.prg marutilities.prg mapaccounts.prg maptransactions.prg maputilities.prg \<br />rptpayables.prg mglaccounts.prg rptledger.prg mpayroll.prg mpayrollprocessing.prg rptpayroll.prg mpayrollutilities.prg \<br />mbankaccount.prg rptbank.prg mreports.prg rptworkordersb.prg rptworkorders.prg maswgraphs.prg demandforce.prg vindcd.prg \<br />utilcarfax.prg merchant.prg realtime.prg rreward.prg rprevfunc.prg mconfigsys.prg mlisteditor.prg minventory.prg mlistarrays.prg \<br />mworkdata.prg mworkparts.prg mworklabor.prg mlookup.prg mworkneeds.prg maputilities.prg rptpayables.prg mglaccounts.prg \<br />rptledger.prg mpayroll.prg mpayrollprocessing.prg rptpayroll.prg mpayrollutilities.prg mbankaccount.prg rptbank.prg mreports.prg \<br />rptworkordersb.prg rptworkorders.prg maswgraphs.prg demandforce.prg vindcd.prg utilcarfax.prg merchant.prg realtime.prg rreward.prg \<br />rprevfunc.prg mconfigsys.prg mlisteditor.prg minventory.prg mlistarrays.prg mworkdata.prg mworkparts.prg mworklabor.prg mlookup.prg \<br />mworkneeds.prg kukui.prg <br />&nbsp;<br />.SUFFIXES: .prg .c .obj .rc .res <br /><br />MyApp.exe : $<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span> MyApp.res<br />&nbsp; echo $<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span> > msvc.tmp<br />&nbsp; &nbsp; echo %fwdir%\lib\FiveH64.lib %fwdir%\lib\FiveHC64.lib &nbsp;>> msvc.tmp<br /><br />echo %hdirl%\hbrtl.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbvm.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\gtgui.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hblang.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbmacro.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbrdd.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\rddntx.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\rddcdx.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\rddfpt.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbsix.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbdebug.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbcommon.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbpp.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbcpage.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbwin.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbct.lib &nbsp;>> msvc.tmp<br />echo %hdirl%\hbziparc.lib >> msvc.tmp<br />echo %hdirl%\hbmzip.lib >> msvc.tmp<br />echo %hdirl%\hbzlib.lib >> msvc.tmp<br />echo %hdirl%\hbpcre.lib >> msvc.tmp<br />echo %hdirl%\minizip.lib >> msvc.tmp<br />echo %hdirl%\xhb.lib >> msvc.tmp<br />echo %hdirl%\hbcplr.lib >> msvc.tmp<br />echo %hdirl%\png.lib >> msvc.tmp<br /><br />rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />echo %hdirl%\rddads.lib >> msvc.tmp<br />echo %hdirl%\ace32.lib >> msvc.tmp<br /><br />echo kernel32.lib &nbsp;>> msvc.tmp<br />echo user32.lib &nbsp; &nbsp;>> msvc.tmp<br />echo gdi32.lib &nbsp; &nbsp; >> msvc.tmp<br />echo winspool.lib &nbsp;>> msvc.tmp<br />echo comctl32.lib &nbsp;>> msvc.tmp<br />echo comdlg32.lib &nbsp;>> msvc.tmp<br />echo advapi32.lib &nbsp;>> msvc.tmp<br />echo shell32.lib &nbsp; >> msvc.tmp<br />echo ole32.lib &nbsp; &nbsp; >> msvc.tmp<br />echo oleaut32.lib &nbsp;>> msvc.tmp<br />echo uuid.lib &nbsp; &nbsp; &nbsp;>> msvc.tmp<br />echo odbc32.lib &nbsp; &nbsp;>> msvc.tmp<br />echo odbccp32.lib &nbsp;>> msvc.tmp<br />echo iphlpapi.lib &nbsp;>> msvc.tmp<br />echo mpr.lib &nbsp; &nbsp; &nbsp; >> msvc.tmp<br />echo version.lib &nbsp; >> msvc.tmp<br />echo wsock32.lib &nbsp; >> msvc.tmp<br />echo msimg32.lib &nbsp; >> msvc.tmp<br />echo oledlg.lib &nbsp; &nbsp;>> msvc.tmp<br />echo psapi.lib &nbsp; &nbsp; >> msvc.tmp<br />echo gdiplus.lib &nbsp; >> msvc.tmp<br />echo winmm.lib &nbsp; &nbsp; >> msvc.tmp<br />echo vfw32.lib &nbsp; &nbsp; >> msvc.tmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> EXIST MyApp.res echo MyApp.res >> msvc.tmp<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;link @msvc.tmp /nologo /subsystem:<span style="color: #000000;">windows</span> /NODEFAULTLIB:<span style="color: #000000;">msvcrt</span> > link.log<br />&nbsp; &nbsp;@type link.log<br />&nbsp; &nbsp;@del $<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span><br /><br />$<span style="color: #000000;">&#40;</span>PRGS:.prg=.obj<span style="color: #000000;">&#41;</span> : $<span style="color: #000000;">&#40;</span>PRGS:.prg=.c<span style="color: #000000;">&#41;</span><br />$<span style="color: #000000;">&#40;</span>PRGS:.prg=.c<span style="color: #000000;">&#41;</span> : $<span style="color: #000000;">&#40;</span>PRGS<span style="color: #000000;">&#41;</span><br /><br />MyApp.res : <span style="color: #000000;">MyApp</span>.rc<br />&nbsp; &nbsp;rc.exe -r -d__FLAT__ MLS10.rc <br />&nbsp; &nbsp;<br />.prg.c:<br />&nbsp; &nbsp;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /n /i$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include<br /><br />.c.obj:<br />&nbsp; &nbsp;<span style="color: #000000;">cl</span>.exe -c -TC -W3 -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -I$<span style="color: #000000;">&#40;</span>SDKDIR<span style="color: #000000;">&#41;</span>\include -I$<span style="color: #000000;">&#40;</span>VCDIR<span style="color: #000000;">&#41;</span>\include $<<br />&nbsp;<br />&nbsp;</div>[/code:1ehs2oof] Now it fails at line 41 which is adding hbvm.lib. It doesn't matter what is there, it still fails with the "missing separator" error. Also, I assume I have to specify the .bmp files that are included in the .rc build. How do I list them ? Tim
Build.bat for MSVC 2015
Tim , it can works with msvc or borland , for 32 or 64 bit . Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
Build.bat for MSVC 2015
Tim, Do you have the libs here ? FWDIR=c:\fwh64 %FWDIR%\lib ? Please check that they are there
Build.bat for MSVC 2015
The libs are all in the right place. I checked that before posting. Everything builds, and the .obj files all link in, but then it replies that it cannot open the .lib files. If I comment some, then the first one it sees will generate the same message.
Build.bat for MSVC 2015
Tim, > Here is a modified go64.bat file Surely you meant a makefile filename Please post here the msvc.tmp file that is created The .bmp filenames are already listed in your RC file. You don't need to list them in this makefile
Build.bat for MSVC 2015
Yes,I meant a .mak file name. There is no msvc.tmp file being created at this point.
Build.bat for MSVC 2015
Tim, Could we have a TeamViewer (or similar) session ?
Build.bat for MSVC 2015
Sure ... I'll email you the info.
Build.bat for MSVC 2015
Problem solved: Never forget to add a tab in front of each makefile line to execute
Build.bat for MSVC 2015
One more STOP NMAKE : fatal error U1077: 'link' : return code '0x49d' The command line was link @msvc.tmp /nologo /subsysterm:windows /NODEFAULTLIB:msvcrt > link.log Tim
Build.bat for MSVC 2015
Tim, Please post here the contents of link.log
Build.bat for MSVC 2015
The error is: LINK : fatal error LNK1181: cannot open input file '%fwdir%\lib\FiveH64.lib' In the .mak file: echo %fwdir%\lib\FiveH64.lib %fwdir%\lib\FiveHC64.lib >> msvc.tmp FiveH64.lib and FiveHC64.lib are in the C:\FWH64\lib folder The path is: FWDIR=c:\fwh64
Build.bat for MSVC 2015
Tim, Please replace %fwdir% with %FWDIR%
Build.bat for MSVC 2015
I already tried that. I tried again. It makes no difference. I'm wondering if there is an issue with it not thinking this is a 64 bit app. It says it can't open the .lib file, not that it can't find it ( if that makes a difference ). The files are from you and dated 3/30/16 I commented that one out and tried to see what happens. The next .lib gets the same error message. So it is not happy with the .lib files ?
Build.bat for MSVC 2015
Tim, Lets have another TeamViewer session <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Build.bat for MSVC 2015
I sent you an email with the Team Viewer info and the computer is setup for you. I also have a Go32.bat and a 32 bit mak file in a separate folder. That calls the 32 bit libs and it fails at exactly the same place. I did other testing where I commented out all Harbour and FWH libs, and it does link all of the windows libs without a problem. If I build these using the Visual Studio 2015 Community edition, the programs do completely assemble and run. However, I have not resolved a few performance issues with that so I can't use those for clients at this time. The main issue there is that I am apparently calling one incorrect library because clicking n a check box removes the associated text ( as it does with a radio button ). This was also a problem with VS 2013. Once I figure out that issue, those builds might be OK. I imagine it is going to be something to do with the format of the .mak file. I also copied both folders to my Surface Book, and it has the same exact error. Tim
Build.bat for MSVC 2015
The problem continues. I'm using the .bat and .mak files discussed previously. We've had errors formatting the .mak file which are all corrected. This is using Harbour, FWH 16.03, and MSVC 2015. This is to be a 64 bit build, but the linker is acting like it's a 32 bit build and giving the following error on ALL 64 bit libs that are to be linked in: C:\Program Files (x86)\Windows Kits\10\lib\10.0.10586.0\um\x64\vfw32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86' I apparently need to add a line to the .mak file that makes this application target machine x64. It's not handled in any of the samples we have seen posted. Here is the Link command from the .mak file: link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:msvcrt > link.log Ideas ?
Build.bat for MSVC 2015
Tim, VS vcvarsall.bat is not properly being called VS vcvarsall.bat selects to work with 32 or 64 bits
Build.bat for MSVC 2015
The call is right, the file is there ...
Build.bat for MSVC 2015
Tim, This error means that it is building in 32 bits mode: library machine type 'x64' conflicts with [b:2upxskyh]target machine type 'X86'[/b:2upxskyh]
Build.bat for MSVC 2015
Yes, that is what I have been trying to point out. By deduction: 1) Harbour translates .prg to .c. That is not specific to 32 or 64 bit ... 2) The C compiler translates .c to .obj. I don't know if that is specific to 32 or 64 bit. 3) The linker obviously thinks this is 32 bit code. 4) The .lib files are ALL 64 bit ( harbour and FWH ) So ... do we have a flag for the c compiler and/or linker that push them to build 64 bit ? Tim
Build.bat for MSVC 2015
Tim, It is not a flag. When we call vcvarsall.bat with the right parameter, a different C compiler is selected.
BuildCe.bat make easy...
Hi, I made a program to automate the process of building exe and copy the exe to a directory mounted to emulator. Screen capture: [img:3aerv5ru]http&#58;//x2f&#46;xanga&#46;com/f93a70ea5043567634188/b45406435&#46;jpg[/img:3aerv5ru] What it does: 1. Open a source program 2. Compile it by calling BuildCE.bat 3. Copy the exe to a default directory e.g. C:\FWPPC\Output (Make this directory yourself and mount it to the emulator) This little program saves me lot of time instead of typing commands and drag drop files by using file explorer! If you are interested in it, please let me know! Paul
BuildCe.bat make easy...
Paul, Thanks for your contribution <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
BuildCe.bat make easy...
Download from here [url:uyakxu8n]http&#58;//hyperupload&#46;com/download/024e4bb231/BuildCE_MadeEasy&#46;zip&#46;html[/url:uyakxu8n] Paul
BuildComDcb()
I have a strange problem with BuildComDbc().... When using the MicroSoft Bluetooth Stack if I try: [b:2m5o7ic7]IF[/b:2m5o7ic7] BuildCommDcb( "COM"+alltrim(str(nComPort))+":9600,N,8,1", @cDcb ) Endif It returns .f. On the Toshiba Bluetooth Stack it returns .t. Here is the strange part.... If I remove the "IF" and just try "BuildCommDcb( "COM"+alltrim(str(nComPort))+":9600,N,8,1", @cDcb )" then continue with my connection it does connect to the COM port BUT, if I connect and disconnect 4 times in a row the software will freeze when I do a: WriteComm( nComm, Hex2Str("027004020861DF03")) Again, using the Toshiba Bluetooth stack I can connect/disconnect as many times as I want without any problems. Any ideas? Is there any other way to connect to a Bluetooth Serial Port (other lib maybe) ???
BuildComDcb()
Jeff, I had problems with FW-build in COM support and RDP. I have substituted through this obj. <!-- m --><a class="postlink" href="http://www.atzwanger-software.com/fw/COMTOOLS.ZIP">http://www.atzwanger-software.com/fw/COMTOOLS.ZIP</a><!-- m --> Best regards, Otto
BuildComDcb()
Thanks Otto ... Is there a Com Write function?
BuildComDcb()
Jeff, yes. I never tried these functions. Best regards, Otto [code=fw:2yy4fuz7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//*****************************************************************************</span><br /><span style="color: #B900B9;">//*</span><br /><span style="color: #B900B9;">//* &nbsp; &nbsp; ComWrite</span><br /><span style="color: #B900B9;">//*</span><br /><span style="color: #B900B9;">//*****************************************************************************</span><br /><span style="color: #B900B9;">// &nbsp;Ein Zeichen senden</span><br /><span style="color: #B900B9;">// &nbsp;Nr &nbsp; &nbsp; &nbsp;: Ist die Nummer des Com-Ports (0=COM1 1=COM2 ...)</span><br /><span style="color: #B900B9;">// &nbsp;Zeichen : Ist das Zeichen das gesendet werden soll.</span><br /><span style="color: #B900B9;">// &nbsp;Ergibt die Anzahl der gesendeten Zeichen</span><br />int ComWrite<span style="color: #000000;">&#40;</span>unsigned Nr,int Zeichen<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />DWORD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwCount;<br /><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Nr>=MAX_COM_PORTS<span style="color: #000000;">&#41;</span><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>!bIsOpen<span style="color: #000000;">&#91;</span>Nr<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><br />&nbsp; &nbsp; WriteFile<span style="color: #000000;">&#40;</span>hComFile<span style="color: #000000;">&#91;</span>Nr<span style="color: #000000;">&#93;</span>,&Zeichen,<span style="color: #000000;">1</span>,&dwCount,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br /><br /><br /><span style="color: #00C800;">return</span> dwCount;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//*****************************************************************************</span><br /><span style="color: #B900B9;">//*</span><br /><span style="color: #B900B9;">//* &nbsp; &nbsp; ComWrite</span><br /><span style="color: #B900B9;">//*</span><br /><span style="color: #B900B9;">//*****************************************************************************</span><br /><span style="color: #B900B9;">// &nbsp;Mehrere Zeichen schreiben</span><br /><span style="color: #B900B9;">// &nbsp;Nr &nbsp; &nbsp; &nbsp;: Ist die Nummer des Com-Ports (0=COM1 1=COM2 ...)</span><br /><span style="color: #B900B9;">// &nbsp;Buffer &nbsp;: Buffer in dem die Zeichen gespeichert werden</span><br /><span style="color: #B900B9;">// &nbsp;Count &nbsp; : Anzahl der zu sendenden Zeichen</span><br /><span style="color: #B900B9;">// &nbsp;Ergibt die Anzahl der gesendeten Zeichen</span><br />int ComWriteBuf<span style="color: #000000;">&#40;</span>unsigned Nr,void *Buffer,int <span style="color: #0000ff;">Count</span><span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />DWORD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwCount;<br /><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Nr>=MAX_COM_PORTS<span style="color: #000000;">&#41;</span><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>!bIsOpen<span style="color: #000000;">&#91;</span>Nr<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><br />&nbsp; &nbsp; WriteFile<span style="color: #000000;">&#40;</span>hComFile<span style="color: #000000;">&#91;</span>Nr<span style="color: #000000;">&#93;</span>,Buffer,<span style="color: #0000ff;">Count</span>,&dwCount,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #00C800;">return</span> dwCount;<br /><span style="color: #000000;">&#125;</span><br /><br />&nbsp;</div>[/code:2yy4fuz7]
BuildComDcb()
Otto, I don't see where I can set the post speed, parity etc... Am I missing something?
BuildComDcb()
Best regards, otto [code=fw:166l6wdd]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> COMOPEN <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// () --> nPorts</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; unsigned Nr &nbsp; &nbsp; = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; int iBaud &nbsp; &nbsp; &nbsp; = <span style="color: #000000;">9600</span>;<br />&nbsp; &nbsp; int iParity &nbsp; &nbsp; = P_NONE;<br />&nbsp; &nbsp; int iStopbits = S_1BIT;<br />&nbsp; &nbsp; int iDatabits = D_8BIT;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> iBaud &nbsp; &nbsp; &nbsp; &nbsp; = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> iParity &nbsp; = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> iStopbits = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> iDatabits = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br /><br /><br />&nbsp; &nbsp; hb_retl<span style="color: #000000;">&#40;</span> ComOpen <span style="color: #000000;">&#40;</span> Nr, iBaud, iParity, iStopbits, iDatabits <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:166l6wdd]
BuildComDcb()
A copy of Otto's posted ComTools, thanks [url:mqlcwgas]http&#58;//code&#46;google&#46;com/p/fivewin-contributions/downloads/detail?name=comtools&#46;zip&can=2&q=[/url:mqlcwgas]
BuildComDcb()
Not having any luck with this... ComOpen returns .t. but ComWrite returns 0
BuildComDcb()
Try this terminal sample: [code=fw:25s6lx94]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> oDlg<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> oGet, cTxt := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nCom<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">500</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Terminale"</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cTxt MEMO READONLY<br /><br />&nbsp; &nbsp; oGet:<span style="color: #000000;">bKeyDown</span> = <span style="color: #000000;">&#123;</span> | nKey | Tasti<span style="color: #000000;">&#40;</span> nCom, nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">AdjClient</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCom := APRICOM<span style="color: #000000;">&#40;</span> oDlg, oGet <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> nCom < <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">CENTER</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> nCom >= <span style="color: #000000;">0</span>; CLOSECOMM<span style="color: #000000;">&#40;</span> nCom <span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TASTI<span style="color: #000000;">&#40;</span> nCom, nKey <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; SENDSTR<span style="color: #000000;">&#40;</span> nCom, CHR<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> APRICOM<span style="color: #000000;">&#40;</span> oDlg, oGet <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nCom, cDcb<br /><br />&nbsp; &nbsp; BEGIN SEQUENCE<br />&nbsp; &nbsp; &nbsp; &nbsp; nCom = OPENCOMM<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COM1"</span>, <span style="color: #000000;">16384</span>, <span style="color: #000000;">16384</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> nCom < <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Errore di apertura della porta di comunicazione."</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">BREAK</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; BUILDCOMMDCB<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COM1:115200,N,8,1"</span>, @cDcb <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !SETCOMMSTATE<span style="color: #000000;">&#40;</span> nCom, cDcb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Errore di impostazione della porta di comunicazione."</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">BREAK</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; oDlg:<span style="color: #000000;">bCommNotify</span> = <span style="color: #000000;">&#123;</span> | nCom | Connect<span style="color: #000000;">&#40;</span> nCom, oGet <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EnableCommNotification<span style="color: #000000;">&#40;</span> nCom, oDlg:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !ENABLECOMMNOTIFICATION<span style="color: #000000;">&#40;</span> nCom, oDlg:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Errore di abilitazione della notifica."</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">BREAK</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; RECOVER<br />&nbsp; &nbsp; &nbsp; &nbsp; nCom = <span style="color: #000000;">-1</span><br />&nbsp; &nbsp; END SEQUENCE<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> nCom<br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CONNECT<span style="color: #000000;">&#40;</span> nCom, oGet <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> cStr<br /><br />&nbsp; &nbsp; ENABLECOMMNOTIFICATION<span style="color: #000000;">&#40;</span> nCom, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cStr = RECEIVESTR<span style="color: #000000;">&#40;</span> nCom <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cStr = STRTRAN<span style="color: #000000;">&#40;</span> cStr, CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">13</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cStr = STRTRAN<span style="color: #000000;">&#40;</span> cStr, CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, CRLF <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; oGet:<span style="color: #000000;">Append</span><span style="color: #000000;">&#40;</span> cStr <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> SENDSTR<span style="color: #000000;">&#40;</span> nCom, cString <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nBytes := WRITECOMM<span style="color: #000000;">&#40;</span> nCom, cString <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> nBytes = LEN<span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> RECEIVESTR<span style="color: #000000;">&#40;</span> nCom <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> cBuf := SPACE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1000</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span> cBuf, READCOMM<span style="color: #000000;">&#40;</span> nCom, @cBuf <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:25s6lx94] EMG
BuildComDcb()
Thanks Enrico, Your test program seems to be collecting data from com port... I will need to modify my program to see if it solves the problem of connecting/disconnecting. With the MS stack I can only connect/disconnect about 4 times before the system locks up... This never happens with the Toshiba Stack.
BuildComDcb()
[quote="Jeff Barnes":rwqd4907]Thanks Enrico, Your test program seems to be collecting data from com port...[/quote:rwqd4907] You can also send data hitting keys on the keyboard. EMG
BuildCommDCB
El problema que tengo con la funcion BuildCommDCB es que no configura el puerto com del PC. La utilizo de la siguiente manera: [color=red:2h4jojyr]nComHandle:=OpenCom("COM4",1024,1024) BuildCommDcb("COM4:9600,N,8,1", @cDcb)[/color:2h4jojyr] Para configurarlo tengo que irme al MS-DOS y hacer lo siguiente: [color=blue:2h4jojyr]MODE COM4 9600,N,8,1[/color:2h4jojyr] Alguien me puede decir qué puede estar pasando o qué hago mal. Gracias.
BuildCommDCB
Verhoven, Haz una búsqueda de BuildCommDCB() en los *.PRG de fwh\samples y verás como hay que usarlo
BuildCommDCB
Gracias por contestar Antonio, he probado ya de todo y en varios ordenadores a ver si es que se tratara de un fallo por estar usando un puerto COM creado a través de uno USB con un cable conversor USB-RS-232. Pero NO. [color=red:3ln94s7b]El problema es que la funcion BuildCommDCB no configura el puerto a lo que dice que lo hace.[/color:3ln94s7b] El puerto originalmente esta configurado como 1200,N,7,1 y lo tengo que cambiar a 9600,N,8,1 para poderme comunicar con el dispositivo y esto es lo que no hace BuildCommDcb. Cuando lo hago desde la consola de MS-DOS del W-XP con el comando MODE COM4 9600,N,8,1 si deja bien configurado el puerto y me conunico correctamente hacia y desde el dispositivo con mi programa, pero como antes no haga esto no hay forma. He probado el \samples\Commtest.prg y aunque en el archivo log que genera dice que todo está correcto la verdad es que no. De hecho le he puesto que cuando llega a la opcion COM4 9600 N 8 1 mande un mensaje al puerto, para probar si el dispositivo conectado lo reconoce y que por lo tanto lo ha configurado bien y me da un error en el dispositivo porque en realidad no ha modificado la configuracion del puerto que sigue estando en 1200,N,7,1. Configuración que compruebo haciendo en la consola de MS-DOS MODE COM4 que, como sabes, lista la configuracion del mismo. ¿Qué más puedo probar?.
BuildCommDCB
Verhoven, En realidad BuildCommDcb() solo rellena la información de una esctructura "DCB". En realidad la función que aplica esos valores es: SetCommState() y aqui es donde está la diferencia con los 16 bits. En Clipper se usa así: SetCommState( cDcb ), pero en 32 bits se usa así: [color=red:3ff4yx50]SetCommState( nComm, cDcb )[/color:3ff4yx50] en donde nComm es el valor devuelto por OpenComm(). Pruébalo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BuildCommDCB
Antonio he probado pero sigue igual. Te pongo el trozo de codigo para que puedas ver exactamente como lo hago: function Prueba() local lPortReady:=.f. local nBytes :=0 local nError :=0 local cTexto :='Prueba escritura RS-232' local [color=green:2zn8ihxe]cPort:='4', cSpeed:='9600'[/color:2zn8ihxe] local cDcb, cRv := '', cS := 'COM' + cPort + ':' + cSpeed + ',n,8,1' // Abre el puerto en el PC. [color=green:2zn8ihxe] nComm := OpenComm( 'COM' + cPort, 1024 , 128 )[/color:2zn8ihxe] IF nComm >= 0 // We have a valid port... msginfo(' Se ha abierto el puerto: COM' + cPort) IF [color=green:2zn8ihxe]BuildCommDcb( cS, @cDcb )[/color:2zn8ihxe] // Set Speed, etc IF [color=green:2zn8ihxe]SetCommState( nComm, cDcb )[/color:2zn8ihxe] cRv := '' msginfo('SetCommState CORRECTO: '+cs) lPortReady:=.t. ELSE cRv := 'Failed to SetCommState on COM' + cPort + ' at ' + cSpeed ENDIF ELSE cRv := 'Failed to BuildCommDCB on COM' + cPort + ' at ' + cSpeed ENDIF ELSE cRv := 'Failed to find COM' + cPort ENDIF if ! lPortReady nError = GetCommError( nComm ) MsgInfo( cRv ) endif // Escribe en el puerto COM if ( nBytes := WriteComm( nComm, cTexto ) ) < 0 nError = GetCommError( nComm ) MsgInfo( cCom+", WriteComm Error: " + Str( nError ),'Error' ) endif //Limpia el buffer del puerto if FlushComm( nComm, 0 ) != 0 nError = GetCommError( nComm ) MsgInfo( cCom+", FlushComm Error: " + Str( nError ) ) endif // Cierra el puerto CloseComm( nComm ) return nil
BuildCommDCB: flow control strings
Hello all. I know that BUILDCOMMDCB( "COM1:9600,N,8,1", @cDcb ) opens the COM1: port, but how to enable flow control ? I've read at <!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/aa363143%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library ... 85%29.aspx</a><!-- m --> that the parameters are the same of the MODE command, but then it talks about strings ending with "p" or "x". I'm confused. Definitely, what do I have to add to the string above to enable: 1) XON/XOFF 2) RTS/CTS 3) DSR/DTR Thanks, Davide