From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,73bf5f40f1c03632 X-Google-Attributes: gidfee84,public From: Jason Mancini Subject: Re: dunix/cxx/mknod Date: 1998/08/25 Message-ID: <35E335FE.680EC65B@pa.dec.com>#1/1 X-Deja-AN: 384705795 Content-Transfer-Encoding: 7bit References: <35E2007A.A7767FA1@pa.dec.com> <35E27DA1.A926226E@zko.dec.com> <35E3030E.AD01EF5A@pa.dec.com> <6rvbps$r30$1@infosun2.rus.uni-stuttgart.de> Content-Type: text/plain; charset=us-ascii Organization: Terrific Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Stefan Schwarzer wrote: (snip) > You are hiding the c-library function by your repeated declaration of > mknod before the main. At least you should use an extern "C" {} if you > require such a hack for some reason. The c++ compiler will then not > mangle the types into the function name and give the linker a chance to > find the function name in the c-library... > btw: the c compiler warns because the signature is not ok, > the second argument is mode_t which is a typedef from unsigned int. > > The following works fine for me: > > 23:43 margay_sts:~> cat mknod.cc > #include > int main(){ > mknod("foo", S_IFIFO |0666, 0); > } > 23:43 margay_sts:~> cxx -D_XOPEN_SOURCE_EXTENDED mknod.cc > 23:44 margay_sts:~> a.out > 23:44 margay_sts:~> ls -l foo > prw-r--r-- 1 sts cron 0 Aug 25 23:44 foo| > > -- > Stefan Schwarzer office: +49-(0)711-685-7606 fax: x-3658 > 70569 Stuttgart, Germany http://www.ica1.uni-stuttgart.de/~sts (I could swear that I tried that combo...) Thanks, I got it working in minutes! I see my error now. Thanks again, /Jason