gcc -I option
Hey,
Its surprising!! I do gcc -c -I/home/vkmgeek sample.c .....It works now if I give soft link of above path instead of actual path....it is not working....why is it so? that is, gcc -c -I/home/vkm/myinclude sample.c .........not working Some GURU ....plz have light on this!!!! |
It works for me using gcc 3.4.4 on FreeBSD 6-STABLE. (I believe the recommended method for compiling the Linux kernel relies on symlinked directories.) Could it be a permissions problem?
|
Taylor_venable is absolutely correct: "-I" should work whether it points to a "real directory" or a symbolic link to a real directory.
Of course, the link could be messed up. Did you try this: Quote:
|
Quote:
I also checked permissions of that link...i., ls -l...it has all permissions -lrwxrwxrwx. But, I have gcc 3.4.3... Could it be a gcc version problem? |
Check the mount path of you filesystem.
I tried to compile some programs on other filesystem and had such problems like you. The link and real directory have to be in one and same filesystem. I check your example, it works on my computer with Gentoo. |
Quote:
|
Quote:
I have 2 partitions, the first one has FAT filesystem, the second has reiserfs. I have source files in partition number 1 and want to compile them. I try compile but nothing then i move the sources in the partition that is mounted as / mountpoint. Aftere that i compile the sources without any problems. This is on Slackware and Gentoo linux.I had this problems any time when i decide to compile some program on diferent partitions. Just try.It depends on mount options. When the filesystem is mounted as "default" you could compile any source. |
Quote:
I wish I could try it myself, but all my local filesystems are ext3. :( |
Quote:
You can't get 2 filesystems on one partition.:p :) Try it. Choose the filesystem that is not mounted as "default". |
Quote:
|
Quote:
After looking at the posts, I rechecked about problem, but its still there.... I m using 2.6 kernel. Though it doesn't matter, for the sake of specifying I m just specifying. Can anyone with correct reason? |
You can't compile most software on a FAT file system, since all the file attributes are not available.
File system and partition should never be considered to be the same thing. You can have a file sydtem that's not a partition and you can have a partition with no file system on it. UMSDOS made it possible to have two file system on the same partition. |
vkmgeek - I thought you were squared away days ago!
And jeez - the amount of nonsense and disinformation in this thread! Sigh... KNOWN FACTS: 1. You're having some kind of compile error. For lack of an exact error message, we can only speculate on what the real error actually is. 2. Yes, in general "-I" works with symbolic links 3. Yes, in general you can compile on a FAT filesystem just as well as any other kind of (read/write) partition (with, of course, certain obvious limitations - including security, file name length, and case sensitivity) 4. No, "hard links" cannot span filesystems (whereas "soft links" most definitely can!) SUGGESTED GAMEPLAN: 1. Cut and paste your exact compile command, along with the exact error message. 2. Give any other (brief!) information you think is relevant. 3. We'll take it from there and help you resolve this little mystery. Sound like a plan? Thanx in advance .. PSM |
Quote:
Quote:
A symlink can, by definition, point ANYWHERE. The target doesn't even have to exist. Quote:
vkmgeek, what exactly are you trying to do? The -l option links against the given library, but /home/vkmgeek is presumably your ~ dir, not the name of a library ? I don't understand your command line(s)? What is /home/vkm/myinclude ? |
Quote:
ioerror - :rolleyes: I have used -I option and not -l option. Former one is used to give a dir only. And there, my all header files are staying... |
All times are GMT -5. The time now is 09:03 AM. |