building from source,...

alamata

13-03-2011 09:21:45

hey,... :)

i try to follow the instructions given at http://www.ogre3d.org/tikiwiki/Building ... rom+source

to build mogre 1.7 from source with visual studio 2010

i have compiled "C:\MyMogreBuild\Main\OgreSrc\ogre\lib\OGRE.sln" wihtout trouble,... :)

but

i have some trouble with "C:\MyMogreBuild\Main\Mogre_vs2010.sln"

first,
with this instructions http://msdn.microsoft.com/en-us/library ... 90%29.aspx
to change the target framework,...

i have do that with an other way,...

i have simple add this line

"<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>"


in the <PropertyGroup Label="Globals"> "section" of the ""Mogre_vs2010.vcxproj""

and the target framework seems to be ok,.... :D


but when i try to build i have an error

"Erreur 1 error C1083: Cannot open include file: 'OgrePrerequisites.h': No such file or directory c:\mymogrebuild\main\include\Marshalling.h"

what i have make wrong,.. ?

thanks for your comprehension,...

alamata

13-03-2011 10:49:50

...

byt the property manager
double clicking Microsoft.Cpp. ...
choosing path VC++ and add these path in "path include"

C:\MyMogreBuild\Main\OgreSrc\lib\include
C:\MyMogreBuild\Main\OgreSrc\OgreMain\include
C:\MyMogreBuild\Main\OgreSrc\OgreMain


i try to compile and i have this error now,...

error C2011: 'CLRObject' : 'class' type redefinition C:\MyMogreBuild\Main\Ogre\CLRObject.h

how can i do to make the compilation possible,...?

McDonte

13-03-2011 11:14:10

i try to follow the instructions given at http://www.ogre3d.org/tikiwiki/Building ... rom+source

Why don't you use these instructions?
They should work. If you still have problems, check out this thread. amirabiri will hopefully release this awesome tool soon. :D

alamata

14-03-2011 08:28:36

Hey, ...McDonte

thx for the link,... :wink:

i follow these instructions now but i have already one question about,...

how ca do that

"Apply "Mogre\Main\Ogre Patches\58266f25ccd2.patch" to "Mogre\Main\OgreSrc\ogre".

sorry for this noob question but i dont know how apply this patch,...

McDonte

14-03-2011 11:27:13

sorry for this noob question but i dont know how apply this patch,...

No problem, I also didn't know how to do this when I read this the first time. I needed a very long time of search on google and many tries :D

"Apply "Mogre\Main\Ogre Patches\58266f25ccd2.patch" to "Mogre\Main\OgreSrc\ogre".

If you have TortoiseHg you can use the graphical interface to do it.
1. Go to your source location.
2. Right-click and select "Hg Repository Explorer".
3. Click onto "Synchronize" and "Import".
4. Search your patch and click "Import".
5. Now it should patch all files.

If you don't want to go the graphical way you can use the command line.
The command is "hg.exe import <patch file>". Should do the same thing.

If it does not what it is supposed to do then please post what it is complaining about :wink:

alamata

14-03-2011 14:16:42

thx for all your revelations McDonte .... :wink:

but i have some error when i try to import by the way you have said,...

unable to find 'include/OgreAnimable.h' for patching
2 out of 2 hunks FAILED -- saving rejects to file include/OgreAnimable.h.rej
abort: patch failed to apply

....

i believe that i have put the good repertories in the good place,...But,...

thanks for your patience,...

McDonte

14-03-2011 15:15:53

You're welcome! :D

I faced the same error, solution was simple for me:
1. TortoiseHg created a folder for you where it hoped to find the files to be patched.
2. Copy all .h files from "build\Main\OgreSrc\ogre\OgreMain\include" to that new folder.
3. Create a folder "src" in "build\Main\OgreSrc\ogre" and copy the cpp-file "OgreException.cpp" to it (build\Main\OgreSrc\ogre\OgreMain\scr).
4. Run TortoiseHg, now it should work fine and patch all files.


Much easier way I just found out:
Use TortoiseSVN to apply the patch. Simply right-click onto the patch file, select "TortoiseSVN" -> "Apply patch..." and choose your directory.

alamata

14-03-2011 19:10:46


Much easier way I just found out:
Use TortoiseSVN to apply the patch. Simply right-click onto the patch file, select "TortoiseSVN" -> "Apply patch..." and choose your directory.


Well done ... :wink:

but ...

i have trouble now at this step

For VS2010, open solution "Mogre\Codegen\AutoWrap\AutoWrap_vs2010.sln" in Visual Studio and compile the Debug version

when i compile the debug (any cpu) of this solution i have an error...
(Could not find type)


"en francais dans le texte..."


"l'exception Exception n'a pas été gérée"

if (type == null)
{
if (ParentNameSpace == null)
{
if (raiseException)
throw new Exception("Could not find type");
else
return (T)(object)new DefInternal(name);
}
else
return ParentNameSpace.FindType<T>(name, raiseException);
}



in "Mogre\Codegen\AutoWrap\Meta\DefNameSpace.cs"

for " ParentNameSpace with value:null in the type AutoWrap.Meta.DefNameSpace "

...

an idea,...

McDonte

16-03-2011 12:05:13

an idea,...
Never seen such an error before...Sounds like the .xml file that should be generated from cpp2java has errors...
Try to run this tool again and follow carefully every step!