Unsolved Unable to include include directories when trying to build nmake.
-
I'm trying to build Qt with nmake (Windows) but it's not including my include and library flags, it's just saying any lib or source files: "is up-to-date"
My command:
nmake -I"sourceFile\Plugin\Common" -I"sourceFile\Plugin\common\includes" -L"sourceFile\Plugin\PICA_SP" release
The issue is the source files are not being included in the build, so it tosses the error:
sourceFile\PhotoshopPlugin.h(3): fatal error C1083: Cannot open include file: 'PIUtilities.h': No such file or directory
But the 'PIUtilities.h' is located in Common.
-------------------------------------------------When I try to include them with this CL command:
nmake /I\Common /I\includes /I\Photoshop /I\PICA_SP /I\resources /I\sources /L\common /L\sources /L\includes release
I get:
NMAKE : fatal error U1065: invalid option ' \ 'Anyone have any ideas?
-
@i773 said in Unable to include include directories when trying to build nmake.:
My command:
-L"sourceFile\Plugin\PICA_SP"
Is -L correct or shouldthis be a -I ( capital i )?
@i773 said in Unable to include include directories when trying to build nmake.:
When I try to include them with this CL command:
nmake /I\Common /I\includes /I\Photoshop /I\PICA_SP /I\resources /I\sources /L\common /L\sources /L\includes release
I get:
NMAKE : fatal error U1065: invalid option ' \ '\Common would be what?
In windows you would need a drive letter before that. Only in linux you can start folder name with a slash, but that would be a forward slash.
Probably more something like .\Common as a relative folder makes sense. But you need to check the proper nmake syntax -
"Is -L correct or shouldthis be a -I ( capital i )?"
Is that not the CL option for library directory?
"\Common would be what?"
I'm building directly from the folder where the source includes and libraries are (I've changed CL directory to D:/myPlugin. So /Common is D:/myPlugin/Comon/xxxx
-
I got the CL options correct now:
nmake /I Common /I common\includes /I PhotoshopAPI\Photoshop /I PhotoshopAPI\PICA_SP /I PhotoshopAPI\resources /I common\sources /L common /L common\sources /L common\includes release
But now it's not including the files... All I am getting is a failed to include with:
*'Common' is up-to-date 'common\includes' is up-to-date 'PhotoshopAPI\Photoshop' is up-to-date 'PhotoshopAPI\PICA_SP' is up-to-date 'PhotoshopAPI\resources' is up-to-date 'common\sources' is up-to-date 'Common' is up-to-date 'common\sources' is up-to-date 'common\includes' is up-to-date ```*
-
@i773
Somewhere along the line of whatever you are doing, you are totally mixing up options toNMAKE
versus options to theCL
compiler/linker.The
/I
and/L
options you show are all being passed toNMAKE
, and are irrelevant. You are meaning to supply them to theCL
compiler........ -
@JNBarchan nmake docs / fourms say to use those, if that's the wrong options for nmake do you know what options to use?
Thanks!
-
@i773 The https://stackoverflow.com/questions/3354390/how-do-i-specify-include-directories-using-nmake link you gave says no such thing! It says just what I have: "Pass -I"include dir" as command line option to cl". Note to
cl
, not tonmake
!I'll post a bit more in few minutes.
-
@JNBarchan I was assuming it was "Command line" since the question was "How do I specify include directories using NMake?" and the answer was marked correct. My bad if that's not the correct way to do it.
-
@i773
I cannot give you the answer as to actually what you need to do, as I'm afraid I don't build Qt sources.You do need to understand the difference between
NMAKE
andCL
.NMAKE
is a program whose job is to look at your source files' attributes (not their contents) and decide what need compiling/linking. When it decides something needs doing, it will invokeCL
(via a command-line) to compile/link your source/object files.You want to pass
/I
&/L
options toCL
on its command-line which it will use to locate your includes/libraries. You do not want to pass/I
or/L
as command-line options toNMAKE
itself.The kind of command-line you will want will look something like:
NMAKE CFLAGS="/I dir1 /I dir2 /L dir3 /L dir4" release
This will tell
NMAKE
to pass those flags on its command-line call toCL
. But I cannot tell you exactly what you will need 'coz I don't know what required for building Qt.Having said that, I would be 99% sure there is a document you should be reading which will tell you how to build Qt from sources via
NMAKE
/CL
, and you should be following those instructions.... -
@i773
Can we start with two absolutely basic questions:-
Are you indeed trying to build Qt itself from its sources (if so why)? You don't just mean you have some application of your own which calls Qt and you want to build that application?
-
Assuming you really are trying to build Qt from its sources, what document/instructions are you following to do that?
-
-
I should have been more specific, yes I am trying to build Qt from source from within my current project, this question is directed in trying to build my plugin (Photoshop plugin) with it's included soureces and libraries (Sorry if this is not 100% a Qt question I thought it would have been a problem some have had in the past with nmake). When trying to build my make files it's failing because it cannot find the include directories that are set up in the VS project includes (My Plugin project). Sorry if this was not specified.
I've been following the Qt docs and an example of mine of a plugin I created for Autodesk Maya. Though they have their own custom qmake file for Qt 4.0 for building and all my includes and libraries were sourced directly in one folder, so I did not have to add include paths for the project.
-
@i773
I assume you really do need to useNMAKE
, you can't use some environment (like VS) to do the building for you?Anyway, as it stands you seem to have a
NMAKE
/CL
question, not really a Qt one. Unless someone else posts here who is familiar with those, you are going to go need understand them yourself.For now, you could actually try:
nmake CFLAGS="/I Common /I common\includes /I PhotoshopAPI\Photoshop /I PhotoshopAPI\PICA_SP /I PhotoshopAPI\resources /I common\sources /L common /L common\sources /L common\includes" release
It should hopefully (assuming
NMAKE
passes$(CFLAGS)
to theCL
compiler, which I think it does) get you further than your attempts, and you might understand better where you're at.... -
@JNBarchan I really appreciate everything, but unfortunately It's still not locating the includes with your example, I'll have to look deeper into this. Thank you!