Handmade Hero»Forums»Code
Jack Mott
110 posts
Web Developer by day, game hobbyist by night.
internal before functions, build errors
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?
1 posts
internal before functions, build errors
Have you defined 'internal' somewhere?
Like this:
1
#define internal static
Jack Mott
110 posts
Web Developer by day, game hobbyist by night.
internal before functions, build errors
*facepalm*

Yes, but after I was including handmade.cpp

Fixed!

thank you.