0

I have some problems with GCC. I want a portable version of GCC because the PC I use for programming cannot be connected to Internet due to some driver issues. So, I read an article on how to compile gcc from source to make it a portable version and followed it. But when I copied the directory where I built GCC to my PC and tried to compile a simple C program, it gives an error saying "stdio.h no such file or directory" so definitely my portable GCC is not working properly. I used the arguments like --disable-shared, --enable-static etc... as given in the article but still I know that the compiled version is not portable. Can someone please tell me how to compile a portable version of GCC which I can then copy to my PC?

Note: The PC on which I need GCC is running Fedora 23. It doesn't have any C compiler pre-installed and due to same reasons, I am not able to compile driver for my wifi adapter. So, please suggest a method which doesn't require my main PC to be connected to Internet.

  • I'm not sure what a "portable" version of GCC is. Can you elaborate? "I want a portable version of GCC because the PC I use for programming cannot be connected to Internet due to some driver issues." Why does GCC require the net? – Faheem Mitha Apr 9 '16 at 18:32
  • I need a version which I can copy to other systems. That is, I want to compile it on one PC and then use those compiled version on another PC – user165059 Apr 9 '16 at 18:33
  • Oh. That sounds like a somewhat demanding requirement. Presumably you want the compiled executables to run on whatever your target machines are. Suggestion: fix your driver issues and get on the net. Have you already posted about those driver issues? If not, you could post a question here. – Faheem Mitha Apr 9 '16 at 18:35
  • Can't you build the driver module on some other system running Fedora 23 on which you can install GCC properly? – Stephen Kitt Apr 9 '16 at 18:37
  • Unfortunately no :( The other pc I use has Linux Mint 17.3. This is the link to article I read: m.wikihow.com/… – user165059 Apr 9 '16 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy