Skip to main content
gamedev.net
🔒 Locked

still getting redefinition errors

Started by Jenison Apr 30, 2004 at 9:20 PM 2 replies 300+ views
Original Post
Jenison
Jenison
got #pragma once on my header files using VS.Net I have a global pointer (shut up about globals) and if I include this file twice I get redefs what gives? thougth pragma once took care of this?
SiCrane
SiCrane
Are you getting a compiler or linker error?
Jenison
Jenison
linker
SiCrane
SiCrane
Add extern to the global variable declartions and then in *one* source file repeat the declaration without the extern.

For more details see this article.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.