GPGMe Question (possibly round 2)

Daniel Sullivan dansully at uchicago.edu
Mon Mar 28 22:29:01 CEST 2011


Hi, I already sent this message once, I apologize if it is a dupe; I sent it before I was approved to be on the mailing list so I'm not sure if it actually got through...

---

This is my first posting to this list, I apologize if I am posting to the wrong place.  If this email should be directed to a different email address please let me know and I will make sure to bark up somebody else's tree.

Basically I am having a difficult time troubleshooting a compile error that I am receiving while tying to use gpgme.  Essentially I'm trying to just get my application to initially compile, so I'm not having a problem interacting with the API specifically, per se.   Admittedly I am learning C++ at the same time I am doing this, so I am a newbie in many regards.  Please forgive me for asking a potentially silly question.  For the purposes of this email I've created a small application to re-create the issue I am seeing.  Using NetBeans, I've done the following things to my project;

1) Added the /opt/local/lib/libgpgme.a library file to my project (as a library).
2) Extended my "include" path to include /opt/local/include, which is where the gpgme.h header file is located.

My entire source code looks like this;

---snip---

#include <cstdlib>
#include <iostream>
#include <locale.h>
#include <gpgme.h>

using namespace std;

int main(int argc, char** argv) {

   setlocale (LC_ALL, "");
   gpgme_check_version (NULL);

   return 0;
}

---snip---

>From what I understand, the syntax I am using is correct (http://pyme.sourceforge.net/doc/gpgme/Library-Version-Check.html).

It appears that the line "gpgme_check_version (NULL);"  is causing an issue; if I comment it out the application compiles and executes without warning or error.  The compile error I am getting (full thing is attached), are a whole bunch of undefined symbols, the first of which is; 

"
Undefined symbols:
 "_gpg_strerror", referenced from:
     _gpgme_strerror in libgpgme.a(error.o)
"

Now, If I look at the actual gpgme.h header file, it doesn't appear that any of the actual methods that are listed in the compiler error appear in the header file.  Am I supposed to be passing some sort of a flag to the compiler to allow it to continue with unresolved symbols?  Does this question make sense?  Basically I am trying to figure out how all of the attached symbols could possibly be resolved if they do not appear in gpgme.h...

Dan Sullivan
312-607-3702
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gpgme.txt
URL: </pipermail/attachments/20110328/c1fd13f0/attachment-0001.txt>


More information about the Gnupg-devel mailing list