I'm a new C++ programmer coming from a Java background.
I'm trying to compile a simple test program using libcvd (which I compiled from source), but the linker is giving me an error which I can't figure out how to diagnose:
Code:
$ g++ -Wall -g -o testes test.cpp
/tmp/ccxE5wTV.o: In function `void CVD::Internal::aligned_free<unsigned char>(unsigned char*, unsigned long)':
/usr/local/include/cvd/internal/aligned_mem.h:109: undefined reference to `CVD::Internal::aligned_free(void*)'
collect2: error: ld returned 1 exit status
Here is the test code I'm using:
test.cpp
Code:
#include <cvd/image_io.h>
using namespace CVD;
int main()
{
try
{
Image<byte> in;
// in = img_load("test_image.jpg");
// img_save(in, "new_image.png");
}
catch(Exceptions::All error)
{
std::cerr << "Error: " << error.what << std::endl;
}
return 0;
}
removing all the try/catch and commented junk still gives the same result.
help is greatly appreciated.