User forums > Help

building a qt application from code::blocks

(1/2) > >>

QwertZuiopü:
hi,

i have a problem building a simple qt(4) - app.

(system = windows xp)

from the commandline, i can enter

--- Code: ---qmake -project
qmake -spec win32-g++
make
--- End code ---
and everything goes well.

but when i create a new target in the codeblocks-project (commands-only) and enter the same commands in the "pre-build steps", i get an error.
("Fatal: 'FORCE' does not exist - don't know how to make it")

so what is the difference between the two proceedings?

rickg22:
I'm not a make expert, and the compiler part of Codeblocks isn't my field, but I think you forgot to enable the "this is a custom makefile" in your compiler settings. Otherwise, codeblocks generates the makefile, overwriting the one you just made in the pre-build steps.

Then again, it's just my humble opinion. :mrgreen:

QwertZuiopü:
ok, i think, it was my fault. codeblocks somehow used the borland-make instead of gnu-make  :shock:
now it works.

nevertheless, i'd like to know why codeblocks behaves this way.:roll:  does it change the PATH variable or something?


--- Quote from: rickg22 ---I'm not a make expert, and the compiler part of Codeblocks isn't my field, but I think you forgot to enable the "this is a custom makefile" in your compiler settings. Otherwise, codeblocks generates the makefile, overwriting the one you just made in the pre-build steps.
--- End quote ---
i thought that too, but the makefile was definitely the qt-generated one.

mandrav:

--- Quote from: QwertZuiopü ---ok, i think, it was my fault. codeblocks somehow used the borland-make instead of gnu-make  :shock:
now it works.

nevertheless, i'd like to know why codeblocks behaves this way.:roll:  does it change the PATH variable or something?
--- End quote ---

What do you mean "this way"?
Code::Blocks doesn't alter your PATH settings, at least not permanently. It adds the current compiler's paths as the first in PATH but this only happens in the Code::Blocks process. It doesn't affect the PATH variable system-wide.

Yiannis.

QwertZuiopü:
thanks for the help.


--- Quote from: mandrav ---Code::Blocks doesn't alter your PATH settings, at least not permanently. It adds the current compiler's paths as the first in PATH but this only happens in the Code::Blocks process. It doesn't affect the PATH variable system-wide.
--- End quote ---
that's (more or less) what i meant by "this way".
and the whole thing (the problem described above) also happens in other programs, so that's not a code::blocks matter.

btw:
is it intended, that the pre-build steps are not executed when the "build method" (compile->compiler options->other) is set to "Work with Makefile" or should i report a bug ?

Navigation

[0] Message Index

[#] Next page

Go to full version