Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by Hattress » Fri Nov 21, 2014 6:43 am
Hi everyone,
I am experiencing this "unresolved external" error when trying to compile my project. The same issue is found using the "Getting started" sample tutorial.
I suspect it might be code not updated for the latest version - or am I simply doing something wrong? Other Newton functions runs fine.
- Code: Select all
Error 1 error LNK2019: unresolved external symbol "class dgMatrix const & __cdecl dgGetIdentityMatrix(void)" (?dgGetIdentityMatrix@@YAABVdgMatrix@@XZ) referenced in function _main C:\Users\User\Documents\Visual Studio 2013\Projects\source\source\source.obj source
-
Hattress
-
- Posts: 9
- Joined: Sat Nov 01, 2014 7:37 am
by Julio Jerez » Sat Nov 22, 2014 10:42 am
are you using the correct libraries?
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Hattress » Mon Nov 24, 2014 2:10 pm
This is what I'm using right now,
Include:
- Code: Select all
C:\Users\User\Documents\Newton Dynamics\coreLibrary_300\source\core;
C:\Users\User\Documents\Newton Dynamics\coreLibrary_300\source\newton;
C:\Users\User\Documents\Newton Dynamics\coreLibrary_300\source\physics;
C:\Users\User\Documents\Newton Dynamics\coreLibrary_300\source\pthreads.2;$(IncludePath)
Library:
- Code: Select all
C:\Users\User\Documents\Newton Dynamics\coreLibrary_300\projects\windows\project_vs2013_dll\Win32\newton\Debug;$(LibraryPath)
Additional dependencies:
- Code: Select all
newton_d.lib;%(AdditionalDependencies)
In code file:
- Code: Select all
#include "stdafx.h"
#include <iostream>
#include <newton.h>
#include <dgVector.h>
#include <dgQuaternion.h>
#include <dgMatrix.h>
-
Hattress
-
- Posts: 9
- Joined: Sat Nov 01, 2014 7:37 am
by Julio Jerez » Mon Nov 24, 2014 2:13 pm
no what I mean is if you are using dll, mix with static lib,
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Hattress » Tue Nov 25, 2014 8:35 am
I'm not sure if I understood your question... I am using project_vs2013_dll and Newton.DLL in Visual Studio project folder.
-
Hattress
-
- Posts: 9
- Joined: Sat Nov 01, 2014 7:37 am
by Hattress » Wed Nov 26, 2014 6:26 pm
I checked again... Yes I am using dll.
-
Hattress
-
- Posts: 9
- Joined: Sat Nov 01, 2014 7:37 am
by Julio Jerez » Wed Nov 26, 2014 7:16 pm
but of you are compiling the DLL and the DLL links, then there are not external references.
are you trying to call that function yourself?
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Hattress » Fri Nov 28, 2014 2:32 am
Julio Jerez wrote:but of you are compiling the DLL and the DLL links, then there are not external references.
are you trying to call that function yourself?
Yes, that is correct.
The odd thing is that it ONLY happens to the matrix function!
Do you have any guide on how to make the libraries static?
-
Hattress
-
- Posts: 9
- Joined: Sat Nov 01, 2014 7:37 am
by Hattress » Mon Dec 08, 2014 3:47 pm
Update: I believe I have found the problem, you also have to link the core_d.lib. Have not seen this referenced anywhere, but it's fixed now.
-
Hattress
-
- Posts: 9
- Joined: Sat Nov 01, 2014 7:37 am
by manny » Mon Dec 08, 2014 3:58 pm
Awesome. Closing this then!
-
manny
- Site Admin
-
- Posts: 131
- Joined: Tue Feb 11, 2014 6:49 pm
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 2 guests