Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: Trivial question? References: <9ae6e06c-222e-4911-97e8-af9511b8772a@t38g2000prg.googlegroups.com> <8c4f88f0-b444-40ae-b615-77eb4eae2426@x2g2000vbd.googlegroups.com> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: Date: 03 Nov 2011 22:13:31 GMT Lines: 32 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1320358411 tunews.univie.ac.at 60386 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9472 simplicity wrote: > On Nov 3, 2:24 am, Andreas Leitgeb > wrote: >> markspace <-@> wrote: >> > On 11/2/2011 10:04 PM, simplicity wrote: >> >> So, here is my "trivial question": How can I put this name with "@" to >> >> allow Java to digest it without complaints? >> > To me this is really a question of knowing your compiler, not Java. >> > Java doesn't allow @ signs in identifiers, period.  You'll have to make >> > an identifier that Java can accept.  One without an @ sign.  Hence, >> > you'll need to ask on your compiler help list how to get rid of the @. >> > Some compilers support an option to remove the name mangling (the @), >> > some you have an assembler that you can use to bridge the gap between C >> > output and another language.  It all depends on your long term goals, >> > and what your language is capable of. >> extern "C" { >>     int func(...) { ... } >> } >> might help a lot, too.   (just guessing) > This will work but I hoped there would be a way to do it without > creating an extra layer between Java and the DLL. Seems like I misunderstood your problem. I thought, the DLL was yours, so you'd extern-"C"-wrap the relevant functions within the DLL and then use it trivially from Java. If it's not your own DLL, then I understand, that my solution doesn't satisfy you. :-/ Either xFunction does have its own code between the DLL and Java, or (if it is pure java itself) you could examine how it does the magic.