Sign in to follow this  

namespace mayhem

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

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