Board.KolibriOS.org

Official KolibriOS board
It is currently Sat Apr 20, 2019 5:40 am

All times are UTC+03:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Compilation problems
PostPosted: Mon May 05, 2014 11:27 am 
Offline

Joined: Sun May 12, 2013 7:40 am
Posts: 1
Hello everybody:
I'm training to compile this simple program using menuetlibc:

This's the main.c file:

#include <stdio.h>
int main(void)
{
FILE* a;
a = fopen("mio.txt","w");
fprintf(a,"Hello");
fclose(a);
return 0;
}


And here the Makefile:

OUTFILE = main
OBJS = main.o
include $(MENUETDEV)/makefiles/Makefile_for_program

I have my env OK, I'm using Linux and MENUETDEV is OK.
When I type make, it return some errors:
[MyHome]/menuetlibc/linuxtools/mld main main.o -n -Map main.map
[MyHome]/menuetlibc/lib/libc.a(fprintf.o): In function `fprintf':
fprintf.c:(.text+0x20): undefined reference to `va_start'
fprintf.c:(.text+0x8a): undefined reference to `va_end'
fprintf.c:(.text+0xa8): undefined reference to `__stack_chk_fail'
[MyHome]/menuetlibc/lib/libc.a(doprnt.o): In function `_doprnt':
doprnt.c:(.text+0x13af): undefined reference to `__stack_chk_fail'
[MyHome]/menuetlibc/lib/libc.a(remove.o): In function `remove':
remove.c:(.text+0x9a): undefined reference to `__stack_chk_fail'
make: *** [main] Error 1

Any idea about what is this??


Top
   
 Post subject: Re: Compilation problems
PostPosted: Mon May 05, 2014 1:47 pm 
Offline

Joined: Mon Sep 24, 2007 11:11 am
Posts: 2814
Some problems with varargs. I can't say for sure, but - please - check your preprocessor definitions.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited