Jump to content
  • Advertisement
Juliean

Visual Studio, pls

Recommended Posts

Ok, short but sweet. I was simplifying the code regarding my plugins DLL-entry point export-functions, mainly going from a h/cpp-pair to just a cpp (the header was pretty redudant). Two plugins to test with, one with only one entry-point (game code), the other with two (game code + editor code). The first generates the symbols, the second doesn't even process the Export.cpp-file. What the hell?

Long story short, I went through a lot of nonsensical options, when it turns out that Visual Studio has an "element type" attribute for files. Turns out I deleted Export.cpp, afterwards renamed Export.h to Export.cpp and then this internal flag was still set to "C/C++ header" instead of "C/C++ compiler". Yes, thats how VS determines if it compiles the file and not the ending. And no, that flag doesn't change when you rename the file, even in the IDE. Thanks for wasting an hour of my life, the moral here is - never change your filetypes? Yikes :S

Share this post


Link to post
Share on other sites
Advertisement

Idd. I experienced some similar issues when converting from source to header file and vice versa. Changing between associated extensions such as .h and .hpp is fine.

Changing the file name (and keeping the extension) in the IDE is fine. Changing extensions or moving files is best done outside of the IDE and remove + re-add the files afterwards. Alternatively, you can modify the .xml kind of configuration files of your projects which is much safer, but unfortunately cumbersome for large code bases.

Edited by matt77hias

Share this post


Link to post
Share on other sites

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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!