General Question Learning to create .dll files for vessels

anemazoso

Addon Developer
Addon Developer
Joined
May 23, 2008
Messages
442
Reaction score
0
Points
0
Location
Las Vegas, NV
Ok, so after many years of participating in the Orbiter community and creating add-on's I have decided to learn to create .dll files in order to bring my add-on's to the next level. After creating may SC3 based craft I have grown frustrated with the low level of functionality available to the SC3 user. Though I do have to say that I am eternally grateful to Vinka for creating SC3 and multistage2. Without Vinka I would have been relegated to simple bases and planetary objects and would not have had the opportunity to express my imagination.

One of the motivational reasons for learning to create my own .dll files is Dansteph's UMMU and upcoming UCGO. I would really like to incorporate these features into my add-on’s.

So, I have downloaded and installed Visual C++ 2008 Express Edition. I have downloaded and reviewed Art Eaton's Frankencoder tutorial and have reviewed the Free compiler setup found on the Orbiter wiki page. The first problem I have encountered is the setup.

On the Orbiter wiki page it states that you need to the Windows SDK. But the link provided is for the 2003 version. Is this compatible with VC++ 2008?

I understand I need to include libraries. But there is no clear step-by-step instruction on how to do this with VC++ 2008.

Basically all of the resources available to a complete ignoramus such as myself are very confusing and seam outdated.



So my fist question to the pros out there is. What is my next step?




I would like to thank in advance anyone who is willing to help me :)
 
I think you won't need Windows SDK if you use VC++ 2008. Computerex made a great tutorial:
 
So, I have downloaded and installed Visual C++ 2008 Express Edition. I have downloaded and reviewed Art Eaton's Frankencoder tutorial and have reviewed the Free compiler setup found on the Orbiter wiki page. The first problem I have encountered is the setup.

On the Orbiter wiki page it states that you need to the Windows SDK. But the link provided is for the 2003 version. Is this compatible with VC++ 2008?

I understand I need to include libraries. But there is no clear step-by-step instruction on how to do this with VC++ 2008.

Hi!

Went through all the same myself a few months ago. Get ready for some good, solid fun with VC++.

This thread started by me has some of my teething problems solved right where you are at the moment. Check posts #15 onwards...

http://www.orbiter-forum.com/showthread.php?t=7774

Look in the Program Files Folder to see if you have Microsoft SDK\Windows\v6.0A. That would confirm if you have the SDK or not. If you download the ISO Image of VS2008, it comes with it. Do not know if the web install does, but you could check and confirm for others!

Familiarize yourself with the setup, and try some of the samples in the Orbitersdk folder.

...and make good use of the API Guide and (later) Reference in the orbitersdk\docs folder.

Some good C++ tutorials for support...

http://www.cplusplus.com/doc/tutorial/

http://www.freeprogrammingresources.com/cppbooks.html

Should find something there.

Enjoy!:thumbup:
 
2008 comes with the SDK, luckily, you now get a pretty complete IDE with the Express versions, had been different some time ago. If you really start to get the hang of making DLLs, you should consider getting the professional version, since it has many tools, that you need to work around in the express version, for example for having dialogs and 2D panels.

After you have the compiler, you need the SDK. If you have the SDK, you can start your project. Important settings are the include paths and add the libraries of orbiter to the project (Add->existing item)
 
Ok, going though computerx's youtube tutorial and I have a couple questions.

First, When I type in the "#define" lines as described the letters do not turn blue like in the video, is that significant?

Second, After the part about configuring the properties and setting the configuration type, command and working directory, there is no C++ section under "General" and "Debugging" to input the "Additional Include Directories".

What have I done wrong?
 
It should turn blue, maybe you are just editing a text file, instead of .cpp or .h
 
ok, I think I screwed up the "main.cpp" entry and put .ccp instead :embarrassed:

Solved both problems.

---------- Post added at 05:49 PM ---------- Previous post was at 05:25 PM ----------

OK, now I am at the part where I am adding the orbiter.lib and orbitersdk.lib files and when I do that in gives me a message:

Title- Matching Custom Build Rule Not Found

"A custom build rule to build files with extension ".lib" could not be found.
Would you like to define a custom build rule to build files with this extension?

Do I click yes or no?
 
You click no. I think I'll do some more videos like that, covering basic things :D Tis a good thing I have some time now (3 day weekend). If anyone wants to request something specific, go for it :D.
 
You click no. I think I'll do some more videos like that, covering basic things :D Tis a good thing I have some time now (3 day weekend). If anyone wants to request something specific, go for it :D.

Ah ty,
Ya know, that would be extremely useful. The video you created is a great start for me and others. It is really scary to begin this. I feel like a moron sometimes trying to bumble along and learn, pestering you all with my simple questions. But if there is anyone who can show us the way it is you Mohd.

So to specifically request. I would like to request a step-by-step tutorial on how to create a spacecraft, animations and UMMU integration. THats not to much to ask is it? :P

I know this, I promise to repay the lessons by helping others once I have learned. :thumbup:
 
video tutorial

Hi there,

this video helped me a lot. Only 5 days ago i have watched your video carefully and now i am changing the shuttlepb code just to understand how it works. Now i have a nice capsule with changed main, hover and thruster axes, docking ports a.s.o. Currently i want to change some aerodynamic parameters.

Any ongoing tutorial from you is appreciated, for example a spaceship with simple animations and some jettison stuff in the future.
Suggestions: Some of us are no native english speakers.
Thanks a lot for your help.

jtiberius
 
I have now compiled my first .dll using the ShuttlePB and Dansteph's UMMU SDK. Using what I have learned I should now be able to create at least a simple UMMU functional base. So, will re-release Overton Island with a functional UMMU building and will include this with my upcomming Armstrong Lunar Base.

I have done many animations with SC3 so I think I will compare the .ini files sections on animations with the .dll animation call outs and see what I can gleen. :hotcool:

---------- Post added at 11:25 AM ---------- Previous post was at 11:03 AM ----------

Question:

What is the function of the .h (header) files?
 
Back
Top