I am trying out some cross platform GUI environments and have am evaluating wxWidgets using codelite, but have gotten stuck at the very beginning.
I am very new at this, if its a stupid question please say so.
prerequisites are,
Using OSX Mountain Lion
Installed wxmac via home brew
Downloaded Codelite, created a wxWidgets Executable
I make a GUI project and try to install but get a bunch of missing header errors.
make[1]: wx-config: Command not found
g++ -c "xxxx/helloworld/main.cpp" -g -O0 -Wall -o ./Debug/main.o -I. -I.
g++ -c "xxxx/helloworld/MainFrame.cpp" -g -O0 -Wall -o ./Debug/MainFrame.o -I. -I.
In file included from xxxx/helloworld/MainFrame.h:3,
from xxxx/helloworld/MainFrame.cpp:1:
xxxx/helloworld/wxcrafter.h:4:25: error: wx/settings.h: No such file or directory
xxxx/helloworld/wxcrafter.h:5:27: xxxx/helloworld/main.cpp:1:20: error: wx/app.h: No such file or directory
xxxx/helloworld/main.cpp:2:22: error: wx/event.h: No such file or directory
In file included from xxxx/helloworld/MainFrame.h:3,
from xxxx/helloworld/main.cpp:3:
xxxx/helloworld/wxcrafter.h:4:25: error: wx/settings.h: No such file or directory
xxxx/helloworld/wxcrafter.h:5:27: error: wx/xrc/xmlres.h: No such file or directory
xxxx/helloworld/wxcrafter.h:6:27: error: wx/xrc/xh_bmp.h: No such file or directory
xxxx/helloworld/wxcrafter.h:7:22: error: wx/frame.h: No such file or directory
xxxx/helloworld/wxcrafter.h:8:22: error: wx/sizer.h: No such file or directory
xxxx/helloworld/wxcrafter.h:9:22: error: wx/panel.h: No such file or directory
xxxx/helloworld/wxcrafter.h:10:21: error: wx/menu.h: No such file or directory
xxxx/helloworld/wxcrafter.h:11:24: error: wx/toolbar.h: No such file or directory
xxxx/helloworld/main.cpp:4:22: error: wx/image.h: No such file or directory
In file included from xxxx/helloworld/MainFrame.h:3,
from xxxx/helloworld/main.cpp:3:
xxxx/helloworld/wxcrafter.h:14: error: expected class-name before '{' token
xxxx/helloworld/wxcrafter.h:16: error: ISO C++ forbids declaration of 'wxPanel' with no type
xxxx/helloworld/wxcrafter.h:16: error: expected ';' before '*' token
xxxx/helloworld/wxcrafter.h:17: error: ISO C++ forbids declaration of 'wxMenuBar' with no type
xxxx/helloworld/wxcrafter.h:17: error: expected ';' before '*' token
xxxx/helloworld/wxcrafter.h:18: error: ISO C++ forbids declaration of 'wxMenu' with no type
xxxx/helloworld/wxcrafter.h:18: error: expected ';' before '*' token
xxxx/helloworld/wxcrafter.h:19: error: ISO C++ forbids declaration of 'wxMenuItem' with no type
xxxx/helloworld/wxcrafter.h:19: error: expected ';' before '*' token
xxxx/helloworld/wxcrafter.h:20: error: ISO C++ forbids declaration of 'wxMenu' with no type
xxxx/helloworld/wxcrafter.h:20: error: expected ';' before '*' token
xxxx/helloworld/wxcrafter.h:21: error: ISO C++ forbids declaration of 'wxMenuItem' with no type
xxxx/helloworld/wxcrafter.h:21: error: expected ';' before '*' token
xxxx/helloworld/wxcrafter.h:22: error: ISO C++ forbids declaration of 'wxToolBar' with no type
xxxx/helloworld/wxcrafter.h:22: error: expected ';' before '*' token
xxxx/helloworld/wxcrafter.h:25: error: 'wxCommandEvent' has not been declared
xxxx/helloworld/wxcrafter.h:26: error: 'wxCommandEvent' has not been declared
xxxx/helloworld/wxcrafter.h:29: error: expected `)' before '*' token
xxxx/helloworld/wxcrafter.h: In member function 'virtual void MainFrameBaseClass::OnExit(int&)':
xxxx/helloworld/wxcrafter.h:25: error: request for member 'Skip' in 'event', which is of non-class type 'int'
xxxx/helloworld/wxcrafter.h: In member function 'virtual void MainFrameBaseClass::OnAbout(int&)':
xxxx/helloworld/wxcrafter.h:26: error: request for member 'Skip' in 'event', which is of non-class type 'int'
my guess would be to specify the folder that includes all of these, but am not sure where to find them.
Well to be honest I'm not sure if thats the right action at all, maybe I need to install or set something up, perhaps I shouldn't use homebrew and install by source
Added
Thanks to VZ. I got it working, had to change some of the build settings, as bellow
Settings>BuildSettings>gnu g++>Tools>PATH Environment Variables set to
/usr/local/bin:/usr/bin:/bin
Set all the Compiler, Linker, Shared Object Linker settings to absolute path, so change
g++
to
/usr/bin/g++
and so forth.
This surely changes per setup of the machine so it probably shouldn't be followed to the letter, but should get you started.
hope this helps.
The error you need to fix is the very first one:
make[1]: wx-config: Command not found
Make sure wx-config is in your path. Do not specify the include paths manually, this is not the right way to do it, you must use wx-config.
You probably would need to download wxWidgets source code distribution (2.9.4 from this page or latest source code from SVN), unpack it, build libs from the source code
./configure && make && sudo make install
then reboot and after that try to build the Codellite.
Related
I have a CMake project that I compile with gcc on Linux. Because of how CMake invokes gcc in subdirectories, gcc outputs only the base file name when it encounters an error:
[100%] Building C object path/file.c.o
cd /absolute/path && /usr/bin/cc [...]
file.c: In function ‘foo’:
file.c:85:5: error: unknown type name ‘bar’
How can I see the full file path in the gcc output? Any solution through either CMake or gcc configuration would be acceptable. I want to see something like this:
/absolute/path/file.c:85:5: error: unknown type name ‘bar’
or
path/file.c:85:5: error: unknown type name ‘bar’
(preferrably the former).
I found the problem. Showing the full path should have been the default behaviour requiring no extra configuration. The compiler was showing only the file name because of a #line pre-processor directive in my source file.
I'm triing to compile the superoptimizer on windows. (https://github.com/bonzini/superopt)
Unfortunatly my knowledge of make is very limited. I tried:
make CPU=-D386 superopt
Which gives me the error:
cc superopt.c -o superopt
process_begin: CreateProcess(NULL, cc superopt.c -o superopt, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [superopt] Fehler 2
After setting the compiler to gcc manually with:
make CPU=-D386 superopt CC=gcc
I get the following error:
gcc superopt.c -o superopt
In file included from superopt.c:27:0:
superopt.h:104:2: error: #error You have to choose target CPU type (--with-arch).
#error You have to choose target CPU type (--with-arch).
^
In file included from superopt.h:130:0,
from superopt.c:27:
longlong.h:1465:14: error: unknown type name 'UQItype'
extern const UQItype __clz_tab[];
^
superopt.c:32:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [superopt] Fehler 1
It seems it does't properly selects i386.
Any hints would be greatly appreciated.
That is not the source code of
GNU superopt. It is the source code of someone's project
to patch GNU superopt, last updated 2008, and seemingly
abandoned a hard-hat area.
This is the source code of
GNU superopt. Extract the tarball and build as you have attempted
with:
make CC=gcc CPU=-DI386 superopt
Note: I386, not 386.
You will see warnings like:
warning: incompatible implicit declaration of built-in function 'foo'
because the 20 yearold C code does not diligently include the standard
headers that prototype the standard functions that it calls, but superopt will build successfully.
I’m trying to develop some plotting apps for Windows platform. I’m using Debian and built wxWidgets for cross-compiling as described here.
With MinGW compiler it works perfect and I have no problem with creating Win32 apps under Linux. But I faced some troubles with wxFreeChart.
I run ./configure --host=i386-mingw32 --with-wx-config=/usr/local/i586-mingw32/bin/wx-config
Then I run 'make' and getting error about
unrecognized command line option ‘-mthreads
Full output here:
~/dev/freechart/bk-deps g++ -c -o wxfreechart_lib_legend.o -I./include -I/usr/local/i586-mingw32/lib/wx/include/i586-mingw32msvc-msw-unicode-static-3.0 -I/usr/local/i586-mingw32/include/wx-3.0 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__ -mthreads -O2 ./src/legend.cpp
g++: error: unrecognized command line option ‘-mthreads’
make: *** [wxfreechart_lib_legend.o] Error 1
The only advice I've seen was to remove '-mthreads' from code, but I have no idea where is it(
Problem described above is solved, but still no luck with building wxFreeChart.
Next errors I get were about some additional libs, which I finally solved by
CPPFLAGS="-I/usr/i586-mingw32msvc/include -I~/dev/wxWidgets-3.0.2/include" ./configure --host=i386-mingw32 --with-wx-config=/usr/local/i586-mingw32/bin/wx-config
I'm not sure that including .h from source folder ~/dev/wxWidgets is a good idea, but at least it solved some problems.
Now make crashing with messages like:
In file included from /usr/local/i586-mingw32/include/wx-3.0/wx/wx.h:17:0,
from ./include/wx/wxfreechartdefs.h:20,
from ./include/wx/legend.h:13,
from ./src/legend.cpp:10:
/usr/local/i586-mingw32/include/wx-3.0/wx/list.h: In constructor ‘wxListKey::wxListKey(const wxString&)’:
/usr/local/i586-mingw32/include/wx-3.0/wx/list.h:381:40: error: invalid use of incomplete type ‘class wxString’
or
/usr/local/i586-mingw32/include/wx-3.0/wx/containr.h:247:13: error: incomplete type ‘wxNavigationEnabled<wxControl>::BaseWindowClass {aka wxControl}’ used in nested name specifier
make: *** [wxfreechart_lib_legend.o] Error 1
I am following http://openrisc.net/toolchain-build.html to build gcc toolchain for openrisc or32.
I'm doing 'building by hand' flow and had passed
binutils
stage 1 gcc
install linux headers
and was to do 'compile uClibc' which is composed of commands below.
$ git clone git://openrisc.net/jonas/uClibc
$ cd uClibc
$ make ARCH=or32 defconfig
$ make PREFIX=${SYSROOT}
$ make PREFIX=${SYSROOT} install <br>
when I run 'make ARCH=or32 defconfig', I get this error.
CC libpthread/linuxthreads.old/attr.o
In file included from libpthread/linuxthreads.old/internals.h:30:0,
from libpthread/linuxthreads.old/attr.c:26:
./libpthread/linuxthreads.old/sysdeps/or32/pt-machine.h: In function 'testandset':
./libpthread/linuxthreads.old/sysdeps/or32/pt-machine.h:41:8: error: '__NR_or1k_atomic' undeclared (first use in this function)
./libpthread/linuxthreads.old/sysdeps/or32/pt-machine.h:41:8: note: each undeclared identifier is reported only once for each function it appears in
In file included from libpthread/linuxthreads.old/../linuxthreads.old_db/proc_service.h:20:0,
from libpthread/linuxthreads.old/../linuxthreads.old_db/thread_dbP.h:9,
from libpthread/linuxthreads.old/internals.h:32,
from libpthread/linuxthreads.old/attr.c:26:
./include/sys/procfs.h: At top level:
./include/sys/procfs.h:32:21: fatal error: asm/elf.h: No such file or directory
compilation terminated.
make: *** [libpthread/linuxthreads.old/attr.o] Error 1
Has anybody had same problem? I use CentOS 6.4.
gcc searches for the header file from the system in the order
/usr/local/include
libdir/gcc/target/version/include (libdir was /usr/lib in my case)
/usr/target/include
/usr/include
my system had sys/syscall.h under /usr/include so that file was used when sys/syscall under uClib/include should have been used. So I added -nostdinc so that gcc doesn't search the standard include path. Now it became
make PREFIX=${SYSROOT} -nostdinc
and it works!
The following command was also modified
make PREFIX=${SYSROOT} -nostdinc install
Cheers!
I am trying to compile cachedb_cassandra module to integrate my opensips with cassandra. However, on compiling , I am getting flow of
make[1]: Entering directory `/home/himanshu/opensips-1.10.0-tls/modules/cachedb_
Compiling cachedb_cassandra_dbase.cpp
Compiling cassandra_constants.cpp
cc1plus: warning: command line option "-Wold-style-definition" is valid for C/ObjC but not for C++
Compiling cassandra_types.cpp
cc1plus: warning: command line option "-Wold-style-definition" is valid for C/ObjC but not for C++
Compiling Cassandra.cpp
cc1plus: warning: command line option "-Wold-style-definition" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wold-style-definition" is valid for C/ObjC but not for C++
In file included from cassandra_constants.h:9,
from cassandra_constants.cpp:6:
cassandra_types.h:9:20: error: Thrift.h: No such file or directory
cassandra_types.h:10:35: error: TApplicationException.h: No such file or directory
cassandra_types.h:11:32: error: protocol/TProtocol.h: No such file or directory
cassandra_types.h:12:34: error: transport/TTransport.h: No such file or directory
.
.
.
There are many more errors after this, but I think that could be due to missing .h files error.
Opensips version is 1.10 . Thrift is installed.
I tried making change in Makefile but got same result. Is there anything I am missing. Please help.
Thanks