Open maylermartins opened 7 years ago
Ok, I found a workaround to force the docopt object generation. It is necessary to add the following code in the project:
SOURCES_FORCE = docopt.cpp
docopt_forced.name = docopt_forced
docopt_forced.input = SOURCES_FORCE
docopt_forced.dependency_type = TYPE_C
docopt_forced.variable_out = OBJECTS
docopt_forced.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
docopt_forced.commands = $${QMAKE_CXX} $(CXXFLAGS) $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
QMAKE_EXTRA_COMPILERS += docopt_forced
Is there anything more we can help you with on this? Sorry for late reply. Just trying to go through issues to see which still need addressed.
Hi Jared,
I left that project a long time ago. The workaround was fine but I don't know if the problem still exists.
Hi,
I tried to create a Qt project (Qt 5.8 + QtCreator 4.2.1) with just docopt and the main class, and it seems that for some reason Qmake does not understand the docopt.cpp as a source file. Therefore, it does not create an object and fails to link. If I enable the inline mode, it works, but I can't use this way in my original code since I am using docopt in several modules. I looked into the Makefile and indeed and it does not create the rule for docopt.cpp. Someone has a clue why this is happening?
The project file example:
The compilation log: