2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Simple sub-project that builds a library and and an exe that depends on it.

[SVN r14423]
This commit is contained in:
Rene Rivera
2002-07-12 15:22:06 +00:00
parent 2c056ca135
commit abf39d0ff1
6 changed files with 72 additions and 0 deletions

18
examples/lib_use/Jamfile Normal file
View File

@@ -0,0 +1,18 @@
subproject tools/build/examples/lib_use ;
lib simple
:
simple_lib.cpp
:
:
debug <threading>single/multi
;
exe simple
:
simple.cpp
<lib>simple
:
<threading>multi
:
;

View File

@@ -0,0 +1,12 @@
#include <cstdio>
extern int lib_call(int x);
int main(int /* argc */, char ** /* argv */)
{
for (int i = 0; i < 16; ++i)
{
std::printf("%d * 2 = %d\n",i,lib_call(i));
}
return 0;
}

View File

@@ -0,0 +1,6 @@
extern int lib_call(int x);
int lib_call(int x)
{
return x*2;
}

View File

@@ -0,0 +1,18 @@
subproject tools/build/examples/lib_use ;
lib simple
:
simple_lib.cpp
:
:
debug <threading>single/multi
;
exe simple
:
simple.cpp
<lib>simple
:
<threading>multi
:
;

View File

@@ -0,0 +1,12 @@
#include <cstdio>
extern int lib_call(int x);
int main(int /* argc */, char ** /* argv */)
{
for (int i = 0; i < 16; ++i)
{
std::printf("%d * 2 = %d\n",i,lib_call(i));
}
return 0;
}

View File

@@ -0,0 +1,6 @@
extern int lib_call(int x);
int lib_call(int x)
{
return x*2;
}