Menu

Unsatisfied Link Error

Help
2004-04-15
2004-07-04
  • John L. Clark

    John L. Clark - 2004-04-15

    libswt-gtk2 successfully compiles for me.  In accordance with the installation instructions, I installed libswt-gtk2-support and ran `ldconfig` before trying to install libswt-gtk2.  However, when I try to run the test program (`./Hello`), it throws an exception:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: swt-pi-gtk-2135: file not found
       at java.lang.Runtime._load(java.lang.String, boolean) (/usr/lib/libgcj.so.4.0.0)
    [... remaining traceback snipped ...]

    I thought I read something about an eclipse library being required, although there's nothing about it mentioned in the installation instructions.  What else do I need, here?

    Thanks,

        John L. Clark

     
    • McKenzie Keith

      McKenzie Keith - 2004-04-15

      John,

      Thanks for giving libswt a try.

      You shouldn't need any eclipse libraries. Or rather, the only eclipse libraries you need are bundled into the libswt-gtk2-support package, and they should get built and installed when you build and install that package.

      You are right in your apparent suspicion that "swt-pi-gtk-2135" is one of the libraries that ships with eclipse (or at least with the SWT). It should have been found at runtime. In fact, you shouldn't be able to build unless it is found, so I'm not sure what is going on.

      Still, based on the error message you are seeing, it sounds as though, for whatever reason, the java runtime can't find "libswt-pi-gtk-2135.so".

      Where did that library end up when you installed it? Or did it somehow not get installed properly?

      I'll take another look at this when I get home tonight, and if I think of anything else, I'll post again.

      Thanks again.

      --McKenzie Keith

       
    • McKenzie Keith

      McKenzie Keith - 2004-04-16

      OK, I just deleted my libswt installation, downloaded the files from sourceforge, and re-built and re-installed it.

      The steps are as follows:

      build and install the support library:
      libswt-gtk2-support-2.1.1-2.tar.gz

      Then, build AND INSTALL libswt itself:
      libswt-gtk2-2.1.1-2.tar.gz

      Only after you have installed libswt you should be able to run the ./Hello program in the libswt directory.

      I hope this works for you. If not, you could try re-compiling Hello manually. I think it is something like:

      gcj  -o Hello --main=Hello -lswt-gtk2 Hello.o

      Let me know if this helps.

      --McKenzie

       
    • John L. Clark

      John L. Clark - 2004-04-20

      I think I looked for the first link labelled "libswt-gtk2-support" on the SourceForge files section.  In doing so I managed to download and install "libswt-gtk2-support-0.2" as opposed to the most recent version.  The naming there is somewhat confusing - thanks for taking the time to be a bit more explicit for me.  However, now I'm running into compilation errors:

      In file included from swt.c:21:
      structs.h:65: error: parse error before '*' token
      structs.h:65: error: parse error before "GtkCombo"
      structs.h:65: warning: data definition has no type or storage class
      structs.h:66: error: parse error before "GtkCombo"

      There are more errors after these.  They are all along the same lines and mention the error: `GtkCombo' undeclared.  I have both GTK 1.2 and GTK 2.0 installed - might this be a problem?  The INSTALL file mentions that I must have gthread installed in order for the package to configure - it configures fine, but I have no idea if I have gthread installed - what should I look for in order to verify this?

      Thanks,

          John L. Clark

       
    • McKenzie Keith

      McKenzie Keith - 2004-04-21

      Hmm. I haven't run across this exact problem before. I think I have gtk 1.2 and 2.0 installed also, although I am running an older version (8.0, IIRC) of slackware linux, and you are probably not running the exact same thing.

      It sounds to me like some sort of flag is not set right, or an include is coming from the wrong place or something.

      Do you think you could post the entire output from configure, and maybe everything from "make" up until the first error? If you want, we can take this to the mailing list. (If that's easier for you). I don't have a lot of traffic, so there is only one mailing list:

      http://lists.sourceforge.net/lists/listinfo/libswt-discuss

      (The mailing list looked like it was dead for a while because somehow I wasn't getting the mesages! But I am getting them now, I believe, and anyway I'll be looking for your message.)

      I should mention that I will be on vacation for a week starting on Friday, so you won't hear from me during that time.

      --McKenzie

       
    • John L. Clark

      John L. Clark - 2004-04-21

      I attempted to post to the mailing list this morning, and it has still not shown up on the archives, so I have posted it as a bug report[0]. This allows me to attach the files without specifying them inline.

      [0] http://sourceforge.net/tracker/index.php?func=detail&aid=939694&group_id=61804&atid=498470

       
    • McKenzie Keith

      McKenzie Keith - 2004-07-04

      As it turns out, the error John Clark was having was caused by an incompatibility with gnome 2.6.

      The swt.c code has the following define (line 17):

      #define GTK_DISABLE_DEPRECATED

      If you delete or disable that define, the package will compile.

      I'll try to get an updated version posted tomorrow.

      --McKenzie

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.