tree
tree

Reputation: 239

How to specify build settings for one file?

I'm working with QT Creator to create an app and I am opening a socket on windows however I do not wish to use the native QT socket and wish to use the one provided by windows. I need to link in a library at compile time using the flag -lws2_32 but I can't seem to find a place where I can add that option in besides the makefile.release. I tried to edit the makefile but it gets overwritten and doesn't compile. Is there a way to specify a build flag for just one particular file?

Upvotes: 0

Views: 75

Answers (1)

Claudio
Claudio

Reputation: 1706

Add a line in project .pro file

LIBS += -lws2_32

or

LIBS += C:/Path/to/ws2_32.lib

Reference here.

Upvotes: 1

Related Questions