Author Topic: Build project with custom Makefile under windows  (Read 6751 times)

Offline passingby

  • Single posting newcomer
  • *
  • Posts: 5
Build project with custom Makefile under windows
« on: April 26, 2012, 06:36:59 pm »
Build project with custom Makefile under windows will end with a error message like "no rule to build target 'cmd.'.
This error stop the debuger.

I think this is related to Rev 7895.

It can be fixed by deleting the string "+ _T(" > $(CMD_NULL)")" in /trunk/src/plugins/compilergcc/compileroptionsdlg.cpp, which inctruduce in Rev 7895.

system: Windows XP
TDM gcc 4.6.1.
REV 7944.
CMake 2.8.7 (the custom Makefile is generated by camke).

PS
Is there any plan to improve the Cmake support? Such as native project file gnerator (not Makefile).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build project with custom Makefile under windows
« Reply #1 on: April 26, 2012, 06:47:50 pm »
Is there any plan to improve the Cmake support? Such as native project file gnerator (not Makefile).
This is a question you have to ask in a CMake support channel (irc/mailing list/bug tracker).
I doubt any of the developers here has done any work on the CMake support.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jarod42

  • Multiple posting newcomer
  • *
  • Posts: 87
Re: Build project with custom Makefile under windows
« Reply #2 on: April 27, 2012, 10:02:12 am »
Note that Premake is able to generate native CB projects.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Build project with custom Makefile under windows
« Reply #3 on: April 27, 2012, 03:35:30 pm »
Note that Premake is able to generate native CB projects.
...and I believe there was also a premake plugin that did the opposite.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline passingby

  • Single posting newcomer
  • *
  • Posts: 5
Re: Build project with custom Makefile under windows
« Reply #4 on: April 27, 2012, 03:56:29 pm »
Thanks for the reply about the Cmake part.

But Cmake is much widely used by project like OpenCV and ibus.

Is anyone encounter the same problem about build project with custom Makefile generated by Cmake?

The error will stop the debuger to start (target is successfully generated).


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build project with custom Makefile under windows
« Reply #5 on: April 27, 2012, 04:25:06 pm »
The error will stop the debuger to start (target is successfully generated).
What does this mean?
I don't understand the parte 'target is successfully generated'.
Explain better please and if you can provide simple sample with the full build log it will be best.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline passingby

  • Single posting newcomer
  • *
  • Posts: 5
Re: Build project with custom Makefile under windows
« Reply #6 on: April 27, 2012, 05:02:29 pm »
The computer with windows installed is not avaliabled. Sorry for that.

The Steps to reproduce the problem:

1. Generate Codeblock Mingw project file by Cmake.
2. Build the project with codeblock.

Expected result: The binary file is generated without any error mesaage.

Real result:  The binary file is generated with error "no rule to build the target '.cmd'"

This error prevent the debuger to start.

When I want to debug the project, codeblock with build the project to make sure the target is up to date and stop by the error.

I think this is related Rev 7895 as I mentioned at my first post.

Thank for your help.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build project with custom Makefile under windows
« Reply #7 on: April 27, 2012, 05:11:20 pm »
So you have a build problem, not a debugger problem? (hint if the build fails the debugger will fail as there is nothing to debug:) )
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline passingby

  • Single posting newcomer
  • *
  • Posts: 5
Re: Build project with custom Makefile under windows
« Reply #8 on: April 27, 2012, 05:23:08 pm »
So you have a build problem, not a debugger problem? (hint if the build fails the debugger will fail as there is nothing to debug:) )
Yes, and I didn't notice the error because the binary file is successfully generated.

Until I try to debug the project, I noticed the build problem.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build project with custom Makefile under windows
« Reply #9 on: April 27, 2012, 06:21:12 pm »
Hm, you contradict yourself.

Do you really have a build problem?
Can you run your application in a terminal or using Build->run?

p.s. please concentrate and try provide non-ambiguous information about your problem, otherwise you're wasting my time and I'll stop responding you...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline passingby

  • Single posting newcomer
  • *
  • Posts: 5
Re: Build project with custom Makefile under windows
« Reply #10 on: April 27, 2012, 07:08:10 pm »
In fact, I'm not sure it sould be called a "build problem".

Because the targeted binary file have successfuly gernerated and then an error "no rule to build target 'cmd'.".

Normal build process will stop when the binary file got generated.

When I use custom Makefile, the codeblock want to build something after the binary file got generated.

From my observation, this problem is causing by Rev 7895, which want to redirect the output log to null (silent build).

Sorry for not expressing the problem well, and thnak for your help again.


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Build project with custom Makefile under windows
« Reply #11 on: April 27, 2012, 07:26:38 pm »
You are right.
I did not test it under windows, sorry for the inconvenience.

I will do it later, for the moment it should also be able to fix the make command on project-level (instead of compiling C::B yourself).