[C++] Making libraries using Devc++?

Samael88

Evil always finds a way
Reaction score
181
Hello.
I was thinking that my code gets a little unorganized after about two hours of writing and thought that it might be a good thing to organize it a little.
I checked in some of my game folders and saw that they made use of libraries for this, often dll files.
How do I make libraries using devc++?
How to use them?
Is it the standard .h files or can I make other types?

I am also wondering if there is a way to do some kind of MPQ files or something like that. I know that blizzard uses MPQ files to store images and models. I don't know if they have copiright on MPQ's or something, but is there a way to make files like that aswell?
This question is optional, and it does not need any in deep discution, a pointer to the right direction or a tutorial would suffice as an answer about the MPQ.
 
No answer:eek:
That's a first one.
Then I will bump this up one time, just for fun.
Perhaps I was to unclear in my question:)
I am wondering:
How to make libraries with devc++?
Both .h files and .dll would be great:)
Or something else that works:)
 
my code gets a little unorganized after about two hours of writing
A complete mess after only two hours? Impressive. :rolleyes:

I checked in some of my game folders and saw that they made use of libraries for this, often dll files.
The primary goal of shared libraries is ... to share code ... among multiple projects. So, in how many applications are you going to use the stuff you intend putting into these libraries? Just one?

Why don't you simply create multiple source and header files inside your project?
 
A complete mess after only two hours? Impressive. :rolleyes:

What can I say, I'm a complicated fellow:p Two hours make a lot of rows and a lot of headakes:(

Why don't you simply create multiple source and header files inside your project?
Is that possible:eek:
How do I do that then? And make them cooperate I mean?
Source files are the .cpp ones, right?
And header is the .h?
how do I make those? The .h I mean?
 
How do I do that then? And make them cooperate I mean?
Source files are the .cpp ones, right?
And header is the .h?
how do I make those? The .h I mean?

.h files that you can make are just normal code, like normal .cpp ones
for example you write some functions in a file called myfunctions.h,
then you can include it in your main file with
#include "myfunctions.h"

(note that youll have to use #include "myfunctions.h" not #include <myfunctions.h>)
 
.h files that you can make are just normal code, like normal .cpp ones
for example you write some functions in a file called myfunctions.h,
then you can include it in your main file with
#include "myfunctions.h"

(note that youll have to use #include "myfunctions.h" not #include <myfunctions.h>)

Is that all it takes?
No other things added to it?
Beacuse in the other .h files there are stuff like, #define myheaderfile
or something like that:confused:
What is that for?
 
yes thats all it takes :)

the for #define and its friends you should check this out

and usually headers have this in them:
Code:
#ifndef MYHEADER_H
#define MYHEADER_H
//functions and classes go here
#endif
that is to prevent the header from being included twice
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top