User forums > Using Code::Blocks

wx-config not effect

(1/2) > >>

wieniawski:
hi,

I am trying to setup a demo project of wxWidgets using CB.
in wx wiki https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide, it shows how to set wx-config in CB. And my result is as attachment
However, while I am building, the log is
g++ -Wall -g -I../../../../../opt/wxWidgets/include/wx-3.0 -c /home/schoenberg/work/wxWidgets/demo/demoApp.cpp -o obj/Debug/demoApp.o

It seems that the build setting is not effect.

Is there anyone knows why?

thx

Miguel Gimenez:
Is wx-config in your path?

I would put those commands in the "Other compiler options" and "Other linker options", respectively, not as flags.

You can create a wxiWidgets project using the wizard and then modify it as needed.

wieniawski:
wx-config is in my path.

I also tried 'Other complier options' and 'other linker options', still without success.

The build log shows that the flags doesnot effect, where I should see the flags in g++'s option, but there is none.

The build log is shown as below

-------------- Build: Debug in demo (compiler: GNU GCC Compiler)---------------

g++ -Wall -g -I../../../../../opt/wxWidgets/include/wx-3.0 -c /home/schoenberg/work/wxWidgets/demo/demoApp.cpp -o obj/Debug/demoApp.o
In file included from ../../../../../opt/wxWidgets/include/wx-3.0/wx/defs.h:27:0,
                 from ../../../../../opt/wxWidgets/include/wx-3.0/wx/event.h:14,
                 from ../../../../../opt/wxWidgets/include/wx-3.0/wx/app.h:19,
                 from /home/schoenberg/work/wxWidgets/demo/demoApp.h:13,
                 from /home/schoenberg/work/wxWidgets/demo/demoApp.cpp:10:
../../../../../opt/wxWidgets/include/wx-3.0/wx/platform.h:183:10: fatal error: wx/setup.h: 没有那个文件或目录
 #include "wx/setup.h"
          ^~~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

ollydbg:
Hi, I think you "wx-config.exe" does not work correctly.

Can you open windows command line window, and type the command


--- Code: ---wx-config.exe --cflags

--- End code ---

and see what is the output of the command.

I guess that it can't find the location of wx library.

You can try some other parameter of the argument, such as "--prefix" option to tell the command that where your wx library locates.

ollydbg:
About the image in your first post, I don't see the two options in my C::B. Do you use a special C::B?
For me, I usually add such kinds of command in the "Other compiler options".

Navigation

[0] Message Index

[#] Next page

Go to full version