lundi 6 mai 2019

libxl library use in c++

When I create a project visual studio 2015 I can work this libxl library hovewer I could not be able to work that library on visual studio qt gui application project.

I try everything whatever I know.

#include "stdafx.h"
#include "QtGuiApplication5.h"
#iWidgets/QApplication>
#include "stdafx.h"
#include "QtGuiApplication5.h"
#include <QtWidgets/QApplication>
#include <qapplication.h>
#include <qpushbutton.h>
#include <iostream>
#include <conio.h>
#include "libxl.h"
using namespacenclude <Qt libxl;
using namespace std;

int main(int argc, char *argv[])
{
    Book* book = xlCreateBook();

    if (book)
    {
        if (book->load(L"..\\Lab_Bus Datebase.xlsx"))
        {
            Sheet* sheet = book->getSheet(0);
            if (sheet)
            {
                const wchar_t* s = sheet->readStr(2, 1);
                if (s) std::wcout << s << std::endl << std::endl;
            }
        } 
        else
        {
            std::cout << "At first run generate !" << std::endl;
        }
        book->release();
    }
    std::cout << "\nPress any key to exit...";
    _getch();
    QApplication a(argc, argv);
    QtGuiApplication5 w;
    w.show();

    return a.exec();
}

Link2019 error: Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp_xlCreateBookW referenced in function main QtGuiApplication5

link1120 error: Severity Code Description Project File Line Suppression State Error LNK1120 1 unresolved externals QtGuiApplication5 C

Aucun commentaire:

Enregistrer un commentaire