Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File not found error while building the project #1

Open
sleebapaul opened this issue Apr 18, 2019 · 9 comments
Open

File not found error while building the project #1

sleebapaul opened this issue Apr 18, 2019 · 9 comments

Comments

@sleebapaul
Copy link

Would you mind helping with the following files which are not present in the project but imported in the project?

DebugLog/DebugLogging.h
Serialization/SerializationIncludes.h

@dac1976
Copy link
Owner

dac1976 commented Apr 18, 2019 via email

@sleebapaul
Copy link
Author

sleebapaul commented Apr 25, 2019

Thanks for the reply. I'm finding a hard time setting up the third-party libraries you've mentioned. I'm on an Ubuntu 18.04 machine with Qt 5.12.2.

I've installed boost, loki and cereal through apt-get and downloaded SingleApplication repo to project folder, added the INCLUDEPATH, added the singleapplication header and source files. I've compiled OpenCV from source and linked the library as well.

I downloaded the CoreLibrary repo and included the path. Do I need to compile the CoreLibrary and SingleApplication? If so how to do that?

I get undefined reference error to core_lib and SingleApplication.

Would you mind helping me with the setup (Pretty new to Qt dev)?

@dac1976
Copy link
Owner

dac1976 commented Apr 25, 2019 via email

@sleebapaul
Copy link
Author

I've setup the .prf files and copied the custom_mkspecs folder to my Qt compiler folder under mkspecs. When I try to compile the CoreLibrary project, I get the following linking error.

../Source/CsvGrid/CsvGridCell.cpp
../Source/CsvGrid/CsvGridCellDouble.cpp::2727::1010::  fatal error fatal error: : 'CsvGrid/CsvGridCellDouble.h' file not found'CsvGrid/CsvGridCell.h' file not found

#include "CsvGrid/CsvGridCell.h"
         ^~~~~~~~~~~~~~~~~~~~~~~
#include "CsvGrid/CsvGridCellDouble.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The .pro file needs any addition?

@dac1976
Copy link
Owner

dac1976 commented Apr 25, 2019 via email

@dac1976
Copy link
Owner

dac1976 commented Apr 25, 2019 via email

@sleebapaul
Copy link
Author

Thanks for your update. I did uncheck the shadow build, and copy .prf files to the features/unix folder and the linking issue is over. But I've a new error which might not be related to project. But have you seen this one before?

/usr/include/c++/7.3.0/cstdlib:75: error: 'stdlib.h' file not found
#include_next <stdlib.h>
              ^~~~~~~~~~

@dac1976
Copy link
Owner

dac1976 commented Apr 25, 2019 via email

@sleebapaul
Copy link
Author

sleebapaul commented Apr 25, 2019

That seems not working. The same error popped again.

I tried find /usr/include/ -name "stdlib.h" and found the file in the directory. Not sure it is the GCC or build-essentials package issue.

Tried this one too, not helping.

The way to fix it is to edit mkspecs/common/gcc-base.conf

Change QMAKE_CFLAGS_ISYSTEM = -isystem
to QMAKE_CFLAGS_ISYSTEM = -I (capital i)

Added QMAKE_CFLAGS_ISYSTEM = -I to CoreLibrary.pro and new error popped.

/home/****/Documents/Qt_Projects/IP-Freely-master/CoreLibrary/Source/Asio/TcpConnection.cpp:97: error: no member named 'this_thread' in namespace 'std'
    std::this_thread::sleep_for(std::chrono::milliseconds(defs::SOCKET_CLOSE_SLEEP_MS));
    ~~~~~^

Update 2/5/2019

@dac1976

I've built the project with the following tweaks.

  1. QMAKE_DEFAULT_INCDIRS = to .pro file
  2. Adding #include <thread> to TcpConnection.cpp

On Run I get a static lib in CoreLibrary/QtProject/release/libCoreLibrary.a. I think it worked.

I linked the static file to IPFreely project. Do I need to link any other libraries?

/usr/include/loki/Threads.h:505: error: return-statement with a value, in function returning 'void' [-fpermissive]
         LOKI_THREADS_ATOMIC_FUNCTIONS
         ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants