Overview
Features
Download
Documentation
Community
Add-Ons & Services

Build on windows with Visual Studio 2012 *FIXED*

Please post support and help requests here.

Build on windows with Visual Studio 2012 *FIXED*

Postby Rushino » 25 Oct 2012, 03:47

Hi there,

Anyone got success in building POCO C++ on Code::Blocks ? I tried building it with Visual Studio 2010 (Since i could with 2012) and it seem to give errors. Ive fellowed the docs but i can't seem to have anything working. Any help would be appreciated !

Thanks!
Last edited by Rushino on 26 Oct 2012, 03:31, edited 1 time in total.
Rushino
 
Posts: 5
Joined: 25 Oct 2012, 03:44

Re: Build on windows with Code::Blocks ?

Postby alex » 25 Oct 2012, 07:11

Rushino wrote:Any help would be appreciated !

Poco builds out of the box on both 2010 and 2012. CppUnit (and hence testsuites) won't build on Express because Express is lacking MFC.
Details of your problems would be appreciated as well. How can we help you based on such vague description of the problem?
alex
 
Posts: 1158
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Build on windows with Code::Blocks ?

Postby Rushino » 25 Oct 2012, 13:49

Alright, sorry if it was vague. Here a full explanation of what i did (going back to Visual Studio 2010 since
it won't work with VS2012 or codeblock either)

1- I modified the build_vcexpress2010 script so i can build the libs (all of them). Like this :

buildwin 100 build all both Win32 samples vcexpress

On Visual Studio 2012 using this script simply not work because it tell me it cannot find vcexpress. So i went with VS2010. Is there anything to modify to make it work with the script

2- After a long process of libs building, the libs are located here (Built using VS2010) :

G:\CppLibs\poco-1.4.4\libs

3- When i want to open the NET samples.. going to G:\CppLibs\poco-1.4.4\Net\samples\samples_vs100

4- Once opened in VS2010, i tried to build "Ping" but i get this error..

1>------ Build started: Project: Ping, Configuration: debug_shared Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'PocoFoundationd.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

A- So i am doing something wrong here ? i know "d" mean for debug however it didnt get built with the script.
B- What are the steps to link to the library when i want to make a program based on Poco C++ ?

Thanks! More to come because i cant remember the others errors ive got but i remember it was regarding the .h files which was not found and also undefinied Poco::Net....
Rushino
 
Posts: 5
Joined: 25 Oct 2012, 03:44

Re: Build on windows with Code::Blocks ?

Postby alex » 25 Oct 2012, 14:39

Rushino wrote:A- So i am doing something wrong here ? i know "d" mean for debug however it didnt get built with the script.

If it did not get built by the script then you'll have to build it yourself. Open the solution and build it.
Rushino wrote:B- What are the steps to link to the library when i want to make a program based on Poco C++ ?

First, library has to exist (see the answer to A). Second, linker has to be able to find path to it (this is part of the project settings). If you follow the advice above it'll work.
alex
 
Posts: 1158
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Build on windows with Code::Blocks ?

Postby Rushino » 26 Oct 2012, 03:27

Ive got it working. Hope my finds help anyone...

To make it short..

Problem #1- The default script doesn't find vcexpress with Visual Studio 2012 Express. You have to specify 'wdexpress' i had to modify the build script to this.

@echo off
buildwin 100 build all both Win32 samples wdexpress

Problem #2- The Foundation shared lib won't be built by the script (PocoFoundation.lib for release and PocoFoundationd.lib for debug shared located in the lib directory) so any sample won't work until you build this. The reason it won't build is the MFC part. The file 'afxwin.h' cannot be found because its part of MFC in VS2012 you don't have MFC. So you have to build Foundation yourself.. change the DLLVersion.rc file by replacing #include 'afxwin.h' with #include 'windows.h' as specified here http://stackoverflow.com/questions/3566 ... 10-express. If you don't do this you will get this error when you will try to build that lib :

error C1083: cannot open the file : 'afxwin.h' : No such file or directory

Like i said you can modify this file now and use the script which is supposed to build it once this modification is done.

Also, don't try to build the libs with VS2010 and then open with VS2012 it simply won't work.

Thanks alex for the help through !
Rushino
 
Posts: 5
Joined: 25 Oct 2012, 03:44

Re: Build on windows with Visual Studio 2012 *FIXED*

Postby alex » 26 Oct 2012, 04:30

BTW, did you try to run build_vcexpress2010.cmd ?
alex
 
Posts: 1158
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Build on windows with Visual Studio 2012 *FIXED*

Postby Rushino » 26 Oct 2012, 11:52

Yes i did but the script close itself right after i start it. There no 'devenv' or 'vcexpress' ! So i had to make my own starting wdexpress instead. See problem #1 in my previous post.
Rushino
 
Posts: 5
Joined: 25 Oct 2012, 03:44

Re: Build on windows with Visual Studio 2012 *FIXED*

Postby alex » 26 Oct 2012, 13:43

Rushino wrote:See problem #1 in my previous post.

I have seen that, it states that build_vcexpress2010.cmd was attempted on a machine with 2012 installed. That, of course, can not work. So, let me rephrase the question:

Did you run build_vcexpress2010.cmd on a machine with VS 2010 installed?
alex
 
Posts: 1158
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Build on windows with Visual Studio 2012 *FIXED*

Postby Rushino » 26 Oct 2012, 18:30

Yes i have both installed on my machine (VS2010 Express and VS2012 Express) but it seem that they both use different dev environnement.
Rushino
 
Posts: 5
Joined: 25 Oct 2012, 03:44


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron