Author Topic: Building entire project using Makefile in codeblocks  (Read 10151 times)

Offline raj

  • Single posting newcomer
  • *
  • Posts: 6
Building entire project using Makefile in codeblocks
« on: June 16, 2010, 03:10:51 pm »
Hi,
I am trying to build FFMPEG package using Codeblocks with GCC compiler. I created a project and I gave the Makefile(This is the Makefile used for building the complete project) as custom Makefile in project options. I included only some source files. When I tried building, got an error "mingw32-make.exe: *** virtual memory exhausted.  Stop". Are the steps I followed sufficient to build the project on Codeblocks? Can codeblocks find out all source files, include files and preprocessors using the final Makefile.

Regards,
Raj

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Building entire project using Makefile in codeblocks
« Reply #1 on: June 16, 2010, 03:31:37 pm »
This is not mingw-make support forum, please as in such forum/mailing list...

One simple thing to try is to invoke the make command in a cmd window.
If that works then there is something wrong with your setup or something wrong with CB.

Also see the CB's faq on the wiki.codeblocks.org ... there is a section describing what you should do to debug the build process of a project.
(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 raj

  • Single posting newcomer
  • *
  • Posts: 6
Re: Building entire project using Makefile in codeblocks
« Reply #2 on: June 18, 2010, 12:27:24 pm »
Thanks for your reply. I made a mistake before. I ran configure using MinGW and tried running Codeblocks after that. That caused this issue. Now I wish to run the configure command using CodeBlocks. Can some body please tell me how do I do that?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Building entire project using Makefile in codeblocks
« Reply #3 on: June 18, 2010, 12:42:27 pm »
Probably you could run it in a pre-build step.

See Project->Properties or in the Build options...
(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 raj

  • Single posting newcomer
  • *
  • Posts: 6
Re: Building entire project using Makefile in codeblocks
« Reply #4 on: June 18, 2010, 12:57:52 pm »
I tried running it as a pre-build step already. I gave "./configure" in the pre-build step. This is how I do in MinGW. I got the following message on the output window
--------------------------------------------------------------
Running project pre-build steps
./configure
Execution of './configure' in 'D:\projects\ffmpeg\test_app' failed.
Nothing to be done.
--------------------------------------------------------------
Is this the right way to do?


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Building entire project using Makefile in codeblocks
« Reply #5 on: June 18, 2010, 04:52:46 pm »
Where is your ./configure script?
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Building entire project using Makefile in codeblocks
« Reply #6 on: June 18, 2010, 05:23:37 pm »
How do you run ./configure on windows?
Or do you use msys or cygwin ?
C::B runs its pre- and postbuildsteps in windows shell and as far as I know whether a script can be executed or not depends on the file-ending or is the script called configure.bat or configure.cmd ?

Offline raj

  • Single posting newcomer
  • *
  • Posts: 6
Re: Building entire project using Makefile in codeblocks
« Reply #7 on: June 21, 2010, 10:27:18 am »
Where is your ./configure script?

configure file is in the same folder as Makefile.

Offline raj

  • Single posting newcomer
  • *
  • Posts: 6
Re: Building entire project using Makefile in codeblocks
« Reply #8 on: June 21, 2010, 10:37:26 am »
"How do you run ./configure on windows?
Or do you use msys or cygwin ?
C::B runs its pre- and postbuildsteps in windows shell and as far as I know whether a script can be executed or not depends on the file-ending or is the script called configure.bat or configure.cmd ?"


I didnt give any commands other than ./configure in the pre-build step. As you said, windows may not be recognizing this step as it is neither .cmd nor .bat. But even after executing ./configure seperately using MinGW, codeblocks compilation using Makefile is failing. The message shown is
make.exe: *** virtual memory exhausted.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

This doesnt look like a virtual memory problem. I have 4GB virtual memory. It shows the same message even after increasing to 6GB


This does nt