User forums > Using Code::Blocks
Using a makefile
Xorlium:
Hi.
I've been trying for oh so long to write a simple wxWidgets application, but with no success. I've succesfully compiled maaaany time wxWidgets, but I keep getting the same error when I try to run my app from within codeblocks (I posted a thread about it too, http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewtopic&t=269)
I noticed that I CAN compile and run the samples that come with wxwidgets, so I thought "hell, I'm just learning, I'll just replace those samples with my own code". And it works.
I've been writing my own wx apps using their own makefile, and it works.
But it's kind of boring to go to msys and type "make" and then run the program every time I make a small change.
So what I was thinking is... is there some way I can tell code::blocks to use the makefile there? That when I hit "compile & run" it just gives out the simple command: "make" and then runs the program?
If I change the compiler to "use makefiles", it tries to create a new makefile and then go from there. I don't want it to create a new makefile, I want it to use the makefile that's already there.
Thanks!
Profic:
What about "Use custom makefile" checkbox in something inside Advanced setup of Compiler plugin (or compler project options - can't say exactly where it is as I don't have C::B installed here)?
rickg22:
There is an option for "use custom makefile". I think it's in advanced or something... lemme check. Ah, yes. In menu: "Project"... select "properties".
There's a makefile, and then check the little box that says "generate custom makefile".
And don't worry. In upcoming beta8, the wxwidgets template projects do work now :-) I fixed them myself with the help of some of the users in here :-).
Xorlium:
Duh, thanks!
Now I've got a NEW problem, but now it's not codeblocks related.
If I type "make" in minSYS, it works perfectly. But if I type "mingw32-make" in the DOS prompt, it doesn't, it says:
--- Code: ---
../.././bk-deps g++ -c -o minimal_minimal.o -D__WXMSW__ -I../../../samples/minimal -DWXUSINGDLL -I../../../samples/minimal/../../samples -DWX_PRECOMP -DNO_GCC_PRAGMA -I../../lib/wx/include/msw-ansi-release-2.6 -I../../../include -O2 -mthreads -Wall -Wno-ctor-dtor-privacy ../../../samples/minimal/minimal.cpp
process_begin: CreateProcess((null), sh C:\wx\bldGLp\bk-deps g++ -c -o minimal_minimal.o -D__WXMSW__ -I../../../samples/minimal -DWXUSINGDLL -I../../../samples/minimal/../../samples -DWX_PRECOMP -DNO_GCC_PRAGMA -I../../lib/wx/include/msw-ansi-release-2.6 -I../../../include -O2 -mthreads -Wall -Wno-ctor-dtor-privacy ../../../samples/minimal/minimal.cpp, ...) failed.
make (e=2): El sistema no puede hallar el archivo especificado.
mingw32-make.exe: *** [minimal_minimal.o] Error 2
--- End code ---
Oh, "El sistema no puede hallar el archivo especificado" means "The system can't find the specified file".
What do I do now?
Can I tell codeblocks to use minSYS instead of the dos prompt?? Or what's wrong now?
rickg22:
Um, I guess the makefile only works for unix. OK here's the deal:
The wxWidgets template files are located at http://cvs.sourceforge.net/viewcvs.py/codeblocks/codeblocks/src/templates/win32/
Look for wxwidgets.cbp,wxwidgets.template and wxwidgets_static.cbp. Copy them to your codeblocks templates directory (under share/codeblocks).
Try to see if you can create new wxwidgets projects this way. Then you just have to add your files. Ta-da! :)
Navigation
[0] Message Index
[#] Next page
Go to full version