LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-14-2009, 03:34 AM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
warning: ISO C does not permit named variadic macros


Hi all,
after a great deal of trouble I managed to get directFB to cross compile for a ARM. However when I try to use it in my code all the libs seems OK (eg if I use the -ldirectfb etc) in my makefile they link, however when I include the directfb.h in my headers I get a large number of errors
most are
warning: ISO C does not permit named variadic macros

eg
/root/DirectFBArm/staging/usr/include/directfb/direct/messages.h:96:17: warning: ISO C does not permit named variadic macros

and a large number of
/root/DirectFBArm/staging/usr/include/directfb/direct/clock.h:34: error: ISO C++ does not support 'long long'

I compiled both libs and my example with the same compiler ARM 4.3 version.
Can anyone advise what to do? Is there a switch I can add to my makefile?
Thanks

PS I've tried -std=c99 which does appear to fix the long long but not the variadic

Last edited by knobby67; 12-14-2009 at 03:40 AM.
 
Old 12-14-2009, 11:30 AM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by knobby67 View Post
Hi all,
after a great deal of trouble I managed to get directFB to cross compile for a ARM. However when I try to use it in my code all the libs seems OK (eg if I use the -ldirectfb etc) in my makefile they link, however when I include the directfb.h in my headers I get a large number of errors
most are
warning: ISO C does not permit named variadic macros

eg
/root/DirectFBArm/staging/usr/include/directfb/direct/messages.h:96:17: warning: ISO C does not permit named variadic macros

and a large number of
/root/DirectFBArm/staging/usr/include/directfb/direct/clock.h:34: error: ISO C++ does not support 'long long'

I compiled both libs and my example with the same compiler ARM 4.3 version.
Can anyone advise what to do? Is there a switch I can add to my makefile?
Thanks

PS I've tried -std=c99 which does appear to fix the long long but not the variadic
this could be a compiler bug;

http://crustytoothpaste.ath.cx/~bmc/...ariadic-macros
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455356
 
Old 12-14-2009, 11:38 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Using an "arm-gcc-4.3" :

If the code you compile is from before 2008,
it may need a fix for gcc-4.3 .
Or use "arm-gcc-4.1" or --gcc-3.x ,
depending on the code age.

.....
You might want to read the gcc porting guide
to gcc 4.3
http://gcc.gnu.org/gcc-4.3/porting_to.html

and to gcc 4.4
http://gcc.gnu.org/gcc-4.4/porting_to.html
.....

Last edited by knudfl; 12-14-2009 at 06:32 PM.
 
Old 12-16-2009, 03:17 AM   #4
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Original Poster
Rep: Reputation: 43
Thanks all, I'll give them a try. I've found that dropping --padantic works, but am not happy doing this
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(bind) named: couldn't open pid file '/var/run/named/named.pid' - any help? samengr Linux - Server 6 04-01-2009 06:22 AM
file /var/lib/named/var/named/reverse/named.zero failed: file not found Toadman Linux - Software 15 03-18-2009 07:01 PM
chown -R named:named /var/named crash the system? joangopan Fedora 2 09-09-2007 02:46 AM
Question regarding variadic functions rajesh_b Programming 7 07-08-2007 09:46 PM
Variadic functions Config Programming 6 03-03-2004 11:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration