Il 01/07/2018 19:45, Paavo Helde ha scritto:
> On 1.07.2018 19:52, Soviet_Mario wrote:
>> Il 01/07/2018 15:21, Sam ha scritto:
>>> Soviet_Mario writes:
>>>
>>>> I'm getting different errors when compiling and changing
>>>> the order of the files.
>>>> Now I still have clear enough notion of SCOPE of object,
>>>> but I must admit I have none about the sequence of scopes
>>>> (the "order" the files are compiled or, maybe, linked).
>>>> Is this relevant ?
>>>
>>> The only thing that can be stated for certain here, is that
>>> the file compilation order is always irrelevant.
>>>
>>> Nothing further can be stated withut specific, concrete,
>>> examples.
>>
>> I had a project (autogenerated) by QT creator, consisting of
>> two files : one with MAIN app, the other for initing the GUI
>>
>> Then I added a MY.CPP further file with some generic class
>> declaration.
>>
>> Building all I obtained errors like "type class XXX is not
>> defined".
>
> First you need to figure out if these were compiler errors
> or linker errors as this will narrow the location of the bug
> (in broad terms, is the problem in .h or in .cpp files).
I'm not sure ... I append the full code (it's not long, and
I'm not sure what is essential and what's not).
Actually, I'm not even sure the code is really wrong and I
don't feel sure to exclude some "mismatch" /
misconfiguration somewhere in the IDE.
>
> In C++, everything used by the code must be first declared,
> typically in included header files; if it's not, then you
> get compiler errors.
>
> The declared things must be also actually defined, typically
> in cpp files. For linking the whole program the linker needs
> to have all used symbols defined somewhere; if this is not
> the case, you get linker errors.
>
> Most people in this group can say by a single glance on an
> error message if it is coming from the compiler or linker,
> but of course it never did occur to you to post an actual
> error message.
>
>>
>> When I embedded the same code and declarations from MY.CPP
>> either in Main.CPP or in MainWindow.CPP, the build went
>> plain without errors.
>
> Seems like either a namespace problem or that you did not
> include MY.CPP in the build properly.
>
> Construct a minimal example demonstrating the problem, post
> the code and the actual error messages.
>
well I'm not able to : I post the code as is :\
If it is too long, no problem, thanks anyway
HEADER mainwindow.h (autogenerated by QT)
#############################################################
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_pushButton_clicked(bool checked);
void on_btnGo_clicked(bool checked);
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
#############################################################
#############################################################
HEADER disk_scanner_05.H (coded by myself)
#############################################################
#ifndef DISK_SCANNER_05_H
#define DISK_SCANNER_05_H
#include <QCoreApplication>
#include <QtCore>
#include <QDateTime>
#include <QString>
#include <QDir>
#include <QFileInfo>
// {};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsDiskMap;
class clsFileAttributes
{
friend class clsDiskMap;
friend class clsAssocFileNameToAttributes;
public:
static bool ExcludePathFoldersFromComparison;
const char * const DateTimeFormat =
"yyyy_MM_dd___HH_mm_ss";
public:
QDateTime LastModified; // QDateTime::fromTime_t(uint
seconds, const QTimeZone & timeZone)
QDateTime LastAccessed;
quint64 Dimensions;
QString * ptrPathFolder; // dato PESANTE, ma presente
solo come puntatore, lo spazio è consumato altrove
static bool ExcludePathFoldersFromComparisons ();
static bool IncludePathFoldersInComparisons ();
bool operator == (const clsFileAttributes & Arg) const;
bool operator != (const clsFileAttributes & Arg) const;
// friend ESTERNA
bool FzGetFileAttributes (const QString &, const
QString &);
QString To_String (bool IncludeDimensions = true, bool
IncludeLastModified = true, bool IncludeLastAccessed = true,
bool IncludePathFolder = true);
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// bool clsFileAttributes ::
ExcludePathFoldersFromComparison = false;
// bool FzGetFileAttributes (const QString & FolderPath,
const QString & FileName, clsFileAttributes & Attribs);
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsAssocFileNameToAttributes
{
friend class clsMappaAssocsFileNamesToTheirAttributes;
friend class clsDiskMap;
private:
const QString * zzFileNameKey;
QList <clsFileAttributes>
zzListaAttributiAndFoldersOfFileName;
public:
clsAssocFileNameToAttributes ();
clsAssocFileNameToAttributes (const QString &
ArgFileNameKey);
const QList <clsFileAttributes> & GetListaAttributiFile ();
int CercaAttributiFile (const clsFileAttributes &
AttributiFileCercati) const;
bool AggiungiNuoviAttributiFile (const
clsFileAttributes & ArgNuoviAttributiFile);
bool EliminaAttributiFile (const clsFileAttributes &
ArgAttributiFile);
const QString & GetFileName () const;
const QString & SetFileName (const QString & NewFileName);
bool operator == (const QString & Op2);
bool operator != (const QString & Op2);
bool operator == (const clsAssocFileNameToAttributes &
Op2);
bool operator != (const clsAssocFileNameToAttributes &
Op2);
QString To_String (bool IncludeDimensions = true, bool
IncludeLastModified = true, bool IncludeLastAccessed = true,
bool IncludePathFolder = true);
};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsMappaAssocsFileNamesToTheirAttributes
{
friend class clsDiskMap;
friend class clsAssocFileNameToAttributes;
private:
QList <clsAssocFileNameToAttributes> zzMappa;
public:
int AggiungiFileNameKeySeManca (const QString &
NewFileNameKey);
bool AggiungiFilesAttributes (const QString & FileName,
const clsFileAttributes & NewFileNameAttribute);
const QList <clsFileAttributes> & GetAttributiFile
(const QString & FileNameKey);
QString To_String (bool IncludeDimensions = true, bool
IncludeLastModified = true, bool IncludeLastAccessed = true,
bool IncludePathFolder = true);
};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsDiskMap
{
private:
QStringList DB_FullPathnamesFoldersTree;
// clsDizionario <QString>
DB_FromUnivocFilenamesToTheirPathFolders; // = QMap
<QString, QStringList> ("", QStringList (""));
clsMappaAssocsFileNamesToTheirAttributes
DB_FromUnivocFilenamesToTheirAttributes; // = QMultiMap
<QString, QList <clsFileAttributes> > ("", QList (""));
QString zzErrMsg;
public:
bool FzScanPathFoldersRecursively (const QString &
StartPath);
bool SaveToFile (const QString & OutFileName, bool
IncludeDimensions = true, bool IncludeLastModified = true,
bool IncludeLastAccessed = true, bool IncludePathFolder = true);
};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#endif // DISK_SCANNER_05_H
#############################################################
#############################################################
Source Code main.CPP (autogenerated by QT)
#############################################################
#include "mainwindow.h"
#include <QApplication>
#include "disk_scanner_05.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
#############################################################
#############################################################
Source Code mainwindow.CPP (GUI, autogenerated by QT)
#############################################################
#include <QCoreApplication>
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "disk_scanner_05.h"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
clsDiskMap GloDiskMap;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_btnGo_clicked(bool checked)
{
QString StartPath (ui->txtStartPath->text());
QString OutFileName (ui->txtOutputFileName->text());
GloDiskMap . FzScanPathFoldersRecursively (StartPath);
GloDiskMap . SaveToFile (OutFileName);
}
#############################################################
#############################################################
Source code disk_scanner_05.CPP (my code)
#############################################################
#include <QCoreApplication>
#include <QtCore>
#include <QDateTime>
#include <QString>
#include <QDir>
#include <QFileInfo>
// extern DiskScanner::clsDiskMap GloDiskMap;
// extern clsDiskMap GloDiskMap;
// DiskScanner::clsDiskMap GloDiskMap;
// clsDiskMap * GloDiskMap = new clsDiskMap ();
// {};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsDiskMap;
class clsFileAttributes
{
friend class clsDiskMap;
friend class clsAssocFileNameToAttributes;
public:
static bool ExcludePathFoldersFromComparison;
static const char * const DateTimeFormat;
public:
QDateTime LastModified; // QDateTime::fromTime_t(uint
seconds, const QTimeZone & timeZone)
QDateTime LastAccessed;
quint64 Dimensions;
QString * ptrPathFolder; // dato PESANTE, ma presente
solo come puntatore, lo spazio è consumato altrove
static bool ExcludePathFoldersFromComparisons ()
{
bool OldValue = ExcludePathFoldersFromComparison;
ExcludePathFoldersFromComparison = true;
return OldValue;
}
static bool IncludePathFoldersInComparisons ()
{
bool OldValue = ExcludePathFoldersFromComparison;
ExcludePathFoldersFromComparison = false;
return OldValue;
}
bool operator == (const clsFileAttributes & Arg) const
{
if (Dimensions != Arg . Dimensions) return false;
if (LastAccessed != Arg . LastAccessed) return false;
if (LastModified != Arg . LastModified) return false;
if (ExcludePathFoldersFromComparison = true)
return true;
if (QString :: compare ((* ptrPathFolder), (*(Arg .
ptrPathFolder))) != 0) return false;
return true;
}
bool operator != (const clsFileAttributes & Arg) const
{
if (Dimensions != Arg . Dimensions) return true;
if (LastAccessed != Arg . LastAccessed) return true;
if (LastModified != Arg . LastModified) return true;
if (ExcludePathFoldersFromComparison = true)
return false;
if (QString :: compare ((* ptrPathFolder), (*(Arg .
ptrPathFolder))) != 0) return true;
return false;
}
bool FzGetFileAttributes (const QString & FolderPath,
const QString & FileName)
{
try
{
QString FullName (FolderPath);
if (!(FullName . endsWith (QChar ('/'))))
FullName . append ("/");
ptrPathFolder = & FullName; // sarebbe il
FolderPath TERMINATO da SLASH;
FullName . append (FileName);
QFileInfo Infos (FullName);
Dimensions = Infos . size ();
LastModified = Infos . lastModified ();
LastAccessed = Infos . lastRead ();
return true;
}
catch (...)
{
return false;
}
}
QString To_String (bool IncludeDimensions = true, bool
IncludeLastModified = true, bool IncludeLastAccessed = true,
bool IncludePathFolder = true)
{
QBuffer Buf;
Buf . open (QBuffer :: WriteOnly);
if (IncludeDimensions = true)
{ Buf . write ("[Size : "); Buf . write
(QString :: number (Dimensions) . toUtf8 ()); Buf . write
("]"); }
if (IncludeLastModified = true)
{ Buf . write ("[Last Modified : "); Buf .
write (LastModified . toString (DateTimeFormat) . toUtf8
()); Buf . write ("]"); }
if (IncludeLastAccessed = true)
{ Buf . write ("[Last Accessed : "); Buf .
write (LastAccessed . toString (DateTimeFormat) . toUtf8
()); Buf . write ("]"); }
if (IncludePathFolder = true)
{ Buf . write ("["); Buf . write (ptrPathFolder
-> toUtf8 ()); Buf . write ("]"); }
Buf . write ("\n");
Buf . close ();
return (QString (Buf . buffer ()));
}
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
const char * const clsFileAttributes :: DateTimeFormat =
"yyyy_MM_dd___HH_mm_ss";
bool clsFileAttributes :: ExcludePathFoldersFromComparison =
false;
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsAssocFileNameToAttributes
{
friend class clsMappaAssocsFileNamesToTheirAttributes;
friend class clsDiskMap;
private:
const QString * zzFileNameKey;
QList <clsFileAttributes>
zzListaAttributiAndFoldersOfFileName;
public:
clsAssocFileNameToAttributes () : zzFileNameKey (NULL),
zzListaAttributiAndFoldersOfFileName ()
{ return; }
clsAssocFileNameToAttributes (const QString &
ArgFileNameKey) : zzFileNameKey (& ArgFileNameKey),
zzListaAttributiAndFoldersOfFileName ()
{ return; }
const QList <clsFileAttributes> & GetListaAttributiFile ()
{ return zzListaAttributiAndFoldersOfFileName; }
int CercaAttributiFile (const clsFileAttributes &
AttributiFileCercati) const
{
try
{
for (int J = 0; J <
zzListaAttributiAndFoldersOfFileName . size (); J ++)
{
if (AttributiFileCercati ==
(zzListaAttributiAndFoldersOfFileName . at (J)))
return J;
}
return -1;
}
catch (...) { return false; }
}
bool AggiungiNuoviAttributiFile (const
clsFileAttributes & ArgNuoviAttributiFile)
{
// nota : aggiunge solo se non già presente
if (CercaAttributiFile (ArgNuoviAttributiFile) >=
0) return true;
try { zzListaAttributiAndFoldersOfFileName .
append (ArgNuoviAttributiFile); return true; }
catch (...) { return false; }
}
bool EliminaAttributiFile (const clsFileAttributes &
ArgAttributiFile)
{
// nota : elimina valore solo se già presente
try
{
int Posiz = CercaAttributiFile (ArgAttributiFile);
if (Posiz < 0) return true;
zzListaAttributiAndFoldersOfFileName . removeAt
(Posiz);
return true;
}
catch (...) { return false; }
}
const QString & GetFileName () const
{ return (* zzFileNameKey); }
const QString & SetFileName (const QString & NewFileName)
{ return (*(zzFileNameKey = & NewFileName)); }
bool operator == (const QString & Op2) { return ((*
zzFileNameKey) == Op2); }
bool operator != (const QString & Op2) { return ((*
zzFileNameKey) != Op2); }
bool operator == (const clsAssocFileNameToAttributes &
Op2) { return ((* zzFileNameKey) == Op2 . GetFileName ()); }
bool operator != (const clsAssocFileNameToAttributes &
Op2) { return ((* zzFileNameKey) != Op2 . GetFileName ()); }
QString To_String (bool IncludeDimensions = true, bool
IncludeLastModified = true, bool IncludeLastAccessed = true,
bool IncludePathFolder = true)
{
QBuffer Buf;
Buf . open (QBuffer :: WriteOnly);
Buf . write ("{FileName : "); Buf . write ((*
zzFileNameKey) . toUtf8 ()); Buf . write ("}"); Buf . write
("\n");
Buf . write ("{"); Buf . write ((QString :: number
(zzListaAttributiAndFoldersOfFileName . size ())) . toUtf8
()); Buf . write (" INSTANCES}"); Buf . write ("\n");
Buf . write ("{\n");
for (int J = 0; J <
zzListaAttributiAndFoldersOfFileName . size (); J ++)
{
Buf . write
((zzListaAttributiAndFoldersOfFileName . value (J)) .
To_String (IncludeDimensions, IncludeLastModified,
IncludeLastAccessed, IncludePathFolder) . toUtf8 ());
}
Buf . write ("\n");
Buf . write ("}");
Buf . write ("\n");
Buf . close ();
return (QString (Buf . buffer ()));
}
};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsMappaAssocsFileNamesToTheirAttributes
{
friend class clsDiskMap;
friend class clsAssocFileNameToAttributes;
private:
QList <clsAssocFileNameToAttributes> zzMappa;
public:
int AggiungiFileNameKeySeManca (const QString &
NewFileNameKey)
{
try
{ // cerca la chiave
for (int J = 0; J < zzMappa . size (); J ++)
{
if (zzMappa . value (J) . GetFileName () ==
NewFileNameKey)
return J;
}
zzMappa . append (* new
clsAssocFileNameToAttributes (NewFileNameKey));
return (zzMappa . size () - 1); // DA
VERIFICARE che l'indice sia davvero l'ultimo
}
catch (...)
{ return -1; };
return true;
}
bool AggiungiFilesAttributes (const QString & FileName,
const clsFileAttributes & NewFileNameAttribute)
{
try
{
int Position = -1;
if ((Position = AggiungiFileNameKeySeManca
(FileName)) < 0) return false;
return (zzMappa . value (Position) .
AggiungiNuoviAttributiFile (NewFileNameAttribute));
}
catch (...)
{ return false; };
return true;
}
const QList <clsFileAttributes> & GetAttributiFile
(const QString & FileNameKey)
{
try
{
for (int J = 0; J < zzMappa . size (); J ++)
{
if (zzMappa . at (J) . GetFileName () ==
FileNameKey)
return (zzMappa . value (J) .
GetListaAttributiFile ());
}
return * new QList <clsFileAttributes>;
}
catch (...)
{ return * new QList <clsFileAttributes>; };
}
QString To_String (bool IncludeDimensions = true, bool
IncludeLastModified = true, bool IncludeLastAccessed = true,
bool IncludePathFolder = true)
{
QBuffer Buf;
Buf . open (QBuffer :: WriteOnly);
Buf . write ("<<MAPPA : "); Buf . write ((QString
:: number (zzMappa . size ())) . toUtf8 ()); Buf . write ("
ELEMENTI>>"); Buf . write ("\n");
Buf . write ("<<\n");
for (int J = 0; J < zzMappa . size (); J ++)
{
Buf . write ((zzMappa . value (J)) . To_String
(IncludeDimensions, IncludeLastModified,
IncludeLastAccessed, IncludePathFolder) . toUtf8 ());
}
Buf . write ("\n");
Buf . write (">>\n");
Buf . close ();
return (QString (Buf . buffer ()));
}
};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
class clsDiskMap
{
private:
QStringList DB_FullPathnamesFoldersTree;
// clsDizionario <QString>
DB_FromUnivocFilenamesToTheirPathFolders; // = QMap
<QString, QStringList> ("", QStringList (""));
clsMappaAssocsFileNamesToTheirAttributes
DB_FromUnivocFilenamesToTheirAttributes; // = QMultiMap
<QString, QList <clsFileAttributes> > ("", QList (""));
QString zzErrMsg;
public:
bool FzScanPathFoldersRecursively (const QString &
StartPath)
{
try
{
int Posiz = -1;
QString CurDir, CurFil;
clsFileAttributes FilAttr;
QDir::Filters FiltroDirs (QDir::AllDirs);
QDir::SortFlag FlagOrdinamento = QDir::NoSort;
QDir Directory (StartPath);
// DB_FullPathnamesFoldersTree = QStringList
(Directory . entryList ("", FiltroDirs, FlagOrdinamento));
DB_FullPathnamesFoldersTree = Directory . entryList
(QStringList(), FiltroDirs, FlagOrdinamento);
for (int J = 0; J < DB_FullPathnamesFoldersTree .
size(); J ++)
{
CurDir = DB_FullPathnamesFoldersTree . at (J);
if (CurDir . isEmpty ())
continue;
QDir TmpDirFiles (CurDir, QString (),
FlagOrdinamento, QDir::Files);
QStringList Files = TmpDirFiles . entryList
(QStringList()) ;
for (int Q = 0; Q < Files . size (); Q ++)
{
CurFil = Files . at (Q);
if (CurFil . isEmpty ())
continue;
if (! FilAttr . FzGetFileAttributes
(CurDir, CurFil))
throw ("FzScanPathFoldersRecursively >>
FzGetFileAttributes = non riesco a leggere gli attributi del
file");
// cerca nella QMultiMap
if ((Posiz =
DB_FromUnivocFilenamesToTheirAttributes .
AggiungiFileNameKeySeManca (CurFil)) < 0)
throw ("FzScanPathFoldersRecursively >>
FzGetFileAttributes = non riesco ad aggiungere una chiave
mancante al DB");
DB_FromUnivocFilenamesToTheirAttributes .
zzMappa . value (Posiz) . AggiungiNuoviAttributiFile (FilAttr);
};
};
return true;
}
catch (...)
{
zzErrMsg = "FzScanPathFoldersRecursively";
};
}
bool SaveToFile (const QString & OutFileName, bool
IncludeDimensions = true, bool IncludeLastModified = true,
bool IncludeLastAccessed = true, bool IncludePathFolder = true)
{
if (OutFileName . isEmpty ()) return false;
QBuffer Buf;
Buf . open (QBuffer :: WriteOnly);
Buf . write ("<<MAPPA : "); Buf . write ((QString
:: number (DB_FromUnivocFilenamesToTheirAttributes . zzMappa
. size ())) . toUtf8 ()); Buf . write (" ELEMENTI>>"); Buf .
write ("\n");
Buf . write ("<<\n");
for (int J = 0; J <
DB_FromUnivocFilenamesToTheirAttributes . zzMappa . size ();
J ++)
{
Buf . write
((DB_FromUnivocFilenamesToTheirAttributes . zzMappa . value
(J)) . To_String (IncludeDimensions, IncludeLastModified,
IncludeLastAccessed, IncludePathFolder) . toUtf8 ());
}
Buf . write ("\n");
Buf . write (">>\n");
Buf . close ();
QFile File (OutFileName);
File . open (QFile::ReadWrite);
File . write (Buf . buffer ());
File . close ();
return (true);
}
};
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#############################################################
OUTCOME OF BUILD ALL command from IDE menu
#############################################################
compile output
17:01:04: Running steps for project Prova_QT_00...
17:01:04: Configuration unchanged, skipping qmake step.
17:01:05: Starting: "/usr/bin/make"
g++ -m64 -o Prova_QT_00 main.o mainwindow.o
disk_scanner_07.o moc_mainwindow.o
-L/usr/lib/x86_64-linux-gnu -lQtGui -lQtCore -lpthread
mainwindow.o: In function `MainWindow::on_btnGo_clicked(bool)':
/home/gattovizzato/B/SourceCode/QT5/build-Prova_QT_00-Desktop-Debug/../Prova_QT_00/mainwindow.cpp:28:
undefined reference to
`clsDiskMap::FzScanPathFoldersRecursively(QString const&)'
/home/gattovizzato/B/SourceCode/QT5/build-Prova_QT_00-Desktop-Debug/../Prova_QT_00/mainwindow.cpp:30:
undefined reference to `clsDiskMap::SaveToFile(QString
const&, bool, bool, bool, bool)'
Makefile:108: recipe for target 'Prova_QT_00' failed
collect2: error: ld returned 1 exit status
make: *** [Prova_QT_00] Error 1
17:01:05: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Prova_QT_00 (kit:
Desktop)
When executing step "Make"
17:01:05: Elapsed time: 00:00.
#############################################################
ISSUES :
/home/gattovizzato/B/SourceCode/QT5/Prova_QT_00/mainwindow.cpp:28:
error: undefined reference to
`clsDiskMap::FzScanPathFoldersRecursively(QString const&)'
/home/gattovizzato/B/SourceCode/QT5/Prova_QT_00/mainwindow.cpp:30:
error: undefined reference to
`clsDiskMap::SaveToFile(QString const&, bool, bool, bool, bool)'
:-1: error: collect2: error: ld returned 1 exit status
#############################################################
As I said, I have used only Visual Studio since long, and
I'm not familiar with QT Creator
Ciao
and tnx for attention