-
Notifications
You must be signed in to change notification settings - Fork 125
[ZH] Fix compilation using MinGW #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
6b5f516
176f1ce
5ec2ac7
43c49b2
d89f254
3c05bd8
1a37f94
3d4c893
32c2234
eaf937e
f5e72d9
862b45d
337a01d
d8fb831
be8d67b
11928ee
95e8064
ed1a5dd
6e6fad4
81f4234
4cb8d7c
1073855
ef1d840
cd6be77
9edf0f4
63ec6dd
aa30755
23a34a9
b117146
feba1d3
c5cc49c
ff2197f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1102,7 +1102,7 @@ extern HWND ApplicationHWnd; | |
| //TODO: Fix editor so it actually draws the wave segment instead of line while editing | ||
| //Could freeze all the water while editing? Or keep setting elapsed time on current segment. | ||
| //Have to make it so seamless merge of segments at final position. | ||
| static void TestWaterUpdate(void) | ||
| void TestWaterUpdate(void) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TestWaterUpdate isn't called in any other translation units, correct fix would be to specify static on its forward declaration rather than remove it here.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, I changed definition to match declaration, but in this case declaration could have been static. I can fix that. |
||
| { | ||
| static Int doInit=1; | ||
| static WaterTracksObj *track=NULL,*track2=NULL; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am surprised that this is a problem. What is the error? static function in cpp should be legal, no?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem here (and in other cases) was not function being static. But rather function being declared non-static and then defined (or re-declared) as static. In this particular case, problem was inconsistency with friend declarations in PartitionManager.h, if I remember correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiler error:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to make a static friend here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making static fried results in error: