Skip to content

Commit dac6bdd

Browse files
authored
Merge pull request #22 from mjopenglsdl/b_fix_compiling
make example compile
2 parents feb91d6 + f5b3d01 commit dac6bdd

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include_directories (
99

1010
set(HEADERS include/SafeQueue.h include/ThreadPool.h)
1111

12-
set(SOURCES src/main.cpp)
12+
set(SOURCES example/main.cpp)
1313

1414
SET(CMAKE_CXX_FLAGS -pthread)
1515

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ int multiply_return(const int a, const int b) {
3636
}
3737

3838

39-
void example() {
39+
int main(int argc, char *argv[])
40+
{
4041
// Create pool with 3 threads
4142
ThreadPool pool(3);
4243

@@ -66,4 +67,6 @@ void example() {
6667
std::cout << "Last operation result is equals to " << res << std::endl;
6768

6869
pool.shutdown();
70+
71+
return 0;
6972
}

0 commit comments

Comments
 (0)