Skip to content

Commit d79d261

Browse files
committed
Fix a bogus MSVC linker error.
MSVC cannot handle `extern` declarations inside a member function, when that member function is itself inside a namespace: it "forgets" the namespace part when generating the symbol, which leads in this case to an "unresolved symbol" error at link time. Reduced example: https://godbolt.org/z/YSQ--9
1 parent d9a7685 commit d79d261

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

hyper.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4218,6 +4218,9 @@ void virtualRebaseSimple(heptagon*& base, transmatrix& at);
42184218

42194219
extern bool game_active, playerfound;
42204220

4221+
extern bool twopoint_do_flips;
4222+
extern int twopoint_sphere_flips;
4223+
42214224
string bygen(reaction_t h);
42224225

42234226
#if CAP_URL

polygons.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,6 @@ void dqi_poly::draw() {
867867
if(sphere && pmodel == mdTwoPoint && !in_twopoint) {
868868
#define MAX_PHASE 4
869869
vector<glvertex> phases[MAX_PHASE];
870-
extern int twopoint_sphere_flips;
871-
extern bool twopoint_do_flips;
872870
int pha;
873871
if(twopoint_do_flips) {
874872
for(int i=0; i<cnt; i++) {

0 commit comments

Comments
 (0)