I have three projects within one solution. I am building two static libraries and trying to link them to my executable project (called ensemble). I have added both .lib
file directories to my Linker/General and Linker/Input library directories inside the ensemble project.
Inside one of my static library projects I have the following:
acquisition.cpp
#include "acquisition.h"
//other stuff
int run_acquisition() {
//runs function
}
acquisition.h
#pragma once
int run_acquisition();
Inside of ensemble, I have the following:
#include "acquisition.h"
int main(void) {
run_acquisition();
return 0;
}
In which case I get the error that "identifier "run_acquisition" is undefined". The program sees acquisition.h but I can't seem to figure out the issue to debug this. Welcome to any feedback!
Update #1: I fixed the typo. Here is the build log -
3>------ Build started: Project: ensemble, Configuration: Debug x64 ------
3>main.cpp
3>main.obj : error LNK2019: unresolved external symbol "int __cdecl run_acquisition(void)" (?run_acquisition@@YAHXZ) referenced in function main
3>C:\XIMEA\Examples\Bin\ximea_camera.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
3>C:\MirrorcleTech\SDK-Cpp\x64\Debug\ensemble.exe : fatal error LNK1120: 1 unresolved externals
3>Done building project "ensemble.vcxproj" -- FAILED.