News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

wx-config not effect

Started by wieniawski, March 14, 2023, 01:10:00 PM

Previous topic - Next topic

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


wx-config.exe --cflags


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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

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".
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

stahta01

To wieniawski: Please post your Operating System (OS) name?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]