Visual Studio with harbour

User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Visual Studio with harbour

Post by MFarias »

Hello All, after doing all the procedures found in the link
http://forums.fivetechsupport.com/viewt ... 17&t=28723
I have a problem at compile time, below is a return VS by:

Code: Select all

1>------ Build started: Project: teste, Configuration: Debug Win32 ------
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(wsetloca.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(winapisupp.obj) : error LNK2005: ___crtGetShowWindowMode already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(winapisupp.obj) : error LNK2005: ___crtSetUnhandledExceptionFilter already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(winapisupp.obj) : error LNK2005: ___crtTerminateProcess already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(winapisupp.obj) : error LNK2005: ___crtUnhandledException already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR120D.dll)
1>LIBCMT.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR120D.dll)
1>     Creating library C:\des\fivewin\teste\teste\Debug\teste.lib and object C:\des\fivewin\teste\teste\Debug\teste.exp
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>FiveH32.lib(VALBLANK.obj) : error LNK2001: unresolved external symbol _HB_FUN_CTOT
1>FiveH32.lib(DATAROW.obj) : error LNK2001: unresolved external symbol _HB_FUN_CTOT
1>FiveH32.lib(HARBOUR.obj) : error LNK2001: unresolved external symbol _HB_FUN_TOLEAUTO
1>FiveH32.lib(ADOFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_TOLEAUTO
1>FiveH32.lib(WINDOW.obj) : error LNK2001: unresolved external symbol _HB_FUN_NOTIFY
1>FiveH32.lib(TGET.obj) : error LNK2001: unresolved external symbol _HB_FUN_ANSITOWIDE
1>FiveH32.lib(FWDECODE.obj) : error LNK2001: unresolved external symbol _HB_FUN_HHASKEY
1>FiveH32.lib(PRV2PDF.obj) : error LNK2001: unresolved external symbol _HB_FUN_TTOS
1>FiveH32.lib(ADOFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_TTOS
1>FiveH32.lib(PRV2PDF.obj) : error LNK2001: unresolved external symbol _HB_FUN_DATETIME
1>FiveH32.lib(XBROWSE.obj) : error LNK2001: unresolved external symbol _HB_FUN_HB_DECODE
1>FiveH32.lib(XBROWSE.obj) : error LNK2001: unresolved external symbol _HB_FUN_WILDMATCH
1>FiveH32.lib(OLEFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_GETACTIVEOBJECT
1>FiveH32.lib(OLEFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_CREATEOBJECT
1>C:\des\fivewin\teste\teste\Debug\teste.exe : fatal error LNK1120: 11 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
thank you
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Visual Studio with harbour

Post by Antonio Linares »

Matheus,

You have to add this command too: /NODEFAULTLIB:libcmt

If you don't know where to place it, just tell me and I will help you :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Visual Studio with harbour

Post by MFarias »

Antonio

I do not know where to put this definition ...
I saw something in properties but had no success.
please show me [:)]
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Visual Studio with harbour

Post by Antonio Linares »

Matheus,

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Visual Studio with harbour

Post by MFarias »

Antonio

still with 17 errors:

Code: Select all

1>------ Build started: Project: teste, Configuration: Debug Win32 ------
1>  teste.c
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
1>teste.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1>     Creating library C:\des\fivewin\teste\teste\Debug\teste.lib and object C:\des\fivewin\teste\teste\Debug\teste.exp
1>FiveH32.lib(VALBLANK.obj) : error LNK2001: unresolved external symbol _HB_FUN_CTOT
1>FiveH32.lib(DATAROW.obj) : error LNK2001: unresolved external symbol _HB_FUN_CTOT
1>FiveH32.lib(HARBOUR.obj) : error LNK2001: unresolved external symbol _HB_FUN_TOLEAUTO
1>FiveH32.lib(ADOFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_TOLEAUTO
1>FiveH32.lib(WINDOW.obj) : error LNK2001: unresolved external symbol _HB_FUN_NOTIFY
1>FiveH32.lib(TGET.obj) : error LNK2001: unresolved external symbol _HB_FUN_ANSITOWIDE
1>FiveH32.lib(FWDECODE.obj) : error LNK2001: unresolved external symbol _HB_FUN_HHASKEY
1>FiveH32.lib(PRV2PDF.obj) : error LNK2001: unresolved external symbol _HB_FUN_TTOS
1>FiveH32.lib(ADOFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_TTOS
1>FiveH32.lib(PRV2PDF.obj) : error LNK2001: unresolved external symbol _HB_FUN_DATETIME
1>FiveH32.lib(XBROWSE.obj) : error LNK2001: unresolved external symbol _HB_FUN_HB_DECODE
1>FiveH32.lib(XBROWSE.obj) : error LNK2001: unresolved external symbol _HB_FUN_WILDMATCH
1>FiveH32.lib(OLEFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_GETACTIVEOBJECT
1>FiveH32.lib(OLEFUNCS.obj) : error LNK2001: unresolved external symbol _HB_FUN_CREATEOBJECT
1>hbct.lib(ctmath2.obj) : error LNK2019: unresolved external symbol __HUGE referenced in function _HB_FUN_LOG10
1>hbrtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
1>C:\des\fivewin\teste\teste\Debug\teste.exe : fatal error LNK1120: 12 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Visual Studio with harbour

Post by Antonio Linares »

Matheus,

Please add xhb.lib from Harbour too.

Regarding the __HUGE issue (already reported in the Harbour dev list), please add this code to the bottom of your main PRG as a workaround:

Code: Select all

#pragma BEGINDUMP

extern "C" {

void _HUGE( void )
{
}

};

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Visual Studio with harbour

Post by MFarias »

now he showed me this:

Code: Select all


1>  Lines 4195, Functions/Procedures 1
1>  Generating C source output to 'teste.c'... Done.
1>  teste.c
1>C:\des\fivewin\teste\teste\teste.prg(13): error C2059: syntax error : 'string'
 
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Visual Studio with harbour

Post by MFarias »

I applied it and it worked:

Code: Select all

#pragma BEGINDUMP


#ifdef __cplusplus
extern "C" {
#endif
void _HUGE( void )
{
}
#ifdef __cplusplus
}
#endif

#pragma ENDDUMP

 
as we say here at work: This is NASA! rsrsrsrs :lol:
Thanks antonio
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Visual Studio with harbour

Post by Antonio Linares »

;-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Visual Studio with harbour

Post by MFarias »

Only one more question: Is it possible to put a standard parameter for files added in visual studio, not to have to do it every prg that is put into the project? :D
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Visual Studio with harbour

Post by Antonio Linares »

Matheus,

Yes, Tim Stone just sent me an email explaining it:
When setting a Custom Build Tool, you have people entering in two lines of code for each .prg. This can be made quite simple. First you go into the Configuration Properties of the project itself, and select the Custom Build Tool, then enter the command line and output values there. Now, if you go into Properties on a .PRG, answer No to Excluded and Yes to Item Type: Custom Build Tool, when you click the Apply button, it will automatically configure the two lines of code for command line and output values. This saves a lot of time.
I have not tested it yet, but surely it will work fine as Tim explains it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Visual Studio with harbour

Post by MFarias »

Antonio,
Thanks, I'll make the change here.
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Visual Studio with harbour

Post by TimStone »

I have now moved my application build to Visual Studio 2013 Professional. I have a lot of testing to do, and I"m sure some fine tuning. It's a great time to review the code and revise it anyway.

My code provides for a lot of integration between the modules. It is contained in 208 .PRG files. Yes, every file is included in the Visual Studio build. Yes, the .exe builds, and it executes.

Having used Ultra Edit Studio for so long, the VS 2013 editor is not as nice. So, I have UE opened at the same time. I open the file on which I'm working, make the changes, and VS 2013 recognizes them instantly. So, when I do a build, it's using the newly modified file. I'm going to work on the highlighting discussed by Antonio.

This is a full blown, in distribution, application, so the fact that future builds can be done in VS 2013 is a huge benefit for me.

I was having some problems with OLE and Active X files until I used FORCE:multiple. Then they resolved.

Antonio has suggested incorporating all of the Harbour .lib files, but I have my build refined to only those that I need. So, my previous problems with .DLL files ( especially the Codejock implementation ) is now resolved.

If more people start looking at this, we may accomplish wonders with Visual Studio, Harbour, and FWH. I would like that.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
MFarias
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Visual Studio with harbour

Post by MFarias »

Tim

My small applications already work with Visual Studio after performing this change yesterday, but have large enterprise applications that need a fine tooth comb before embracing this change.

Imagine the possibilities of using a more integrated environment and the developments that have seen the Visual Studio conversation with that, my next step is to refine and makes friendly development platform to better produce, used the xDevStudio a few years and do not have what speak ill of him, but he was abandoned. So I'm searching for something new from solution before it is too late.

I am also working in parallel with changing compiler of my xHarbour applications for harbor because I see better performace and stability with dbf still use, but I intend to make the change to the sql later this year.

Thanks for the assistance provided here in the forum and tell with news. :D
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Visual Studio with harbour

Post by TimStone »

I want to talk with the folks who develop Ultra Edit to see if there is a seamless way to integrate it with Visual Studio. They have done excellent work with their editor. Also I will be looking more closely at enhancing the Visual Studio editor. I will be in touch with my contacts at Microsoft about that possibility.

I am now almost 68 years old. I remember the days before television was common, and phones were rotary dial ( or crank ). Although many like to be critical of what we don't have, I have appreciated all of the contributions by those with a vision. Even incomplete projects contribute to the continuing growth of technology.

The FW community is close, and everyone is so helpful. Within the Microsoft community, there are very similar people. They have amazing attitudes and stay focused on making the tools, and resulting software, better and better. If we keep our focus on the positive, we accomplish so much.

Antonio has started this journey, and now hopefully others will join in and we can have an amazing result.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Post Reply