Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8072709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:06:28+00:00 2026-06-05T14:06:28+00:00

I am using libvcard in a Qt Application. I installed the library on Ubuntu

  • 0

I am using libvcard in a Qt Application. I installed the library on Ubuntu as instructed in the read me file (i.e. I ran qmake, make, sudo make install on the project file) but when I try to run this code from the website, I get a bunch of errors.

   #include <QtCore/QCoreApplication>
#include <vcard/vcard.h>
#include <QtDebug>

int main(int argc, char *argv[])
{
    // Now we can parse it...
    QList<vCard> vcards = vCard::fromFile("/home/ubuntu/Desktop/Contacts.vcf");

    // ...and then we can use it.
    if (!vcards.isEmpty())
    {
        vCard vcard = vcards.takeFirst();

        vCardProperty name_prop = vcard.property(VC_NAME);
        if (name_prop.isValid())
        {
            QStringList values = name_prop.values();

            QString firstname = values.at(vCardProperty::Firstname);
            QString lastname = values.at(vCardProperty::Lastname);

            qDebug()<<firstname<<" "<<lastname;
        }

    }

}

Errors

In function main:

/home/ubuntu/Workspace/Qt/cVCardTest-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/../cVCardTest/main.cpp:8:

error: undefined reference to `vCard::fromFile(QString const&)
/home/ubuntu/Workspace/Qt/cVCardTest-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/../cVCardTest/main.cpp:15:

error: undefined reference to vCard::property(QString const&, QList<vCardParam> const&, bool) const
/home/ubuntu/Workspace/Qt/cVCardTest-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/../cVCardTest/main.cpp:15: error: undefined reference to
vCard::property(QString const&, QList const&, bool) const’
‘

I’m not sure what I’ve done wrong.
Should I be adding something to the project file in order to use this library?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:06:31+00:00Added an answer on June 5, 2026 at 2:06 pm

    vcard is external library, so linker must know, where to look for used symbols. You need to link with vcard library. In your .pro file add

    LIBS += vcard
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Android SDK Manager Revision 15 on Ubuntu 11.04 (Natty) with sun-jav6-jdk (6.26) installed.
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
Using storyboard ,I created a project. Inside viewDidLoad ,I did : NSLog(@"%@",self.view.description); I got
Using the HTML5 File API I can get the Binary String representation of a
Using Android TelephonyManager an application can obtain the state of data activity over the
Using emacs on Ubuntu 11.10. I want to connect to a SQL Server database
Using Java,I have to fetch multiple sets of values from an XML file to
Using restlet, I want to make a post to android's c2dm service. I have
Using Google Maps InfoBox - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html Currently the map will scroll - pan control
Using TortoiseSVN against VisualSVN I delete a source file that I should not have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.