VB8
VB8

Reputation: 38

undefined reference error in VScode Version 1.69.1

Below is simple program where i have configured VSCode on Azure VM with all applicable extensions to run c program

Function reference at top for compiler

But when i try to compile i am getting below error Undefined reference error

Installed Extensions

Any hints or missing extensions will assist... if i define func() at top prior main() it works but would be interested to know how do i make it work the way i am trying too ..any hints will be appreciated..

Upvotes: 0

Views: 194

Answers (1)

Jeffrey Ram
Jeffrey Ram

Reputation: 1168

Place your entire void meow(void) function definition:

void meow(void) { 
    printf("meow\n"); 
}

outside of the main() function definition brackets { } like so:

int main(void) {
    ...
    ...
}

void meow(void) { 
    printf("meow\n"); 
}

Upvotes: 1

Related Questions