I have the following error when building a C++ project that has OpenNURBS linking:
LINK : fatal error LNK1104: cannot open file 'C:/Users/PabloGarcia-Amorena/Documents/opennurbs/bin/x64/Release/freetype263.lib'
All projects in OpenNURBS repository are successfully compiled (Windows SDK 10.0.18362.0 and Visual Studio 2017 (v141)).
To link OpenNURBS, I do the following in the C++ project:
In Configuration Properties -> VC++ Directories -> Include Directories add C:/Users/PabloGarcia-Amorena/Documents/opennurbs
In Configuration Properties -> Linker -> General -> Additional Library Directories add C:\Users\PabloGarcia-Amorena\Documents\opennurbs\bin\x64\Release
In Configuration Properties -> Linker -> Input -> Additional Dependencies add opennurbs_public.lib (here I’ve tried also with opennurbs_public_static.lib and zlib.lib).
In stdafx.h add
#define OPENNURBS_PUBLIC_INSTALL_DIR "C:/Users/PabloGarcia-Amorena/Documents/opennurbs"
// uncomment the next line if you want to use opennurbs as a DLL
//#define OPENNURBS_IMPORTS
#include "C:/Users/PabloGarcia-Amorena/Documents/opennurbs/opennurbs_public.h"
The C++ project is also compiled against Windows SDK 10.0.18362.0 and Visual Studio 2017 (v141).
Do you know what could go wrong, or where the file freetype263.lib is?
then the C++ project compiles and links OpenNURBS statically properly! Is this step important for some reason?
Seems like opennurbs_public.h gives an issue when linking statically.
For this case I linked opennurbs_public_staticlib.lib and zlib.lib.
If you examine the example projects, included with the toolkit, you will see that they all have imported the opennurbs_msbuild.Cpp.props property sheet, and they all include opennurbs_public_examples.h which including linking pragmas.