This is quite a quick and dirty example of the problem, but it shows how the it can happen. This is on Linux Mint 20/Ubuntu 20.04, but I also have it failing on MacOS.
$ cat a.c
#include <iostream>
#include "ASICamera2.h"
extern int GetTickCount();
main()
{
int m = GetTickCount();
std::cout << "m " << m << "\n";
int n = ASIGetNumOfConnectedCameras();
std::cout << "num of cameras " << n << "\n";
}
$ cat t.c
#include <iostream>
int
GetTickCount()
{
std::cout << "in my GetTickCount";
return 1;
}
$ c++ -c t.c
$ ar rvs libt.a t.o
ar: creating libt.a
a - t.o
$ c++ -o a a.c libt.a libASICamera2.a -lusb-1.0 -pthread
a.c:7:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
7 | main()
| ^
/usr/bin/ld: libASICamera2.a(linuxstubs.o): in function `GetTickCount()':
(.text+0x20): multiple definition of `GetTickCount()'; libt.a(t.o):t.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
ASICamera.h and libASICamera.a are in the current directory.
James