| Version 3 (modified by , 21 years ago) ( diff ) |
|---|
A project creation
For this example, we create a project which contains two packages. One of this package needs another package.
We do first the package creation:
> mkdir tmp > cd tmp > cmt create_project project v1 ... > cd project/v1 > cmt create A v1 ... > cmt create B v1 ...
The codes for A and B is tha same than in our previous example, so:
> more A/v1/src/A.h
#include <iostream>
using namespace std;
class A
{
public:
A() {}
~A() {}
void print ();
};
> more A/v1/src/A.cxx
#include "A.h"
void A::print ()
{
cout<<"A"<<endl;
}
> more B/v1/src/B.h
#include <iostream>
using namespace std;
class B
{
public:
B() {}
~B() {}
void print ();
};
> more B/v1/src/B.cxx
include "B.h"
void B::print ()
{
cout<<"B"<<endl;
}
>
> more B/v1/src/main.cxx
#include "A.h"
#include "B.h"
int main()
{
A a;
B b;
a.print ();
b.print ();
return 0;
}
> cd B/v1/cmt > cmt broadcast make ... > source setup.csh > main.exe A B
Note:
See TracWiki
for help on using the wiki.
