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 04-22-2015, 02:02 AM   #16
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Original Poster
Rep: Reputation: 43

Hi just to say I'm using a gcc cross for coldfire, memset isn't avalible and {0} just sets element 1 to 0 andthe rest to random
 
Old 04-22-2015, 03:56 AM   #17
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Which gcc version? Try with 'gcc -std=c99'.
 
Old 04-22-2015, 06:30 AM   #18
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Or check the man page for your gcc and see what options it does have. I believe the standard statement is actually:
Code:
-std=gnu99

Last edited by rtmistler; 04-22-2015 at 06:32 AM.
 
Old 04-22-2015, 04:07 PM   #19
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
Quote:
Originally Posted by knobby67 View Post
Hi just to say I'm using a gcc cross for coldfire, memset isn't avalible and {0} just sets element 1 to 0 andthe rest to random
Stipulate -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to use the array initializers. Memset is part of the standard library and should be declared in string.h.
 
Old 04-23-2015, 02:20 AM   #20
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Original Poster
Rep: Reputation: 43
Hi
Just to say this is an old gcc build provided by the hardware vendor.
It's an old cut down gcc cross for coldfire. It has no c libraries ( headers )It would be a joy to use things look like stdlib.h
I'm forced to use this because of compatabillity with vendor board libraries.
Putting a switch in make to tell it what version of c to use is well...
I'm sure if you've had experience of working on old embedded hardware you'll know what I mean. Think assembler with C syntax, well almost
 
Old 04-23-2015, 07:33 AM   #21
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by knobby67 View Post
Hi
Just to say this is an old gcc build provided by the hardware vendor.
It's an old cut down gcc cross for coldfire. It has no c libraries ( headers )It would be a joy to use things look like stdlib.h
I'm forced to use this because of compatabillity with vendor board libraries.
Putting a switch in make to tell it what version of c to use is well...
I'm sure if you've had experience of working on old embedded hardware you'll know what I mean. Think assembler with C syntax, well almost
Given that, I would ABSOLUTELY make NO ASSUMPTIONS about auto-initialization of anything. This is where my old school overprotective coding makes the best sense.
 
  


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
apt-get install snmpd gives error" undefined symbol: boot_DynaLoader" renuaseri Linux - Newbie 9 07-29-2016 12:15 AM
seeking help with Sierra Wireless 250U broadband USB "modem" SaintDanBert Linux - Networking 1 12-04-2011 12:37 PM
plesk + php 4.3.2 upgrade error - "undefined symbol: ap_signal" p_s_shah Linux - Server 0 10-30-2007 12:41 PM
Module Warning : "function" undefined prabhakar_kushwaha Linux - Software 2 03-28-2007 08:27 PM
avgscan "relocation error" "undefined symbol: __dynamic_cast_2" Monster_user Linux - Software 0 02-22-2006 11:57 AM

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

All times are GMT -5. The time now is 06:20 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