|
Hi!
My project is compiling fine. But it shows linker errrors.
testAI.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: float __thiscall osgGA::GUIEventAdapter::getYmax(void)const " (__imp_?getYmax@GUIEventAdapter@osgGA@@QBEMXZ)
testAI.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: float __thiscall osgGA::GUIEventAdapter::getYmin(void)const " (__imp_?getYmin@GUIEventAdapter@osgGA@@QBEMXZ)
D:\GUI04072008\Release\GUI.exe : fatal error LNK1120: 2 unresolved externals
I've included all the libraries. What to do?
|
|
|
|
|
did u make an entry in the .def file of the dll?
|
|
|
|
|
I don't know about def file. Where it is located?
|
|
|
|
|
looks like u r using n dll right?
then in the solution explorer u will find n .def file in the source files section.
open it and make an entry of ur function name which u want to export.
|
|
|
|
|
if it still doesnt work then try putting the foll:
?getYmax@GUIEventAdapter@osgGA@@QBEMXZ
(which i took from ur post itself)
Prasann
enjoy
|
|
|
|
|
There's no .def file in my solution. Only source and header files are there.
|
|
|
|
|
Are you sure you link with the lib file that is provided with the dll ?
|
|
|
|
|
|
Are you sure your class is exported in the dll ? Can you post the code of the header file for this class ?
Did you also provide a body for those functions ?
|
|
|
|
|
Here it is:
#ifndef DELTA_TestAI
#define DELTA_TestAI
#include <string>
#include <dtCore/refptr.h>
#include <dtABC/application.h>
#include <dtCore/camera.h>
#include "aicharacter.h"
#include <dtCore/collisionmotionmodel.h>
#include <osg/Matrix>
namespace dtCore
{
class Object;
class Transform;
class CollisionMotionModel;
}
namespace dtChar
{
class Character;
}
namespace dtDAL
{
class Project;
}
using namespace dtCore;
using namespace dtChar;
using namespace dtDAL;
class TestAI : public dtABC::Application
{
public:
TestAI(const std::string& mapName = "vismap6", const std::string& configFilename = "config.xml");
protected:
~TestAI();
public:
virtual void Config();
virtual bool KeyPressed(const dtCore::Keyboard* keyboard, int key);
virtual void PreFrame( const double deltaFrameTime );
private:
void LoadDemoMap(const std::string& pStr);
float mSpeed;
bool mDrawNavMesh;
bool char7start;
unsigned int pWaypointNum[7];
unsigned pAISpeed[7];
unsigned pStopWaypoint[7];
std::string mMapFilename;
dtCore::RefPtr<dtCore::Camera> mOverheadCamera;
dtCore::RefPtr<dtAI::AICharacter> mCharacter1;
dtCore::RefPtr<dtAI::AICharacter> mCharacter2;
dtCore::RefPtr<dtAI::AICharacter> mCharacter3;
dtCore::RefPtr<dtAI::AICharacter> mCharacter4;
dtCore::RefPtr<dtAI::AICharacter> mCharacter5;
dtCore::RefPtr<dtAI::AICharacter> mCharacter6;
dtCore::RefPtr<dtAI::AICharacter> mCharacter7;
dtCore::RefPtr<dtCore::Object> m_Obj;
osg::Matrix mCameraOffset;
dtCore::RefPtr<CollisionMotionModel> mMotionModels;
protected:
osg::ref_ptr<osg::Node> _node;
float _velocity;
osg::Vec3 _eye;
osg::Quat _rotation;
osg::ref_ptr<const osgGA::GUIEventAdapter> _ga_t1;
osg::ref_ptr<const osgGA::GUIEventAdapter> _ga_t0;
float _distance;
void computePosition(const osg::Vec3& eye,const osg::Vec3& lv,const osg::Vec3& up);
void flushMouseEventStack();
};
#endif // DELTA_TestAI
Yes. I defined all the declared functions.
|
|
|
|
|
No, I was talking about the osgGA::GUIEventAdapter class, the one from the dll. Did you write this dll ? If not, from where is it coming from ?
|
|
|
|
|
How to created a well-formatted xml document like this using MSXML(I'm using MSXML6)?
<?xml version="1.0" encoding="utf-8"?>
<!--there are some comments-->
<root>
<node1>...</node1>
</root>
I found no way to add a CRLF after the ProcessInstruction and the first comment, but I do know how to add a CRLF in root node——Just createTextNode and add to the root element.
So my program will always create a xml document like this
<?xml version="1.0" encoding="utf-8"?><!--there are some comments--><root>
<node1>...</node1>
</root>
Please help. Thanks
A Chinese VC++ programmer
|
|
|
|
|
|
Hi all
I have a MDI Application and i am Adding a resource type new Dailog. And in this dailog i have taken a List Box.In this dailog i am calling in .cpp file of MDI.It is working in proper way.
Currently out is showing on MDI Application.But I want to show Out put on listbox. Plz help me
|
|
|
|
|
Hello !
I have declared an byte array say,
BYTE abyData [256];
since i donot know how much memory is exactly necessary.
now in a function i used only 20 bytes of memory i.e
abyData [0] = 23
abyData [1] = 21
.
.
abyData [19] = 45
Now I want to free/release rest of the memory from 20 - 255 ?
|
|
|
|
|
kapardhi wrote: BYTE abyData [256];
You cant do that..
You can use new/delete Or malloc/free for allocating the memory you need.
Regards,
Sandip.
|
|
|
|
|
Allocate 20 bytes of memory then copy the data you need to this new BYTE array then free delete the old one.
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
I think he is using Static array..
|
|
|
|
|
Oh right - the delete keyword will do nicely in that case
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
Delete an array in the stack ?
Your program will certainly crash if you try to do so.
|
|
|
|
|
Don't do it. If you know at design time that you will only have 20 bytes, then use an array of 20 bytes. If you don't know the size upfront (but if it is below 255), then keep your current solution. It's not a big deal that you allocated a bit too much memory. This memory will anyway be deleted when you exit the function.
You will probably end-up with a worse solution trying to optimize that than what you have now.
|
|
|
|
|
Hi there,
Anyone out there who could help me in this. So far, I can't get clearer info/docs regarding this one; I would be more than grateful...
I have an app (impersonated from a service - SYSTEM account) that uses .chm for help topics. Launching the chm file using HtmlHelp API somehow fails when you're SYSTEM account so I changed it using hh.exe, CreateProcessAsUser and WTSQueryUserToken. This works fine in both admin and limited user account during normal logon. However, during user switching, limited user can't somehow launch the chm file.
(SYSTEM account)
logon admin (from startup) -> launch chm file : ok
logon limited (from startup) -> launch chm file : ok
logon admin (from startup) -> switch user (limited) -> launch chm : nothing happens
logon limited (from startup) - switch user (admin) -> launch chm : ok
No messages/warnings from windows event logs. Also, the API's are returning nonzero (success), both WTSQueryUserToken and CreateProcessAsUser.
Though, this is not really a big issue but client is asking for explanations and I can't get straightforward docs online.
Working with XP Prof SP3 and VC++ 6.0. Only happening in XP and Server 2003. Everything works fine with Vista and Server 2008.
|
|
|
|
|
Hi, can somebody plse tell me how do i create a spline thru n points.In my problem, i had 3d points scattered all over the space, i projected them on a plane.I am supposed to join these points with a curve and for that i have to create a spline using c/c++ program.Can anyone help me out in this.Plse do let me know.Thnx in advance.
|
|
|
|
|
|
Thnx for the help.
|
|
|
|