Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ace-users] Trouble using MPC on my own project

498 views
Skip to first unread message

Lothar

unread,
Jan 15, 2011, 10:18:20 AM1/15/11
to ace-...@list.isis.vanderbilt.edu
Hi,

I am using ACE (5.7.6) on WindowsXP using Cygwin (make). The goal of this module is to provide some
of the ACE to my code in a way I like and wrap it in a flavor I can use transparently (IoC) without changing
my existing code.

Trying to base my DLL project on the DLL sample in the examples directory, my mpc file looks like this:

// -*- MPC -*-
// $Id: DLL.mpc 80826 2008-03-04 14:51:23Z wotte $

project(*lbDMF_ACEWrapper) : acelib {
Source_Files {
lbthread.cpp
socket.cpp
transfer.cpp
}
}

My ACE_ROOT points to Q:\develop\Projects\CPP\vendor\ACE_wrappers
My MPC_ROOT points to $(ACE_ROOT)/MPC and I used mpc.pl to create my make file like this:

Q:\develop\Projects\CPP\AppDevelopment\lbDMF_ACEWrapper>perl Q:\develop\Projects\CPP\vendor\ACE_wrappers\bin\mpc.pl lbDMF_ACEWrapperDLL.mpc -type make
MPC_ROOT was set to q:/develop/Projects/CPP/vendor/ACE_wrappers/MPC.
Generating 'make' output using lbDMF_ACEWrapperDLL.mpc
lbDMF_ACEWrapperDLL.mpc: line 4:
ERROR: Unable to locate parent: acelib
ERROR: Unable to process: lbDMF_ACEWrapperDLL.mpc

MPC version is 3.7.85.

What do I miss to get rid of the error message?

Thanks,

Lothar

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Ginsterweg 4
65760 Eschborn


Artur Doci

unread,
Jan 15, 2011, 2:58:37 PM1/15/11
to ace-...@list.isis.vanderbilt.edu
Hi Lothar,

you need an .mwc file where you tell MPC where to search for base
project files (.mpb, .mpc). The .mwc file will then look something like
the following:

workspace {

include += path/to/acelib.mpb (or where acelib is intended to
be found)

path/to/DLL.mpc

}

Hope it helps,

Artur

> _______________________________________________
> ace-users mailing list
> ace-...@list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/ace-users

Chris Cleeland

unread,
Jan 15, 2011, 11:45:15 PM1/15/11
to Artur Doci, ace-...@list.isis.vanderbilt.edu

On Jan 15, 2011, at 1:58 PM, Artur Doci wrote:

> you need an .mwc file where you tell MPC where to search for base
> project files (.mpb, .mpc). The .mwc file will then look something like
> the following:

you also need to use mwc.pl rather than mpc.pl on the command line. If you do that, and you use mwc.pl from within the ACE_wrappers directory, it will automatically find mpb files that are under $ACE_ROOT/bin/MakeProjectCreator

---
Chris Cleeland, Principal Software Engineer
http://www.theaceorb.com AND http://www.ociweb.com


Lothar

unread,
Jan 16, 2011, 6:54:42 PM1/16/11
to ace-...@list.isis.vanderbilt.edu
I have a separate project that uses ACE - or I plan to use ACE. That way I can replace ACE_wrappers completely on updates - I think.

OTOH I have tried the inline variant and only included minimal amount of headers to be used in my project. I got my own make files by using
a tool (mkmk). That tool works good for me for several years. If I have trouble on different platforms I will try using mwc.pl et al.

But I want to keep the code I develop outside of the ACE_wrappers directory tree. Is that possible?

Chris Cleeland

unread,
Jan 16, 2011, 9:20:05 PM1/16/11
to ace-users@list.isis.vanderbilt.edu List

On Jan 16, 2011, at 5:54 PM, Lothar wrote:

> But I want to keep the code I develop outside of the ACE_wrappers directory tree. Is that possible?

Yes. It's just that if you want the acelib and other mpb files found automatically you will need to either use the tecnique that Artur described OR use the mwc.pl from within the ACE_wrappers directory.

Chad Elliott

unread,
Jan 17, 2011, 8:13:02 AM1/17/11
to Lothar, ace-...@list.isis.vanderbilt.edu
Hi Lothar,

> Hi,
>
> I am using ACE (5.7.6) on WindowsXP using Cygwin (make). The goal of this module is to provide some
> of the ACE to my code in a way I like and wrap it in a flavor I can use transparently (IoC) without changing
> my existing code.
>
> Trying to base my DLL project on the DLL sample in the examples directory, my mpc file looks like this:
>
> // -*- MPC -*-
> // $Id: DLL.mpc 80826 2008-03-04 14:51:23Z wotte $
>
> project(*lbDMF_ACEWrapper) : acelib {
> Source_Files {
> lbthread.cpp
> socket.cpp
> transfer.cpp
> }
> }
>
> My ACE_ROOT points to Q:\develop\Projects\CPP\vendor\ACE_wrappers
> My MPC_ROOT points to $(ACE_ROOT)/MPC and I used mpc.pl to create my make file like this:
>
> Q:\develop\Projects\CPP\AppDevelopment\lbDMF_ACEWrapper>perl Q:\develop\Projects\CPP\vendor\ACE_wrappers\bin\mpc.pl lbDMF_ACEWrapperDLL.mpc -type make
> MPC_ROOT was set to q:/develop/Projects/CPP/vendor/ACE_wrappers/MPC.
> Generating 'make' output using lbDMF_ACEWrapperDLL.mpc
> lbDMF_ACEWrapperDLL.mpc: line 4:
> ERROR: Unable to locate parent: acelib
> ERROR: Unable to process: lbDMF_ACEWrapperDLL.mpc
>
> MPC version is 3.7.85.
>
> What do I miss to get rid of the error message?
>

The only way I was able to reproduce this error was to run mpc.pl from
$ACE_ROOT/MPC instead of $ACE_ROOT/bin. To be 100% certain that you're
running the MPC scripts out of $ACE_ROOT/bin, you should invoke them
using $ACE_ROOT. I'm assuming that you're using Cygwin bash.

e.g.,

$ACE_ROOT/bin/mwc.pl -type make libDMF_ACEWrapperDLL.mpc


And, as Chris said, you should probably use mwc.pl but you can run
either. It's just easier when you invoke make to not have to specify
the makefile with the -f option.

You could also add the following line to
$ACE_ROOT/bin/MakeProjectCreator/config/MPC.cfg:

logging = diag=1 debug=1 warn=1 detail=1

Then rerun your command. It may provide some information that could be
helpful in debugging this problem.

If you're unable to resolve error message, you should consider upgrading
to the latest version of MPC. You can check it out from SVN using the
following:

svn co svn://svn.dre.vanderbilt.edu/DOC/MPC/trunk MPC

HTH,
Chad

> Thanks,
>
> Lothar
>
> -- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
> Lothar Behrens
> Ginsterweg 4
> 65760 Eschborn
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> ace-users mailing list
> ace-...@list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/ace-users
>


--
Do you enjoy writing Makefiles or maintaining project settings across hundreds of Visual Studio projects? If so, then MPC is *not* for you. - http://www.ociweb.com/products/mpc

Perl and CORBA go hand-in-hand. - http://opalorb.sourceforge.net/

0 new messages