So, I recently added a header file (and corresponding source file) to a project, along with a header file that file required, and an object file that the file required.
Everything compiles fine, unless I actually make a call to one of the functions declared in the newly added header file.
This is all using Visual Studio Express 2008.
To be more clear: Added:
E4407B.h (My code)
E4407B.cpp (Also my code, compiling as c)
ni4882.h (not mine - from National Instruments) ni4882.obj
When I call a function located in E4407B.h, I get the following error:
4>E4407B.obj : error LNK2005: _SA_GPIB_INTF already defined in test.obj
4>ni4882.obj : warning LNK4217: locally defined symbol _fclose imported in function _LoadFunction@4
4>ni4882.obj : warning LNK4217: locally defined symbol _fread imported in function _LoadFunction@4
4>ni4882.obj : warning LNK4217: locally defined symbol _fopen imported in function _LoadFunction@4
4>ni4882.obj : error LNK2019: unresolved external symbol __imp__rand referenced in function _LoadFunction@4
4>ni4882.obj : error LNK2019: unresolved external symbol __imp__srand referenced in function _LoadFunction@4
4>ni4882.obj : error LNK2019: unresolved external symbol __imp__time referenced in function _LoadFunction@4
test.c is where main is located.
Edit: I had in an error that shows up for building another solution which was in the build for some reason.