Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Namespaces and static libraries...

This topic is 5408 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 am trying to create a static library file (.lib) to store some data structures. I want to use nested namespaces, this is hwat i have Structure.h namespace Outer { namespace Inner { ... } } Structure.cpp namespace Outer { namespace Inner { ... } } this will compile and build my .lib file. Now when I copy the .h and .lib file to my other project, I link the .lib file and #include the .h file...i get the following errors : error C2061: syntax error : identifier ''Outer'' error C2059: syntax error : '';'' error C2449: found ''{'' at file scope (missing function header?) error C2059: syntax error : ''}'' Any ideas what the problem is? Thanks.

Share this post

Link to post
Share on other sites
The error occurs within the header file I include...

This is how I have it :

myLib.h myLib.cpp -> myLib.lib

Now when I include myLib.h and link myLib.lib I get the errors.

The line it stops on is the line

''namespace Outer''

In the header file I included (myLib.h)

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!