Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9456
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!x2g2000vbd.googlegroups.com!not-for-mail |
|---|---|
| From | simplicity <stella_pigeon@live.ca> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Trivial question? |
| Date | Thu, 3 Nov 2011 10:28:33 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 38 |
| Message-ID | <8c4f88f0-b444-40ae-b615-77eb4eae2426@x2g2000vbd.googlegroups.com> (permalink) |
| References | <9ae6e06c-222e-4911-97e8-af9511b8772a@t38g2000prg.googlegroups.com> <j8taa8$rur$1@dont-email.me> <slrnjb4jts.fvg.avl@gamma.logic.tuwien.ac.at> |
| NNTP-Posting-Host | 72.2.16.10 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | posting.google.com 1320341646 4578 127.0.0.1 (3 Nov 2011 17:34:06 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Thu, 3 Nov 2011 17:34:06 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | x2g2000vbd.googlegroups.com; posting-host=72.2.16.10; posting-account=EgU86goAAAD9zE1SdNwFxseaYYWdTdJP |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-Header-Order | HUALESNKRC |
| X-HTTP-UserAgent | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9456 |
Show key headers only | View raw
On Nov 3, 2:24 am, Andreas Leitgeb <a...@gamma.logic.tuwien.ac.at>
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. I actually found a
package called xFunction that is similar to JNA and actually allows me
to define native modules with "@", something like
xFunction func = new xFunction("my_dll_library", "int _func@0(int)");
and execute it
int rc = ((Integer) func.invoke(1)).intValue();
so, apparently, there is a way. I hoped that there might be something
as simple as the syntax I am not aware of.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Trivial question? simplicity <stella_pigeon@live.ca> - 2011-11-02 22:04 -0700
Re: Trivial question? markspace <-@.> - 2011-11-02 22:54 -0700
Re: Trivial question? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-03 08:24 +0000
Re: Trivial question? simplicity <stella_pigeon@live.ca> - 2011-11-03 10:28 -0700
Re: Trivial question? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-03 22:13 +0000
Re: Trivial question? Roedy Green <see_website@mindprod.com.invalid> - 2011-11-03 08:14 -0700
Re: Trivial question? Roedy Green <see_website@mindprod.com.invalid> - 2011-11-03 08:15 -0700
csiph-web