Full working project for Visual Studio 2012 IDE

Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 7:42 am

Here you have a working project to build a FWH + Harbour app from the Visual Studio 2012 IDE itself:

https://code.google.com/p/fivewin-contributions/downloads/detail?name=tutor02_msvc2012_ok.zip

just unzip it and double click on the sln file.

When trying to build it I faced this bug:
https://github.com/glfw/glfw/issues/205

But fortunately we can bypass it using the flag /arch:SSE to call the Visual Studio C compiler to build FWH (notice: FWH 14.04 does not include this fix, so you will need an updated FiveHC32.lib)

Image

Actually I just have this pending unresolved external:
1>------ Build started: Project: tutor02, Configuration: Debug Win32 ------
1> Creating library C:\temp\tutor02\Debug\tutor02.lib and object C:\temp\tutor02\Debug\tutor02.exp
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:\temp\tutor02\Debug\tutor02.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 7:51 am

This flag is required to avoid a linker warning: /NODEFAULTLIB:LIBCMT
(it is not included in the project that I have provided. I will be providing updated versions of it)

Image
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 8:10 am

Problem solved: We can't use /NODEFAULTLIB:LIBCMT or we get the unresolved external __HUGE, that requires a Harbour built using this compiler flag /MD:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/2c526d90-fbd3-40c1-89b4-1e35ca521818/dll-with-static-lib-dependency

Image
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby TimStone » Sat Jun 07, 2014 2:12 pm

Two quick observations

1) You need to update your version. I'm on the latest ( free ) update so there may be differences. I got the warning that I had to update your source files

2) In your sample, where are your .prg files ? Following your earlier instructions, I have both .prg and .c files under Source Files
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Full working project for Visual Studio 2012 IDE

Postby TimStone » Sat Jun 07, 2014 2:15 pm

Also, I will need the updated library ...
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 2:31 pm

Tim,

is it possible to ask for the update from the IDE itself ?

Yes, my sources are in the same "source files" folder

I am emailing you the modified lib :-)
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby TimStone » Sat Jun 07, 2014 3:46 pm

Antonio,

Under Tools on the menu, select Extensions and Updates. On the popup, look at Updates, and then Product Updates. It's now at VS 2013, update 2. They keep adding new features.

When working in Visual Studio, take a look at LightSwitch. It's a true RAD tool. They are pouring a lot of resources into it so it is improving every month.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 4:09 pm

Tim,

Cool, thanks. Already updating it :-)

Yes, I remember I review it once and the first idea that came to my mind is that we could easily build the same tool using FiveWin ;-)
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby TimStone » Sat Jun 07, 2014 4:48 pm

Right now I want to get my "application" fully buildable in the Visual Studio IDE.

After that, I will be curious to see if we can build other elements of it using other VS languages and mix them together in one application. Wouldn't it be nice if we could access some of the more recent capabilities written for VB or C# coding, compile them into .obj code, and link them all together in one .exe ? In theory, that would appear to be the ultimate opportunity. That would make it so easy to incorporate integration with other 3rd party products.

Or perhaps I dream to much ( or is it an old man's fantasies ? )
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 4:50 pm

Tim,

it is a nice wish but you forgot .NET

We can not mix .NET code and native C code. The only way I found to do it was this:

https://code.google.com/p/fivenet/
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby TimStone » Sat Jun 07, 2014 4:57 pm

True, but not all code is .net.

Programming is like a train going uphill. It's a hard journey, but once you get to the top, the view is great, and the trip down the other side is so much fun.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 5:02 pm

Well, the .NET app could call Harbour code, and to do it the other way round we should use FiveNet way.
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby TimStone » Sat Jun 07, 2014 6:17 pm

Antonio,

I've come a long way. I can now see my resources ( and open them ), though I think there will be some re-working necessary because they were originally built in Borland, and can probably be optimized in Visual Studio for cleaner controls. I haven't used any resource editor for awhile ... preferring to modify dialogs manually.

HOWEVER

I still have the following errors. I realize you got a build with a simple program ( 1 PRG ) but I'm building a full blown application that was building in UE Studio with VS 2012. I think we are likely missing a library for functions I'm calling in the FiveHC lib, but are not tapped in your sample build.

Here are the errors:
Code: Select all  Expand view

1>     Creating library C:\Users\TimsAIO\Documents\Visual Studio 2013\Projects\MLS2015\Debug\MLS2015.lib and object C:\Users\TimsAIO\Documents\Visual Studio 2013\Projects\MLS2015\Debug\MLS2015.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>FiveHC32.lib(BRUSHES.obj) : error LNK2019: unresolved external symbol __imp__AlphaBlend@44 referenced in function _HB_FUN_ABPAINT
1>FiveHC32.lib(RICHEDIT.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoSizeA@8 referenced in function _HB_FUN_REDLLVERSION
1>FiveHC32.lib(RICHEDIT.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoA@16 referenced in function _HB_FUN_REDLLVERSION
1>FiveHC32.lib(RICHEDIT.obj) : error LNK2019: unresolved external symbol _VerQueryValueA@16 referenced in function _HB_FUN_REDLLVERSION
1>FiveHC32.lib(RICHEDIT.obj) : error LNK2019: unresolved external symbol _OleUIPasteSpecialA@4 referenced in function _HB_FUN_REPASTESPECIAL
1>C:\Users\TimsAIO\Documents\Visual Studio 2013\Projects\MLS2015\Debug\MLS2015.exe : fatal error LNK1120: 5 unresolved externals
 

This is built using the libs you just sent me, but note the WARNING on LIBCMT is still here.

TIm
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Full working project for Visual Studio 2012 IDE

Postby Antonio Linares » Sat Jun 07, 2014 7:49 pm

Tim,

Are you linking OleDlg.lib ?

Don't worry for these warnings:
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

We will find a way to avoid those reports, but they are fine.
regards, saludos

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

Re: Full working project for Visual Studio 2012 IDE

Postby TimStone » Sun Jun 08, 2014 4:50 am

Yes, I did link in that file.

The errors seem related to RichEdit ( which I'm not using yet ) and brush painting ( which I do use ).

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests

cron