Handmade Hero » Forums » Code » internal before functions, build errors
MandleBro
Jack Mott
98 posts
1 project

Web Developer by day, game hobbyist by night. Fond of C and F#

#10327 internal before functions, build errors
10 months, 2 weeks ago

I'm on day 11, as we just start adding handmade.h and handmade.cpp

Casey declares his function like so:

1
2
internal void
RenderWeirdGradient(game_offscreen_buffer *Buffer,int XOffset,int YOffset){


I get the errors:
"This declaration has no storage class or type specifier"
and
"expected a ';'"

if I remove the word 'internal' everything builds and runs fine. Any insight into what is going on here?
proceduraldev
1 posts
#10328 internal before functions, build errors
10 months, 2 weeks ago

Have you defined 'internal' somewhere?
Like this:
1
#define internal static
MandleBro
Jack Mott
98 posts
1 project

Web Developer by day, game hobbyist by night. Fond of C and F#

#10329 internal before functions, build errors
10 months, 2 weeks ago

*facepalm*

Yes, but after I was including handmade.cpp

Fixed!

thank you.