From owner-freebsd-emulation Thu Apr 13 9:35:27 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from atlrel1.hp.com (atlrel1.hp.com [156.153.255.210]) by hub.freebsd.org (Postfix) with ESMTP id B690337B8A7; Thu, 13 Apr 2000 09:35:21 -0700 (PDT) (envelope-from marcel@cup.hp.com) Received: from adlmail.cup.hp.com (adlmail.cup.hp.com [15.0.100.30]) by atlrel1.hp.com (Postfix) with ESMTP id 23BF6E5D5; Thu, 13 Apr 2000 12:35:18 -0400 (EDT) Received: from cup.hp.com (gauss.cup.hp.com [15.28.97.152]) by adlmail.cup.hp.com with ESMTP (8.8.6 (PHNE_17135)/8.7.3 TIS 5.0.1) id JAA05631; Thu, 13 Apr 2000 09:35:16 -0700 (PDT) Message-ID: <38F5F745.AA0BE917@cup.hp.com> Date: Thu, 13 Apr 2000 09:35:17 -0700 From: Marcel Moolenaar Organization: Hewlett-Packard X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: John Daniels Cc: freebsd-emulation@FreeBSD.ORG, freebsd-ports@FreeBSD.ORG Subject: Re: linux application References: <20000413054014.2411.qmail@hotmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org John Daniels wrote: > This is supposed to run under Linux, so I believe that the libraries were > probably compiled under Linux, and are expecting to be called from programs > running under Linux. > > Will all of this run without modification due to FreeBSD's Linux > compatibility? Are there compiler options that I have to use to make this > work? (Obviously, I never done anything like this before) You can't use FreeBSD's compiler for this. You must use a Linux compiler (you need to make Linux binaries). > I have looked at Makefiles for Linux ports and they specify linux libraries > and the Linux-base package as necessary. Don't these specifications get > passed through to the compiler? Forget the ports collection. After you've setup /compat/linux (install linux_base and linux_devtools) you will only be using Linux binaries to do the compilation. You should be able to do it just as if you were on a Linux machine yourself. > Basically, what do I have to do to create/compile/run programs that use > libraries developed on Linux. 1. Use a linux shell (ie run /compat/linux/bin/sh) 2. Create a C/C++ source file 3. Optionally create a makefile 4. Build/compile the source file 5. Run the freshly compiled binary Ad 4: Compiling a Linux binary is as simple as typing "gcc -o foo foo.c", but only when done from within a Linux shell (see 1) Your manual should describe any options/parameters/libraries you need to add to use the API. HTH, -- Marcel Moolenaar mail: marcel@cup.hp.com / marcel@FreeBSD.org tel: (408) 447-4222 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message