Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: fatal error LNK1104: cannot open file 'OgreMain.dll'

Started 1 month, 2 weeks ago by cnemeth
I created a Win32 empty project in VS/VC++2008 and added .cpp file to the project, into which, I pasted the the initial code from Ogre Basic Tutorial 1. When I build the project, I get the following error: "... fatal error LNK1104: cannot open file 'OgreMain.dll' ..." My VS and DirectX9 are up to date. In VS I added : Tools | Options | Projects and Solutions | VC++ Directories | Include Files:...
Site: Ogre Forums  Ogre Forums - site profile
Forum: Help  Help - forum profile
Total authors: 4 authors
Total thread posts: 14 posts
Thread activity: no new posts during last week
Domain info for: ogre3d.org

Other posts in this thread:

Jabberwocky replied 1 month, 2 weeks ago
For the Additional Dependencies, you want to list the .lib files, not the .dll files (as you wrote in your post). Also, you've specified your library and include directories in an unusual way (Tools | Options | Projects and Solutions | VC++ Directories | Include Files) The usual way of identifying your additional library and include directories is in the Project Property Pages: - Configuration ...

cnemeth replied 1 month, 2 weeks ago
Thanks very much for the very helpful comments. I now am able to build the app cleanly. However, when I try to run the application (in debug mode), I get a dialog with the following error: Unhandled exception at 0x76f8fbae in BasicTutorial1.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x003aeb88.. The dialog has tow buttons: break and continue. Clicking beak will start a ...

typist replied 1 month, 2 weeks ago
The application that you created with the lib files, need to find the OGRE DLLs. Typically this involves one of three steps: copying all the dependent DLLs into the \Windows\System32\ directory (not recommended) copying the dependent DLLs into an environment variable (not sure the name of this environment variable for OGRE on Windows, poke around the build process on OGRE wiki, or the OGRE ...

Jabberwocky replied 1 month, 2 weeks ago
When you update your project configuration, you need to do it twice, once for both debug and release. On the project property pages, you'll see a dropdown box on the top left labeled "Configuration". That bad_alloc crash may also be caused by improper project configurations. One thing to check is that your Configuration Properties | C/C++ | Code Generation | Runtime Library is set properly: - ...

cnemeth replied 1 month, 2 weeks ago
Thanks for all your suggestions. I have now combed through all the project settings in both debug and release modes, comparing my application's settings to the sample applications', and can't see any thing else I could change. I also copied the OgreMain.dll and the OIS.dll files to the release directory, and the OgreMain_d.dll and OIS_d.dll files to the debug directory, of my application. In ...

cnemeth replied 1 month, 2 weeks ago
Thanks for all your suggestions. I have now combed through all the project settings in both debug and release modes, comparing my application's settings to the sample applications', and can't see any thing else I could change. I also copied the OgreMain.dll and the OIS.dll files to the release directory, and the OgreMain_d.dll and OIS_d.dll files to the debug directory, of my application. In ...

Jabberwocky replied 1 month, 2 weeks ago
Ogre is designed to be used by experienced C++ coders, who expect to get their hands dirty. All this mucking about with project configurations is just the way it is, when setting up a new vc++ project involving external libraries. I understand this can be frustrating if you were expecting something different. If this isn't what you want, and you'd rather have something that involves less ...

jacmoe replied 1 month, 2 weeks ago
cnemeth wrote: At this point I am thinking I should just create all my my Ogre projects in the OgreSDK directory itself and save myself the trouble. Frankly, so far this experience has been very frustrating and disappointing. Installing an SDK should not be so damn complicated/convoluted. Good point. Your problems are that you don't know your tool well enough. But don't fret. -> http...

cnemeth replied 1 month, 2 weeks ago
Just to set the record straight, I do not have an option to use anything else. This project is a requirement for a class I am taking otherwise I wouldn't be doing this. Also, I am not exactly a beginner either. Although I am not a professional developer, I have been coding in OO C++ on and off since the mid '90s (mostly non-GUI engineering type applications) and have been programming in other ...

jacmoe replied 1 month, 2 weeks ago
I can't really see how the two wiki articles I linked to could be made clearer and more to the point. But, I'll spare you the agony of actually clicking and reading.. In Visual Studio, go to project settings - debugging. Make sure that working directory is set to whereever you intend your application to be run from. After that, set Command to your working directory + the name of your ...

 

Top contributing authors

Name
Posts
cnemeth
7
user's latest post:
fatal error LNK1104: cannot open...
Published (2009-11-07 18:26:00)
Thanks to you also because you started me off on the right path by telling me where the inlude and lib files should go. Jacmoe was also right that I do not know VS. I have tried to stay away from VS/VC++ for the longest time but I am now forced into using it by circumstance. I started out with Borland Turbo C++, then C++Builder, and have been using (and enjoying) Eclipse/CDT/MinGW for a number of years. Last year, when I started using the Qt...
Jabberwocky
4
user's latest post:
fatal error LNK1104: cannot open...
Published (2009-11-07 12:53:00)
I'm glad it all worked out. Jacmoe is always full of useful advice, glad he stopped by. I know a lot of fairly experienced engineers who would have had similar frustrations setting up a project from scratch. A lot of times the project / build environment is already set up by the time you start working on something. Congrats on toughing it out.
jacmoe
2
user's latest post:
fatal error LNK1104: cannot open...
Published (2009-11-07 02:57:00)
I can't really see how the two wiki articles I linked to could be made clearer and more to the point. But, I'll spare you the agony of actually clicking and reading.. In Visual Studio, go to project settings - debugging. Make sure that working directory is set to whereever you intend your application to be run from. After that, set Command to your working directory + the name of your executable. In case you want to read up on how to...
typist
1
user's latest post:
fatal error LNK1104: cannot open...
Published (2009-11-06 22:11:00)
The application that you created with the lib files, need to find the OGRE DLLs. Typically this involves one of three steps: copying all the dependent DLLs into the \Windows\System32\ directory (not recommended) copying the dependent DLLs into an environment variable (not sure the name of this environment variable for OGRE on Windows, poke around the build process on OGRE wiki, or the OGRE documentation) (this step is also not recommended) the...

Related threads on "Ogre Forums":

Related threads on other sites:

Thread profile page for "fatal error LNK1104: cannot open file 'OgreMain.dll'" on http://www.ogre3d.org. This report page is a snippet summary view from a single thread "fatal error LNK1104: cannot open file 'OgreMain.dll'", located on the Message Board at http://www.ogre3d.org. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity