Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6841611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:59:18+00:00 2026-05-26T23:59:18+00:00

I have a mysterious problem! In the main.c I have the following: #include jogo.h

  • 0

I have a mysterious problem!
In the main.c I have the following:

#include "jogo.h"
int main(){
    int i;
    sef_startup();
    vg_init(0x105);
    batalha_naval();
    sleep(5);
    vg_exit();
    return 0;
}

In the jogo.h I have:

#ifndef __JOGO_H
#define __JOGO_H
void batalha_naval(void);
#endif

And in the main.c I have:

#include "core.h"
void batalha_naval(void) {
    vg_draw_line(0, 0, 1023, 0, 12);
}

But when doing a make the compiler gives a undefined _batalha_naval(); in the main.c. If I define the function in the jogo.h an error doesn’t appear, but if I do like this the error appears.

I am using CC compiler.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:59:19+00:00Added an answer on May 26, 2026 at 11:59 pm
    1. Your jogo.h appears correct.
      You need it if you wish to use function “batalha_naval()” in multiple compilation units.

    2. You should ‘#include “jogo.h”‘ in main.c, and in jogo.c.

    3. You must include both main and jogo in your link command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem that appears and disappears for mysterious reasons. A while back
I have faced a mysterious problem while using the COMPUTE function in AS/400. The
A very mysterious problem coming up :P I have a server configured with a
I have a mysterious problem. I have a php language array like this: $lang['tip1054']
Introduction I have a problem that I'm finding very mysterious. I've searched on Google
I have a simple, mysterious problem with a label and using ajax to show
I have a mysterious JS Problem: I activate different jQuery-Plugins with one function. It's
I have the following problem: I have this multi-level array (nested array) which contains
I'm facing something mysterious. I have a boolean property on an NSManagedObject subclass ReinspectionTask.
Today I found a very mysterious bug in the code. I have used the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.