Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jul 1999 11:43:23 -0500 (EST)
From:      Alfred Perlstein <bright@rush.net>
To:        Zhibing Wang <wang_zb@yahoo.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: how to compile c program for linux on freebsd
Message-ID:  <Pine.BSF.3.96.990703113906.14320w-100000@cygnus.rush.net>
In-Reply-To: <19990703162927.27710.rocketmail@web130.yahoomail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 3 Jul 1999, Zhibing Wang wrote:

> hi there:
>     I am trying to compile a c program on freebsd 3.2.
> the program was writen for linux originally. it calls
> many header files in /usr/include/linux and some other
> directories, which can not be found in freebsd.
>     what can I do? just copy those directories from
> linux ?
>     really appreciate for any help.

no:

1)  remove all includes that reference linux/*
2)  try to compile the program, see which structures the
    compile fails on because they are not defined,
3)  try to find those in the freebsd headers and include 
    those
4)  repeat steps 2 & 3 until you have found all structures
    needed.
5)  convert still unfound structures to the appropriate 
    freebsd ones.

do not touch anything in /usr/include, you should
only be working on your program.

-Alfred Perlstein - [bright@rush.net|bright@wintelcom.net] 
systems administrator and programmer
    Win Telecom - http://www.wintelcom.net/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990703113906.14320w-100000>