philsquared/Catch — Issue #58: g++ Compiler Error
Author: abijlani
Created: 2011-11-30 16:54:04+00:00
State: open

I'm trying to compile the example in the tutorial on an Ubuntu EC2 instance with GNUStep and keep getting the following compiler error

```$ g++ -o example example.cpp
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
/tmp/ccLiM0d9.o: In function `catch_internal_TestFunction8()':
example.cpp:(.text+0x31): undefined reference to `Catch::Hub::getResultCapture()'
example.cpp:(.text+0x16b): undefined reference to `Catch::Hub::getResultCapture()'
example.cpp:(.text+0x2a6): undefined reference to `Catch::Hub::getResultCapture()'
example.cpp:(.text+0x3e1): undefined reference to `Catch::Hub::getResultCapture()'
example.cpp:(.text+0x51c): undefined reference to `Catch::Hub::getResultCapture()'
/tmp/ccLiM0d9.o: In function `__static_initialization_and_destruction_0(int, int)':
example.cpp:(.text+0x6d4): undefined reference to `Catch::AutoReg::AutoReg(void (*)(), char const*, char const*, char const*, unsigned int)'
example.cpp:(.text+0x6d9): undefined reference to `Catch::AutoReg::~AutoReg()'
collect2: ld returned 1 exit status
```