I don't use 2017, I use 2015. I tried to create a new project but I still get the same errors. Extract this to the main Newton directory and it will load all the files.
Here is what I did:
1) Created a new Visual Studio 2015 console application.
2) Replaced the main source file with this:
- Code: Select all
#include "../..\coreLibrary_300\source\newton\Newton.h"
#include "../../packages/dCustomJoints/dCustomBallAndSocket.h"
#include "../../packages/dCustomJoints/dCustomHinge.h"
#include "../../packages/dCustomJoints/dCustomJoint.h"
#include "../../packages/dCustomJoints/dCustomKinematicController.h"
#include "../../packages/dCustomJoints/dCustomSlider.h"
#include "../../packages/dCustomJoints/dCustomSliderActuator.h"
#include "../../packages/dCustomJoints/dCustomHingeActuator.h"
#include "../../packages/dCustomJoints/dCustomJointLibraryStdAfx.h"
#include "../../packages/dCustomJoints/dCustomControllerManager.h"
#include "../../packages/dCustomJoints/dCustomVehicleControllerManager.h"
int main()
{
NewtonCreate();
return 0;
}
3) Added these header search paths:
../..\packages\thirdParty\timeTracker
..\../packages\dMath
..\../packages\dContainers
..\../packages\dCustomJoints
../../packages\thirdParty\pthreads.2
..\../coreLibrary_300\source\openCL
..\../coreLibrary_300\source\core
..\../coreLibrary_300\source\meshUtil
..\../coreLibrary_300\source\pthreads.2
..\../coreLibrary_300\source\ampPhysics
../../coreLibrary_300\source\physics
..\../coreLibrary_300\source\newton
4) Added these library inputs:
dNewton_d.lib
dCustomJoints_d.lib
5) Added these library search paths:
..\../packages\projects\visualStudio_2015_dll\Win32\dCustomJoints\debug
..\../packages\projects\visualStudio_2015_dll\Win32\dNewton\debug;%(AdditionalLibraryDirectories)
And this is the result:
1>------ Build started: Project: NewtonTest, Configuration: Debug Win32 ------
1> NewtonTest.cpp
1>NewtonTest.obj : error LNK2019: unresolved external symbol __imp__NewtonCreate referenced in function _main
1>NewtonTest\Debug\NewtonTest.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========