LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded
User Name
Password
Linux - Embedded This forum is for the discussion of Linux and embedded devices.

Notices

Reply
 
LinkBack Search this Thread
Old 11-21-2009, 01:53 PM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 459

Rep: Reputation: 31
Cannot find std headers on a windows build


Hi all,
I made a cross compiler build to be used from windows (long story)
It appears to work, if I do something simple eg
int x=10,y=11,z;


z=x+y;

it works.

However if I call a C lib header it reports the header missing for example
#include <stdlib.h>

it can't fin stdlib.h ?

So I've tried adding the path to the the windows enviroment paths. This doesn't help. I tried adding the paths to my makefile and/or full path to the include, this works however reports lots of missing includes from the stdlib file? (Headers from top of stdlib.h stuff)

Can anyone advise? Do I need a windows build of gcc installed? Or am I missing something obvious?

Thanks
 
Old 11-21-2009, 03:03 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,858
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

If you happened to be running Linux, and you happened to be using a standard gcc compiler, then you *should* be able to find "stdlib.h" in "/usr/include".

But you haven't given enough information in your post that we know WHAT the heck you're doing. We don't know what OS you're running (Windows? Linux? Something else entirely?). We don't know what compiler you're using (VC++? DJGCC? Something else entirely?) We don't know what your environment is, or how you might have altered/customized that environment for your specific toolchain.

The best I can suggest is:

1. Do a "find / -name stdlb.h -print" (or whatever the equivalent might be for your particular OS).

2. Add "-Ixyz" to your compiler line, for whatever directory "xyz" your stdlib.h actually lives in.

3. If you *don't* have "stdlib.h", comment it out from the source file that's using it ... and see if anything fails to compile (e.g. what function/structure definitions does your application need from "stdlib.h" in the first place?) Then find the corresponding header that your particular C compiler defines them in.

Good luck .. PSM
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get and install build-essentials and kernel-headers using wget? zoanie Linux - Embedded 4 11-17-2009 03:41 PM
Where can I Find 2.6.27-desktop-0.rc5.2.1mnb build and headers? iro_number1 Mandriva 5 09-23-2008 07:38 PM
GCC in chroot failing to build, unable to find headers falt004 Linux From Scratch 4 08-03-2007 10:00 AM
Am I missing some stuff in /build/ ? Kernel Headers?!?!? yttrium88 Linux - Newbie 1 10-28-2006 08:40 PM
GCC 4.0.2 Chroot Build Unable to Find Headers Kenji Miyamoto Linux From Scratch 5 06-29-2006 03:34 AM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration