Snažím se rozjet bitpack:
https://github.com/bcg/bitpack/blob/master/test/bitpack_tests.c
#include "bitpack_tests.h"
int main()
{
CuString *output = CuStringNew();
CuSuite *suite = CuSuiteNew();
CuSuiteAddSuite(suite, bitpack_get_suite());
CuSuiteRun(suite);
CuSuiteSummary(suite, output);
CuSuiteDetails(suite, output);
printf("%s\n", output->buffer);
return 0;
}
Ale dostávám hlášku:
main.c|undefined reference to `bitpack_get_suite'
Přitom tato funkce je definovaná v
bitpack_tests.c
bitpack_tests.h:
#ifndef BITPACK_TESTS_H_INCLUDED
#define BITPACK_TESTS_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "CuTest.h"
#include "bitpack.h"
static void test_bitpack_constructor(CuTest *tc);
static void test_bitpack_get_on_off(CuTest *tc);
static void test_bitpack_get_set_bits(CuTest *tc);
static void test_bitpack_get_set_bytes(CuTest *tc);
static void test_bitpack_append_bits(CuTest *tc);
static void test_bitpack_append_bytes(CuTest *tc);
static void test_bitpack_read_bits(CuTest *tc);
static void test_bitpack_read_bytes(CuTest *tc);
static void test_bitpack_to_bytes(CuTest *tc);
static void test_bitpack_from_bytes(CuTest *tc);
static CuSuite *bitpack_get_suite(void);
#endif // BITPACK_TESTS_H_INCLUDED