In the past I would have used #import
to gain access to functions exposed by a dynamically linked library (i.e. *.DLL
). Now it appears that Visual Studio has a new Add New Reference option.
Project => Property Pages => Common Properties => References
My question is: which approach should I use?
REFERENCES
The following approach was used to expose functions in our library:
UPDATE 1
One thing I noticed is that: unlike in C# where you can add a reference to (1) an assembly in the GAC, (2) an assembly on the file system, (3) a project within the solution. It appears that in C++ you can only Add Reference to a project within the current solution.