Visual Studio: How do I import a module from a static library?

Viewed 66

I've successfully created and built a static library in Visual Studio. It's main output is a module named "ciflib".

I have created a new project in which I want to use that library, and I can't get the modules contained within to be recognised.

I've set the "Additional Library Directories" to point to the place I have the ciflib.lib file saved. I've set the "Additional Dependencies" (under Linker->Input) to point to ciflib.lib.

When I import ciflib; in my new project, Visual Studio can't find my module.

What am I doing wrong?

I am using Visual Studio 22 and /std:c++20

edit:

The two errors of import are:

C2230 could not find module 'ciflib'

E3275 could not find module file for module "ciflib"

I also get the red squiggly line under 'ciflib' in 'import ciflib;', so noone can find it.

0 Answers
Related