PDA

View Full Version : Add platform dependent path into pro file problem



alizadeh91
6th October 2012, 08:16
Hi,
I've created simple project and i want to add a library to my project and i want to add its path base on my platform so i did this in my pro file:

win32
{
INCLUDEPATH += C:\Qwt-6.0.2\include
LIBS += -LC:\Qwt-6.0.2\lib -lqwt

CONFIG += qwt
}

but i get " error: Parse Error ('win32')" . When i remove win32 it works fine. any suggestion?

Ashkan_s
6th October 2012, 09:38
try this form


win32 {
INCLUDEPATH += C:\Qwt-6.0.2\include
LIBS += -LC:\Qwt-6.0.2\lib -lqwt

CONFIG += qwt
}

alizadeh91
6th October 2012, 10:07
What's its difference with my code!!!???

Ashkan_s
6th October 2012, 10:38
open the brace in front of win32, line two of your code is in line one in the second code


Added after 9 minutes:

take a look at this qmake-project-files.html,
The opening brace must stand on the same line as the condition

alizadeh91
6th October 2012, 11:58
:| !!! That's worked!!!

elmigranto
7th October 2012, 01:06
:| !!! That's worked!!!
You better use forward slashes anyway.