User forums > Using Code::Blocks

cbp2make - makefile generation tool

<< < (18/25) > >>

Kenneth McGregor:
I generated a makefile using this tool and it looks great, thanks! However when I "make"  the project, it does not find the wxWidgets libraries even though the `wx-config --libs` directive is there. It does find the wxWidgets include files using the `wx-config --cflags` directive. If I just cut and paste the output from wx-config --libs command run manually into the generated makefile at the line LIB =, everything works fine. It's like the `wx-config --libs` command does not get run at the linker step, even though it's there. The use of wx-config is a must for wxWidgets if one is planning on distributing an open source program.

Any suggestions?

Thanks,
Ken

oBFusCATed:

--- Quote from: ktmpal on December 13, 2012, 04:08:21 pm ---The use of wx-config is a must for wxWidgets if one is planning on distributing an open source program.

--- End quote ---
I'd rather say that learning autotools is a must when one wants to distribute open source programs.

On the problem: have you tried to for make to print debug output and see what commands get executed?

Kenneth McGregor:
I agree with your autotools comment. However, one really needs a makefile to use as a makefile.in template. And yes, I have used the -n option. The line in question is:

g++ -s `wx-config --libs` -L/usr/local/lib obj/Release/src/PicKit2Main.o obj/Release/src/PicKit2App.o obj/Release/src/HexTextCtrl.o obj/Release/src/HexRecord.o obj/Release/src/HexEditDlg.o obj/Release/src/HexEditCtrl.o obj/Release/src/DeviceFile.o obj/Release/src/DeviceDlg.o  -o bin/Release/pk2cmdUI

Kenneth McGregor:
The wxWidgets team solved this.

If you move the `wx-config --libs` to the end, just before the -o, it works.

The author of cbp2make should make note of this.

Thanks,
Ken

mirai:
AFAIK, a wxWidgets project is configured using a global compiler variable WX in terms of Code::Blocks IDE.
Dereferencing this variable with #WX is purely mechanical, and placing the macro in a command line is up to the author of a project.
cbp2make does not enforce the placement of the macro in any exact location, the tool just makes string substitutions.

Please correct me if I'm wrong at this point.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version