Sign in to follow this  

including multiple .cpp files into a project.

This topic is 4692 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 have several .h and .cpp files that I use to do different things such initialzing DX9 and rendering, etc. I was wondering how I would actually insert the .cpp files into the project because as it stands, I get a lot of linker errors

Share this post


Link to post
Share on other sites
Quote:
Original post by CreepingDeath666
Ok that didn't work. and no, I will not apologize because you didn't help me at all and you rated me down for nothing


i did not rate you down
if it is posible can a mod prove that i didnt?

and please post the code in init.cpp

Share this post


Link to post
Share on other sites
ok. I created all of my .cpp files within my project so they were already added. I just couldn't figure out the linker errors so I just deleted all of the .h and .cpp files and put every function into init.cpp directly. It may be ugly but it compiles and runs now.

Share this post


Link to post
Share on other sites
Quote:
Original post by Madster
you can check who you've rated in the GD.net control panel (under members, above) and also you can see who has rated you and how
You can only see who rated you positively(for obvious reasons)

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Quote:
Original post by Madster
you can check who you've rated in the GD.net control panel (under members, above) and also you can see who has rated you and how
You can only see who rated you positively(for obvious reasons)
Actually, mods and non-"core" staff can't see how anyone rated them. For obvious reasons.

Betcha didn't know that. [smile]

Share this post


Link to post
Share on other sites
You're going about this wrong OP. Cpp files aren't included, they're linked. Create a header file that declares ALL of the variables, functions, and classes used in the .cpp file and include THAT. Then link the cpp files by adding them to the argument list of the command line compiler, or adding them to the project in your IDE. It took alot of linker errors for me to learn this :)

PS: I'm not really sure what you're asking, I hope I didn't insult you with knowledge you already knew.

Share this post


Link to post
Share on other sites

This topic is 4692 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this