Find the answer to your Linux question:
Results 1 to 4 of 4
I'll describe our situation and hopefully someone will be able to explain how this is supposed to work out. We develop a C++ application, but thus far, our build machine ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    3

    Compiling C++ Program with Older Linux Kernel Headers

    I'll describe our situation and hopefully someone will be able to explain how this is supposed to work out. We develop a C++ application, but thus far, our build machine has matched (kernel and platform) the machine on which the application runs (run-time machine). Now, we need to make an independent build environment which compiles and links the application for our run-time machine.

    Here's what we have:
    - Build Machine: Any (recent) Linux Kernel + Some x86 Platform
    - Run-Time Machine: 2.4.30 Linux Kernel + i586 Platform

    What are our options here? Can we use downloaded kernel headers and C headers for the build? Can we still link the application dynamically or does it have to be static? How would this work?

    I've been trying to get this working for a while, but I suppose I'm just confused about how the kernel headers, standard C headers, and application files all work together (during the compile/link on the build machine and during the execution on the run time machine).

    Thanks for your help.
    -- Alexander.

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    try googling "gcc cross compiling"...Hope this helps

    try this link:

    http://64.233.169.104/search?q=cache...lnk&cd=4&gl=ca

  3. #3
    Just Joined!
    Join Date
    Oct 2008
    Posts
    3
    Thanks for the link to the cross-compiling guide. While a full cross-compiler environment will probably be our goal, I was really wondering if it's possible to compile for a different kernel version. If the two computers (build and target) are the same platform, is there a way to just point to a different set of kernel headers? I haven't found the correct way of doing this with gcc/g++ -I parameters...

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    3
    Does anyone have an answer for this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...