July 30, 2012

McLion McLion
Ant Farmer
61 posts

[SOLVED] Error: #include <QLocalSocket> and #include <qlocalsocket.h> not found

 

Hi

On both includes
#include <QLocalSocket>
#include <qlocalsocket.h>
I get a “No such file or directory” when trying to compile and run on windows. Funny enough, when cross-compiled on linux, there is no error.
When I hover over it with the mouse it correctly shows me the class message with F1 as well as the path on the header file.
Strange as well, if I open the localfortuneclient demo, it compiles and runs (on windows) and I don’t really see the difference.

What am I doing wrong?
I have to add that I am rather new to QT.
Thanks

I’d like to add what I am trying to achieve. Maybe there is a good How-To somewhere.
I have a daemon that acts as Unix Domain Sockets Server that I need to communicate with.
The server is up and running and I now need to have QT as client and connect to the server and communicate with it.

4 replies

July 31, 2012

guziemic guziemic
Hobby Entomologist
113 posts

Hi,

Could you post your .pro file? Maybe you forget to add QT += network in it?

BR,

July 31, 2012

McLion McLion
Ant Farmer
61 posts

That was it!
Thanks a lot. I now have:
QT += core gui network

Cheers,
McL

July 31, 2012

Woody Woody
Ant Farmer
85 posts

Please add [SOLVED] to the title;)

So we know it’s solved;)

 Signature 

File not found. Nobody leave the room!

July 31, 2012

McLion McLion
Ant Farmer
61 posts

I looked for a forum function to set this thread as solved, to no avail.
I’ll do it as you suggested.
Thanks

 
  ‹‹ Valgrind Invalid write of size 8 with QGLBuffer map      Embedded project. Wait for -QT- Qt 5? ››

You must log in to post a reply. Not a member yet? Register here!