I started my project by doing:
New->Project->Windows Forms Application
The following files are given to me:
Header Files:
MainWindow.h (I named this, instead of default Form1)
resource.h
stdafx.h
Resource Files:
app.ico
app.rc
Source Files:
AssemblyInfo.cpp
SceneCreator.cpp (I named this)
stdafx.cpp
So I played around with my main form and put in some buttons and what not, now I want to try and have Ogre render to a control.
Here is my SceneCreator.cpp:
Code: Select all
#include "stdafx.h"
#include "MainWindow.h"
#include <iostream>
#include <string>
#include <windows.h>
#include "Ogre.h"
using namespace SceneCreator;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::BRAND NAME();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew MainWindow());
return 0;
}
Code: Select all
1>------ Build started: Project: SceneCreator, Configuration: Release Win32 ------
1>Compiling...
1>SceneCreator.cpp
1>Linking...
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::Exception::Exception(class Ogre::Exception const &)" (??0Exception@Ogre@@$$FQAM@ABV01@@Z)
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::ParameterDef::~ParameterDef(void)" (??1ParameterDef@Ogre@@$$FQAM@XZ)
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::ParameterDef::ParameterDef(class Ogre::ParameterDef const &)" (??0ParameterDef@Ogre@@$$FQAM@ABV01@@Z)
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::ParamDictionary::ParamDictionary(class Ogre::ParamDictionary const &)" (??0ParamDictionary@Ogre@@$$FQAM@ABV01@@Z)
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::Exception::~Exception(void)" (??1Exception@Ogre@@$$FQAM@XZ)
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::GpuProgramParameters::~GpuProgramParameters(void)" (??1GpuProgramParameters@Ogre@@$$FQAM@XZ)
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::ParamDictionary::~ParamDictionary(void)" (??1ParamDictionary@Ogre@@$$FQAM@XZ)
1>SceneCreator.obj : error LNK2001: unresolved external symbol "public: __clrcall Ogre::Vector4::Vector4(class Ogre::Vector4 const &)" (??0Vector4@Ogre@@$$FQAM@ABV01@@Z)
1>C:\Documents and Settings\Ben\My Documents\Visual Studio 2005\Projects\SceneCreator\Release\SceneCreator.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\My Documents\Visual Studio 2005\Projects\SceneCreator\SceneCreator\Release\BuildLog.htm"
1>SceneCreator - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
And yes, I have linked in Ogremain.lib. It's set to release, and I set all of the properties as described in
http://www.ogre3d.org/wiki/index.php/Newbie_Tutorial_2
Any help is appreciated
