Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 01:00

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 18.02.2011, 21:17 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Hello Evry1
I am trying to use this function go to for moving my agent to move from one point to another
actually i am trying to get coordinates from the mouse click so I want that when i click this button
a go to function will be called which will take my character to that specific coordinates

my formal way is this


Code:
void DemoApp::mouseClickEvent(int button, int action, float x, float y)
{
   
   if(button == 1) //right mb
   {
      m_m1pressed = (action == 1);
   }
   else //left mb
   {
      m_m0pressed = (action == 1);
      if(m_m0pressed)

      {         
         float coords[3];
         const char* nodeName = GameEngine::pickNodeWithIntersectionCoords(x,y, coords);
         DemoApp::processDestination(nodeName, coords[0],coords[1],coords[2]);
      }
   }


   //   printf("Cordinate X = %d Coordinate Y = %d Coordinate Z %d = ",coords[0],coords[1],coords[2]);
      
}




**********************************************************************
void DemoApp::processDestination(const char* nodeName, float x, float y, float z)
{

GameEngine::Agent_goToPosition(m_characterID, x,y,z, 1.3f);

}
**********************************************************************



but i get this error

***************************************************
1> All outputs are up-to-date.
1>DemoApp.obj : error LNK2001: unresolved external symbol __imp__Agent_goToPosition
1>C:\Users\Imran\Documents\WorkspaceHorde3D\Tools\GameEngine\/bin/DemoAppd.exe : fatal error LNK1120: 1 unresolved externals

***************************************************

kindly help! i m new to game engines
Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 18.02.2011, 22:10 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Did you check if Agent_goToPosition is exported from the DLL plugin containing it? Did you add this DLL as dependency? As mentioned before, unresolved linker errors are always due to missing symbols in the final executable. So it is not enough to include the headers, they normally only include the declaration! You also have to add the library/source files that really contain the implementation, if you don't want to resolve method names dynamically.

If you don't know what I'm talking about, I guess it would be advisable to do some c++ programming course.


Top
 Profile  
Reply with quote  
PostPosted: 19.02.2011, 17:59 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
Did you check if Agent_goToPosition is exported from the DLL plugin containing it? Did you add this DLL as dependency? As mentioned before, unresolved linker errors are always due to missing symbols in the final executable. So it is not enough to include the headers, they normally only include the declaration! You also have to add the library/source files that really contain the implementation, if you don't want to resolve method names dynamically.

If you don't know what I'm talking about, I guess it would be advisable to do some c++ programming course.


Well ! I agree with the fact that i have low programming skills but i completely understand what u r talking about here correct me if i m wrong!
U want me to check dependencies that i had to add in my project ... and check if function Agent_goToPosition is exported from DLL pluginn ....

so answer to it is , Yes I not only added all the header files related and I also added the dependencies but I don't know how to check if my DLL

Plugin which contains it is exporting that function or not :(

any sugestions!
Thanks for helping
Regards Imran Habib


Top
 Profile  
Reply with quote  
PostPosted: 20.02.2011, 08:02 
Offline

Joined: 08.11.2010, 10:46
Posts: 35
imranhabib wrote:
Well ! I agree with the fact that i have low programming skills but i completely understand what u r talking about here correct me if i m wrong!

Don't take this the wrong way, but your approach is wrong, or shall we say hasty?
You may understand the words he is saying, but you actually don't understand linking at all or else you would have tried to solve the problem before asking for help.
Do a Google search for the error, and learn the general reasons for such errors. If you ask someone to solve it as soon as you have a link error, you will never come to understanding linkage.
Understanding what someone is talking about and actually understanding the topic they are talking about is 2 completely different things.

Same with coding. You generally should ask about the concept or about ideas how to go about it. Only ask for small code fixes or adjustments when you already are on the right track.
If you want to be any good at all, you have to do everything yourself in the beginning, and it takes years...

Regards,
vikingcode


Top
 Profile  
Reply with quote  
PostPosted: 15.03.2011, 22:53 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
Did you check if Agent_goToPosition is exported from the DLL plugin containing it? Did you add this DLL as dependency? As mentioned before, unresolved linker errors are always due to missing symbols in the final executable. So it is not enough to include the headers, they normally only include the declaration! You also have to add the library/source files that really contain the implementation, if you don't want to resolve method names dynamically.

If you don't know what I'm talking about, I guess it would be advisable to do some c++ programming course.


Hello again !

Volker I solved this problem too, i mean the goto function has no errors now, i have resolved it by making a connection again in the
configuration properties and Agent_gotoPostion function works perfectly ....

Regards Imran Habib


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group