Jump to content
  • Advertisement
Sign in to follow this  
JoeShady

Visual Studio 2003 - Compiling XBOX Source Code "LinksBoks" - (RESOLVED)

This topic is 2496 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I really hope someone here can help me, I'm about to give up before I even start!! OK, this is the thing... I compiled some source code I got off the internet, it created a .lib file as well as a directory called "OUT" next to it filled with .obj files. OK so far so good, I know the answer is going to be extremely simple but for the life of me I cant figure it out! How the heck do I link all those .obj files together in visual studio 2003 or in the command prompt for visual studio in order to "Compile" them together into a single file??? Any help will be greatly appreciated!! Glad to be part of the community. smile.png

Share this post


Link to post
Share on other sites
Advertisement
I don't think I understand your problem completely, but here is some basic stuff:
.obj files are the result of compiling c++ files (in your case). Each obj file corresponds to a .cpp file. On the other side, .lib files, if your project is a static library, are all the .obj files packed together in a library. If you are making a .dll instead, you can still use .lib files to use those .dll further on in another projects. So if you are building a static library (if that is your goal) then you already linked the .obj files in your .lib file I guess.

Share this post


Link to post
Share on other sites
Assuming you have built a static library (not a dll), the lib file (The lib file is basically just an archive containing the obj files) along with any header files is the complete library.

You should be able to link this library to your own projects.

How to do this is a question on its own and probably differ between different versions of Visual Studio (VS2003 is getting pretty old btw)

Share this post


Link to post
Share on other sites
This might be a little off topic but why use VS2003? When you can get VS2010 express for free? I would upgrade and yes they can differ between the version. I actually wrote a post somewhere that shows you how to do it is 2010 the permanent way not the project to project way.

Share this post


Link to post
Share on other sites
Wow! So much attention in less then 24 hours! biggrin.png This place is a god sent! haha, ok, Im gonna try to be more specific on whats going on and show pics as well. brb, might take a second or two. ;)

OK: This pic is the source code I'm working with, it's called "LinksBoks", it's a web browser for the xbox gaming console:

2ijk7z6.jpg

After loading linksboks.sh and building the solution, I get this, this here is the contents of the release folder:
16hw4qw.jpg

And this, is the contents of the "OUT" folder:
zwff38.jpg

Ok, this is what I try to do once I get to this step. From what I understand, in order for me to get the .XBE file which is the executable for the xbox console, I have to LINK those files together... and THAT'S where I am stuck at... sad.png

bg8h3b.jpg

From what I understand, I have to go to the properties of the file itself, select "LINKER" and then go to "additional dependencies" and then... that's where I get fuzzy on whats next?? At first I couldn't find the LINKER option, and I was told that was because I was looking for it under the "solution level" and that I had to go to the "project level" in order to see it. well... I have no IDEA how to get to the project level lol. The ONLY way I have seen the LINKER option so far is to start a new project and then add it to the solution. Because only after I do that, can I actually see a linker option in "THAT NEW" project I created. If I don't do that, all I see is an option called "LIBRARIAN"

If I just go to the properties section of LinksBoks, after I load the solution file, I get the following:

35n818k.jpg

No linker function. sad.png SO then, what I do I decide to create a new project and add it to the solution! Like this:

14cg1t1.jpg

Once I select the "TEST" one, that's the only time I have seen the linker option:

23i8n6f.jpg

But I'm completely lost as to what I need to do next in order to output the .XBE file I need. sad.png

And to answer the question as to why I'm I using VS.NET 2003, it's because that's the only version that will compile source code for the xbox gaming console.

Share this post


Link to post
Share on other sites
Linker -> Input is the same page as the one in Librarian.


Ok but, see that's where I'm stuck, :P explain it to me like I'm 5 years old haha, can you please give me a step by step on that? I would greatly appreciate it man, and thanks!!

In other words a step by step as to where do I put what and when do I press what and so forth to get these OBJ files to LINK together.

Oh and also, no its not, the linker does not show up with librarian, its not there they told me it was because I was looking for it under the solution level, so no its not but, the ONLY time I see it its when I create a NEW project... that's were I'm all confused at... :(

Share this post


Link to post
Share on other sites
Ok, I'll try to explain a bit. So in your LinksBoks project, you have a bunch of .cpp files, which are c++ source code. All these are gathered under the project LinksBoks. When you compile a project, it means the compiler will transform your c++ source code into binary (machine) code that can be executed by computer.

When you do this, the first step is to compile each file. Upon compilation, the binary output (what the c++ source code was converted into) is stored in an .obj file. Each file has its corresponding .obj file, which in your case are stored in Release\OUT folder.

After that, the files are linked together by the linker into a final file, which can have various extensions, depending on the target chosen by the developer. They can be .exe (executable file), .lib (static library file) or .dll (dynamically linked library file). In your case, it is a .lib file. After you get your .lib file, you can ignore the .obj files all together, or delete them if you so wish. They are kept there only for the compiler convenience, so it doesn't have to generate them again if nothing has changed in their corresponding files. So forget about those, all you need is that one, the .lib file.

By you having that file it means that if you include that in another project (an .exe, or .xbe in your case), you can access it's functions (in this case browser functionality). So I see that you already created your project called TEST. In order to use your LinksBoks.lib file in TEST project, you must do the following steps:

1. In Linker->General->Additional Library Directories you have the add the path to the folder where LinksBoks.lib file resides (in your case C:\documents and settings\Administrator\Desktop\lib\Release).

2. Go to Linker->Input and in additional dependencies type LinksBoks.lib.

Then if you want to use its functionality, you must include its header file in your TEST project source code and use it from there. If you do that, you will notice it won't link correctly only after you have done my two steps above.

Hope it helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!