Re: undefined reference to when using gcj



On 31 Dez., 02:55, Syren Baran <sy...@xxxxxx> wrote:
vlenin66 schrieb:> Hi,

However, when I try to compile it using gcj, I get this:
~/NetBeansProjects/JavaApplication2/src$ gcj --main=Main
javaapplication2/Main.java -o Main
/tmp/ccqiWhM6.o: In function `main':
cc2ARovz.i:(.text+0x1d): undefined reference to `Main::class$$'
collect2: ld returned 1 exit status

How about "gcj --main=javaapplication2.Main javaapplication2/Main.java
-o Main"?
You need to fully specify the class, including package.

Thanks, That works! Perfect solution.
.



Relevant Pages

  • aio errors
    ... undefined reference to `aio_error64' ... collect2: ld returned 1 exit status ... What package I must installed. ...
    (Ubuntu)
  • Re: aio errors
    ... undefined reference to `aio_error64' ... collect2: ld returned 1 exit status ... What package I must installed. ...
    (Ubuntu)
  • Re: aio errors
    ... undefined reference to `aio_error64' ... collect2: ld returned 1 exit status ... What package I must installed. ...
    (Ubuntu)
  • Problem with qt3-3.2.1-35 After KDE-3.1.4 Upgrades
    ... collect2: ld returned 1 exit status ... I have compiled and installed kadu-0.3.4 package when my SuSE-8.1 Pro still ... the same kadu-0.3.4 package failed to compile with the error ...
    (alt.os.linux.suse)
  • RE: Package bundling guidance
    ... exit with a successfull exit code so you can go on... ... In your package "My Package" say you have 3 programs listed. ... check "Run another program First" ... Install the new version ...
    (microsoft.public.sms.swdist)