Relo Template for Irrlicht.
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
I got it to work!
Now I have a dll compiled with vc++ toolkit! hahahaha
The only thing that failed is the last step: the generation of irrlixht.exp and irrlicht.lib
In fact those files have been created in my source folder... maybe they are corrupted, I don't know.
(the size of irrlicht.lib is 2.2k and the official release is 3k)
But I think that it is not important because I can still use the official irrlicht.lib
the dll itself seems to be exactly the same as the official one (same size, etc)
I tested it and it WORKS!
I will post this evening a short tutorial explaining the steps to make a dll with relo and vc++ toolkit. Stay tuned.
The only problem is that people will need to download the windows platform sdk (more than 40MB even if you don't download the examples and the documentation) so I'm not sure if it is really useful.
But if someone make a patch for irrlicht (like IrrlichtNX project) then I will be able to re-compile the dll.
Anyway, I'm proud and very happy that I make it works!
Now I have a dll compiled with vc++ toolkit! hahahaha
The only thing that failed is the last step: the generation of irrlixht.exp and irrlicht.lib
In fact those files have been created in my source folder... maybe they are corrupted, I don't know.
(the size of irrlicht.lib is 2.2k and the official release is 3k)
But I think that it is not important because I can still use the official irrlicht.lib
the dll itself seems to be exactly the same as the official one (same size, etc)
I tested it and it WORKS!
I will post this evening a short tutorial explaining the steps to make a dll with relo and vc++ toolkit. Stay tuned.
The only problem is that people will need to download the windows platform sdk (more than 40MB even if you don't download the examples and the documentation) so I'm not sure if it is really useful.
But if someone make a patch for irrlicht (like IrrlichtNX project) then I will be able to re-compile the dll.
Anyway, I'm proud and very happy that I make it works!
I'm even more proud!!! It's a great job you're doing. I'm very glad we've taken this so far!!! and specially for your efforts and understanding of the toolkit.
I already got the sdk installed so I'll be counting the minutes for that tutorial!!!
congrats man!!! more stuff for the new tutorial!!!!
cheers!
I already got the sdk installed so I'll be counting the minutes for that tutorial!!!
congrats man!!! more stuff for the new tutorial!!!!
cheers!
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
(Sorry I didn't replied yesterday...)
What you need:
1) windows core sdk
2) directx sdk (headers and libraries)
3) relo and vc++ toolkit (of course )
What you do:
1) First there is a bug in Relo. ... If you add other folders in the "extra library paths" in the project options, it won't work.
This is because it use the /L option to add more lib folders and this is not a real option of MSVC++ ... (so this is why you get errors like LINK : warning LNK4044: unrecognized option '/LC:\DXSDK\lib'; ignored )
I don't know how to fix it and what options to use... But I found a solution, copy all the files that are in your directx/lib and Microsoft SDK/lib into your C:/Program Files/Microsoft Visual C++ Toolkit 2003/lib folder (if it is where you installed vc++)
2) Unzip Irrlicht source somewhere (I used C:/Irrlicht/source)
3)Go to your relo folder. Open config/compilers/msvc.ini
add the following lines:
[DLL Commands]
CompileCmd=cl "$IN" /c /Fo"$OUT" /I"$PATH\..\include" $CFLAGS /nologo
LinkCmd=link /DLL /NOLOGO /LIBPATH:"$PATH\..\lib" $LFLAGS $IN "/OUT:C:\irrlicht\source\irrlicht.dll"
(you can see that I added manually the output name for the dll with the /OUT option. This is because otherwise it tried to give it a .exe extension (another relo bug) instead of .dll . If you want to use another path, modify this option..)
4) Open Relo. click file/open project . change the type to "supported formats" . open c:/Irrlicht/source/Irrlicht.dsp
Wait some time...
5) Go to project options.
In the Linker tab: choose Windows DLL then check "create import library" and choose generate .DEF file
For the Extra libraries type:
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
In the Options tab:
Add this to the extra compiler switches:
/O2 /Og /D WIN32 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IRRLICHT_EXPORTS" /D "_MBCS" /D "_USRDLL"
In the directories tabL
Add to the extra include paths:
c:/DXSDK/include
c:/Microsoft sdk/include
c:/irrlicht/source/include
C:/Program Files/Microsoft Visual C++ Toolkit 2003/include
c:/irrlicht/source
do not add library paths because it doesn't work.
click OK.
6) Save your project (file/save project) so you don't need to set again all the options later.
7) click on "build" and cross your fingers...
after a while the dll should be generated with success.
..then it will try to generate irrlicht.exp and irrlicht.lib
and as I already said in my previous post it will fail I don't know why...
8 ) Give me your comments.
What you need:
1) windows core sdk
2) directx sdk (headers and libraries)
3) relo and vc++ toolkit (of course )
What you do:
1) First there is a bug in Relo. ... If you add other folders in the "extra library paths" in the project options, it won't work.
This is because it use the /L option to add more lib folders and this is not a real option of MSVC++ ... (so this is why you get errors like LINK : warning LNK4044: unrecognized option '/LC:\DXSDK\lib'; ignored )
I don't know how to fix it and what options to use... But I found a solution, copy all the files that are in your directx/lib and Microsoft SDK/lib into your C:/Program Files/Microsoft Visual C++ Toolkit 2003/lib folder (if it is where you installed vc++)
2) Unzip Irrlicht source somewhere (I used C:/Irrlicht/source)
3)Go to your relo folder. Open config/compilers/msvc.ini
add the following lines:
[DLL Commands]
CompileCmd=cl "$IN" /c /Fo"$OUT" /I"$PATH\..\include" $CFLAGS /nologo
LinkCmd=link /DLL /NOLOGO /LIBPATH:"$PATH\..\lib" $LFLAGS $IN "/OUT:C:\irrlicht\source\irrlicht.dll"
(you can see that I added manually the output name for the dll with the /OUT option. This is because otherwise it tried to give it a .exe extension (another relo bug) instead of .dll . If you want to use another path, modify this option..)
4) Open Relo. click file/open project . change the type to "supported formats" . open c:/Irrlicht/source/Irrlicht.dsp
Wait some time...
5) Go to project options.
In the Linker tab: choose Windows DLL then check "create import library" and choose generate .DEF file
For the Extra libraries type:
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
In the Options tab:
Add this to the extra compiler switches:
/O2 /Og /D WIN32 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IRRLICHT_EXPORTS" /D "_MBCS" /D "_USRDLL"
In the directories tabL
Add to the extra include paths:
c:/DXSDK/include
c:/Microsoft sdk/include
c:/irrlicht/source/include
C:/Program Files/Microsoft Visual C++ Toolkit 2003/include
c:/irrlicht/source
do not add library paths because it doesn't work.
click OK.
6) Save your project (file/save project) so you don't need to set again all the options later.
7) click on "build" and cross your fingers...
after a while the dll should be generated with success.
..then it will try to generate irrlicht.exp and irrlicht.lib
and as I already said in my previous post it will fail I don't know why...
8 ) Give me your comments.
Last edited by cmoibenlepro on Fri Aug 06, 2004 6:40 pm, edited 2 times in total.
H AHA HA AH AH AHAHA HA HA HA HA HA H A!!!!! (maniac laughter!!!!)
those r gr8 news Puh! And you're right, now everybody can compile the dll and use DX as well.
Cmoibelenbro, I got no idea how you came up with this!
And I thought I was tweaking Relo badly! hah ah ah ah ha ha
Gonna try it in the office today. I got a final question Cmoibelenpro, will all these changes harm your template? (I kinda like the project wizard!)
I mean, do we have to set things one way for dlls and the template way for exes?
congrats again. If you consider things r final, I'll write v2.0 of my tutorial and before releasing it I'll send it to you for a check-up and approval of your stuff.
cheers!
those r gr8 news Puh! And you're right, now everybody can compile the dll and use DX as well.
Cmoibelenbro, I got no idea how you came up with this!
And I thought I was tweaking Relo badly! hah ah ah ah ha ha
Gonna try it in the office today. I got a final question Cmoibelenpro, will all these changes harm your template? (I kinda like the project wizard!)
I mean, do we have to set things one way for dlls and the template way for exes?
congrats again. If you consider things r final, I'll write v2.0 of my tutorial and before releasing it I'll send it to you for a check-up and approval of your stuff.
cheers!
-
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany
@afecelis:
You write in you tutorial for RELO that you think its better than DevC++. Just i was changing to DevC++, now i read this. Now i dont know should i change again to this ?
Whats better to DevC++ ? Smaller exe-files ? Quicker Run ? Better Handling ? For me the important thing is that the resultcode is quick.
You write in you tutorial for RELO that you think its better than DevC++. Just i was changing to DevC++, now i read this. Now i dont know should i change again to this ?
Whats better to DevC++ ? Smaller exe-files ? Quicker Run ? Better Handling ? For me the important thing is that the resultcode is quick.
It works like a charm!!! My VC7 dll is 1.550 kb and the Relo one is 844. Outstanding! It seems lke the toolkit really optimizes stuff! Great work Cmoibelenpro. Let me know what you think of the new tutorial and any ideas for it.
@knightoflight:
Devc++ only compiles opengl. With the Relo work-around you can use directx, and most of MS standard stuff and libs. Besides, if you're used to Visualstudio you'll find Relo+MSVC toolkit to work in a very similar way.
ps. And you can compile optimzed exes (I've gotten the smallest exes with this, smaller than vc6 or vc7), and you got a nice tutorial, a nice template for new projects and now a nice dll thnx to Cmoibelenpro!!!
hope it helps.
@knightoflight:
Devc++ only compiles opengl. With the Relo work-around you can use directx, and most of MS standard stuff and libs. Besides, if you're used to Visualstudio you'll find Relo+MSVC toolkit to work in a very similar way.
ps. And you can compile optimzed exes (I've gotten the smallest exes with this, smaller than vc6 or vc7), and you got a nice tutorial, a nice template for new projects and now a nice dll thnx to Cmoibelenpro!!!
hope it helps.
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
Yes!
It works OK!
I'm happy it works Thanks for your comments.It works like a charm!!!
No. To compile the dll I changed the compiler settings. The wizard use the template settings.I got a final question Cmoibelenpro, will all these changes harm your template?
I tested it and there is no conflicts, it still works.
Yes.I mean, do we have to set things one way for dlls and the template way for exes?
I didn't do anything special, I just opened the official VisualStudio project (irrlicht.dsp) with a text editor (I use SciTE) and checked what options were needed to compile the dll. Then, I added them to Relo and it worked.Cmoibelenbro, I got no idea how you came up with this! And I thought I was tweaking Relo badly!
BTW, when I will have time I will submit the bugs I found to the creator of Relo....
Last edited by cmoibenlepro on Fri Aug 06, 2004 6:44 pm, edited 1 time in total.
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
also if you want to know what means all the options of VC++ toolkit (and if you want to know where I found which command line options were needed to compile a DLL) check there:
http://msdn.microsoft.com/library/defau ... tegory.asp
http://msdn.microsoft.com/library/defau ... erence.asp
hope it helps!
Relo rocks!
http://msdn.microsoft.com/library/defau ... tegory.asp
http://msdn.microsoft.com/library/defau ... erence.asp
hope it helps!
Relo rocks!
Relo kicks major butt!
Ever since I ran into it for the first time I got obsessed on getting it to work with a VC compiler. It already had borland support but I wanted it to do something else, something cooler but there wasn't a free ms vc compiler around. Then MS released the .net toolkit for free and wham! Things fell into place at the proper time. Love at first sight, ha ha hah a. And then, wham! you come up with the template and dll. We should make games together!!
I got this weekend planned to write the new tutorial. It's gonna be a major improvement of the original with your stuff in it (credits included).
About Reporting the bugs to Relo's author: he doesn't answer emails much. Nor anybody replies in his forums. I wrote him and sent him a copy of the tut and stuff but never got a reply. It would be great if you get any answer from him and get him to include the bug fixes for next release 1.0 (which seems to be the last one). Although V1.0 is also taking him a while. It seems like he's not workin on the project anymore.
Anyway, I'm more than sattisfied the way things are. Now I'm going to try to compile Audiere.dll for sound following your steps.
cheers, and thnx! I'll alway thank people like you who offer new things to life!
Ever since I ran into it for the first time I got obsessed on getting it to work with a VC compiler. It already had borland support but I wanted it to do something else, something cooler but there wasn't a free ms vc compiler around. Then MS released the .net toolkit for free and wham! Things fell into place at the proper time. Love at first sight, ha ha hah a. And then, wham! you come up with the template and dll. We should make games together!!
I got this weekend planned to write the new tutorial. It's gonna be a major improvement of the original with your stuff in it (credits included).
About Reporting the bugs to Relo's author: he doesn't answer emails much. Nor anybody replies in his forums. I wrote him and sent him a copy of the tut and stuff but never got a reply. It would be great if you get any answer from him and get him to include the bug fixes for next release 1.0 (which seems to be the last one). Although V1.0 is also taking him a while. It seems like he's not workin on the project anymore.
Anyway, I'm more than sattisfied the way things are. Now I'm going to try to compile Audiere.dll for sound following your steps.
cheers, and thnx! I'll alway thank people like you who offer new things to life!
-
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany
-
- Posts: 237
- Joined: Thu May 27, 2004 3:18 pm
- Location: Canada
@knightoflight:
yes it is possible to use dx8 with dev-cpp (not dx9) but there is some problems:
-you need to use the debug version of dx8 (-ld3dx8d) so the resulting irrlicht dll is a lot bigger (and also you must distribute the debug version of directx dll with your executable because most people don't have it in addition to irrlicht.dll) so it's better to use only opengl.
-vc++ toolkit have a professionnal quality optimizer and the compiled executables are smaller than those compiled with MinGW (dev-cpp compiler)
yes it is possible to use dx8 with dev-cpp (not dx9) but there is some problems:
-you need to use the debug version of dx8 (-ld3dx8d) so the resulting irrlicht dll is a lot bigger (and also you must distribute the debug version of directx dll with your executable because most people don't have it in addition to irrlicht.dll) so it's better to use only opengl.
-vc++ toolkit have a professionnal quality optimizer and the compiled executables are smaller than those compiled with MinGW (dev-cpp compiler)
dx9 works, though same thing about needing a dll
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars