Procedure entry point not found

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
redhead
Kobold
Posts: 37
Joined: Sun Jun 01, 2008 4:25 pm

Procedure entry point not found

Post by redhead »

Hi,
I ve been using Ogre for a half a year now. It worked all well, but few days ago I tried to go to new version (Shoggoth). And it doesnt work. Compile is fine but when running the code. Program crashes right away. Ogre is not loaded at all.
Error message (translated from czech lang):

"Procedure entry point not found
Procedure entry point
?writeContentsToFile@RenderTarget@Ogre@@QAEXABV?$basic_string
@DU?$char_traits@D@std@@V?allocator@D@2@@std@@@Z could not be found in dynamically linked OgreMain_d.dll library."

I eliminated this error (by recompiling OgreMain_d.lib) but then appeared another very similar error that mentions getHandle() method.

Does anyone know what is wrong?
Demos work fine.

thanks
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Procedure entry point not found

Post by jacmoe »

Whenever you perform a significant interface breaking upgrade, please do a complete clean and build.
Of everything: OgreMain, rendersystems, scenemanagers, the whole lot. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Re: Procedure entry point not found

Post by haffax »

readhead, if after rebuilding, you still can't determine what part of your project you forgot to rebuild, use dependency walker, to find out.
team-pantheon programmer
creators of Rastullahs Lockenpracht
mrajaei
Gnoblar
Posts: 1
Joined: Fri Jun 03, 2011 7:29 pm

Re: Procedure entry point not found

Post by mrajaei »

Hi,
I have a simple code about hydrax as below:
After compile when i run exe file there is an error like this:
The procedure entry point ??0Frustum@Ogre@@QAE@XZ could not be located in the dynamic link library OgreMain.dll
please help me.

Code: Select all

    #include "ExampleApplication.h"
    #include "Hydrax.h"
    #include "Noise/Perlin/Perlin.h"


    class TutorialApplication : public ExampleApplication
    {
    public:
        TutorialApplication()
        {
        }

        ~TutorialApplication() 
        {
        }
    protected:
        void createScene(void)
        {

          SceneNode *myNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
          Entity *mHead= mSceneMgr->createEntity("head","ogrehead.mesh");

          myNode->attachObject(mHead);

          Hydrax::Hydrax* mHydrax = new Hydrax::Hydrax(mSceneMgr, mCamera,mWindow->getViewport(0));

        }
    };

	INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
	{
		TutorialApplication app;
		app.go();
		return 0;
	}
CapnJJ
Gnoblar
Posts: 6
Joined: Tue Mar 09, 2010 7:48 am
x 1

Re: Procedure entry point not found

Post by CapnJJ »

I've seen this error quite a lot, and in every case it was due to the fact I was running my app against the wrong version of OgreMain.dll or ogremain_d.dll.
(I'm a sloppy housekeeper :D )

Is it possible you have older versions of the ogremain DLL's laying around in your applications working directory? Or somewhere in your system path?

It looks like maybe your application is finding the "wrong" ogremain before it finds the "right" one. Not sure what order the app will follow when looking for the DLL it needs, but it's a pretty safe bet that if you take the ogremain (or the _d version) from the same build of ogre that you built your app against, and place it in the same directory with your app's EXE, it will be found first.

Also, double check your "working directory" under project debug settings, it may be pointing to the wrong location.

I'm sure there are other things that can cause this error, but having been bitten by this EXACT problem numerous times, I'd wager that your app is just finding the wrong DLL somewhere/somehow.

I hope this helps.

JJ

ON A SIDE NOTE: I just noticed the dates on this thread. It's almost ALWAYS better to post a new thread with your issue, rather than ressurrecting a fossil :)
krisztiantobias
Gnoblar
Posts: 19
Joined: Mon Feb 11, 2013 7:23 pm

Re: Procedure entry point not found

Post by krisztiantobias »

It's a common mistake. Now I make that mistake. I downloaded a tutorial with older dll and I recompiled that. Your exe try to find the dll-s in the current folder, but there was an older ogremain.dll.

So, If you change your version Do not forget the dll-s.
Post Reply