Jump to content
  • Advertisement
Sign in to follow this  
supagu

namespace mayhem

This topic is 4441 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

right in my engine i have a class call Mesh, and im making a plugin for 3d max, which also has a class called Mesh, now i dont want to namespace up my code, so what i did was modified the 3d max header files to namespace up thier max class. Problem is, with this is doesnt seem to want to link when i go to use any methods from the 3d max mesh class :| saying the functions are unresolved. does any one know a work around for such a problem?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by supagu
right in my engine i have a class call Mesh, and im making a plugin for 3d max, which also has a class called Mesh, now i dont want to namespace up my code, so what i did was modified the 3d max header files to namespace up thier max class. Problem is, with this is doesnt seem to want to link when i go to use any methods from the 3d max mesh class :| saying the functions are unresolved.

does any one know a work around for such a problem?


Well... if you're into changing other people's code...

...why not put a "using" directive in their source files, too?

"using 3dmax"... or whatever you called it...

Surely within 3DMax they reference "Mesh" by the name "Mesh" and not "yournamespacename::Mesh"


Chad

Share this post


Link to post
Share on other sites
i only have access to thier headers. i've changed all thier code from Mesh to Max::Mesh

i've wrapped thier mesh in the Max namespace, but this screws up the linker as it seems the namespace is used during linking so linker thinks its just Mesh, but i've hcnaged it to Max::Mesh

Share this post


Link to post
Share on other sites
Quote:
Original post by supagu
i only have access to thier headers. i've changed all thier code from Mesh to Max::Mesh

i've wrapped thier mesh in the Max namespace, but this screws up the linker as it seems the namespace is used during linking so linker thinks its just Mesh, but i've hcnaged it to Max::Mesh


Wrap your Mesh in the supagu (or whatever) namespace and access theirs as ::Mesh.

Share this post


Link to post
Share on other sites
To put the 3DSMax Mesh class in a namespace, you'd have to put both the header and the source in that namespace. You don't have access to the source, so you can't do it.

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.

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!