I have tried a lot but not able to find solution to cross compile the wxwidget ussing cross compiler
ignite#ubuntu:~/wxGTK-2.8.12/gtk-build$ sudo ../configure --host=arm-unknown-linux-gnueabi --build= i686-pc-linux --enable-unicode --prefix=/home/ignite/wxGTK_RPI_build^C
Can some one suggest on this link :---
http://forums.wxwidgets.org/viewtopic.php?f=19&t=36772&p=149948#p149948
Why the crosss compiler is not used . When i use to give make command on command line... i have even changed the host & build option at the time of configure :?:
Try using pacman -S wxgtk and see if that works.
Related
I have a CMake/CTest configuration set up and all works fine. The problem is that we have one test runner that has several versions of GCC in use and for this project I'll have to use non-standard location of the compiler. So for example instead of using standard /usr/bin/gcc I'll be using /mnt/data/gcc/8.4.0/bin/gcc.
For compilation point of view everything goes well when using -DCMAKE_C_COMPILER=/mnt/data/gcc/8.4.0/bin/gcc when creating the CMake project, but when I run ctest -T coverage CTest wants to use /usr/bin/gcov which is incompatible with the compiler. How can I set the CTest to use /mnt/data/gcc/8.4.0/bin/gcov instead?
I've tried to set the value of CTEST_COVERAGE_COMMAND in CTestConfig.cmake, but it does not have any effect.
I have a PXA270 board and I am trying to use gnu-unknown-linux-gnu-gcc to compile a file and put it in my board. I have done some steps as follow:
1.Unzip the file,
SHELL> sudo tar zxvf arm-linux-toolchain-bin-4.0.2.tar.gz -C/
2.Add one line to my ~/.bashrc,
export PATH=$PATH:/opt/microtime/pro/devkit/arm/pxa270/gcc-4.0.2-glibc-2.3.3/arm-unknown-linux-gnu/bin
3.Reload the ~/.bashrc
SHELL>source ~/.bashrc
After these steps are done, I try
SHELL>arm-unknown-linux-gnu-gcc -v
and it turn out that
bash: /opt/microtime/pro/devkit/arm/pxa270/gcc-4.0.2-glibc-2.3.3/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-gcc: No such file or directory
It is weird that I go to the path "/opt/microtime/pro/devkit/arm/pxa270/gcc-4.0.2-glibc-2.3.3/arm-unknown-linux-gnu/bin" and I do see the arm-unlnown-linux- gnu-gcc there.
So my problems are:
1.Why can't my cross compiler arm-unknown-linux-gnu-gcc work after these setting?
2.Is the cross compiler setting the same as gcc?
Thanks for your help!
Edit:
I've founded that the cross compiler file is for 32 bit and my vm is 64 bit.
To make some modification and it will work!
I'm trying to find a way to convert simple C code to NASM assembly. I have tried using objconv and downloaded and unzipped and built it since I am using a MAC; however, it doesn't seem to be working. I keep getting "-bash: objconv: command not found". Does anyone know another way or can help me solve the -bash error.
Bash is the program that takes the words you type in a terminal and launches other programs. If it is reporting an error, it is because it cannot find the program you want to run (at least in this case).
You need to either find a pre-packaged installation of objconv, or you need to do the work to "integrate" your copy of objconv yourself.
If you can identify the executable you want to run (probably called objconv) you need to add that to your path. The easiest way (if it is just for you) is to verify that your ~/.bashrc or ~/.bashprofile has a line that looks something like
PATH=$PATH:${HOME}/bin
Don't worry if it doesn't look exactly the same. Just make sure there's a ${HOME}/bin or ~/bin (~ is the short version of ${HOME}).
If you have that then type the commands
cd ~/bin
ln -fs ../path/to/objconv
and you will create a soft link (a type of file) in your home binary directory, and the program should be available to the command line.
If you create the file, and nothing above has any errors, but it is not available to the command line, you might need to set the executable bit on your "real" (not link) copy of objconv.
If this doesn't work, by now you should be well primed for a better, more specific question.
If you have gcc installed, try gcc -masm=intel -S source.c to generate assembly files in a syntax very similar to that of MASM.
I use waf as my build system and I want to compile a small C program using Postgres. I have included postgres.h in my program so I need to find the path to it in my wscript file. I know that I can get the path I need by running:
pg_config --includedir-server
which gives me:
/usr/include/postgresql/9.3/server
So I thought I could use something like this:
cfg.check_cfg(
path='pg_config',
package='',
uselib_store='PG',
args='--includedir-server',
)
And then build my program by:
bld.program(
source=['testpg.c'],
target='testpg',
includes=['.', '../src'],
use=['PQ', 'PG'],
)
But this fails with postgres.h: No such file or directory. I ran ./waf -v and confirmed that the proper -I flag is not being passed to gcc. My guess is this happens because pg_config does not add a -I prefix to the path it returns. Is there a way I can make waf to add the prefix, or make pg_config to add it?
Should pg_config had the standard output of pkg_config like programs (ie outputs something like -Ixxx -Iyyy), your code would work, has check_cfg parse this kind of output.
As there is no complicated parsing, you can go for:
import subprocess
includes = subprocess.check_output(["pg_config", "--includedir-server"])
includes.replace("\n", "")
conf.env.INCLUDES_PG = [includes]
And then use it:
bld.program(
source=['testpg.c'],
target='testpg',
use=['PG'],
)
See the library integration in the waf book. It explains the naming rule that make it works.
You can write a small plugin to ease the use :)
I am running a Eclipse for C/C++ using cygwin GCC. I need to get the library path of "libws2_32.a", which is in C:\cygwin\lib\w32api for me in windows. However I do not understand how this is translated into a cygwin-path.
I've tried stuff like:
/cygdrive/c/cygwin/lib/w32api
/lib/w32api
/usr/lib/w32api
Any ideas?
EDIT: update
Here's the make Eclipse log used for building, if it helps:
make all
Building target: Filesharing_core.dll
Invoking: Cygwin C Linker
gcc -L/cygdrive/c/cygwin/lib/w32api -shared -o"Filesharing_core.dll" ./src/test.o -llibws2_32.a
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llibws2_32.a
collect2: ld returned 1 exit status
make: *** [Filesharing_core.dll] Error 1
It's not a problem with the path; it's a problem with the name of the library (the -l option).
Where you have entered libws2_32.a, instead enter ws2_32.
See the GCC manual for how the -l option works.
Generally, when asking for help with programming, don't describe, but show. Don't describe what you're doing; don't describe what you think the error is. Instead, show exactly what you're doing, show the exact code (or a cut down version that exhibits the same problem), and show the exact error message.
This way others don't have to guess as to what's wrong, and you are more likely to receive an answer right away that solves your problem.
You can use the find utility to find the file, although it may take a while.
find / -name libws2_32.a -print
Edit: Based on your edit to the question, simply move -llibws2_32.a to before ./src/test.o.
The folder C:\Opt\Cygwin\lib\w32api or whatever it is in your system is simply /lib/w32api from within Cygwin. The library you're looking for is /lib/w32api/libws2_32.a.
But I'm not sure what you're trying to achieve. I guess your Eclipse in running in Windows, and not from a Cygwin'ized version of Java? Why are you using Cygwin GCC? Do you want to compile for Cygwin? If not, MinGW or TDM-GCC would be the tool to pick.
If you do want to compile for the Cygwin environment using Eclipse (a combination I haven't tried), then user experience like the following might be helpful:
http://www.benjaminarai.com/benjamin_arai/index.php?display=/eclipsecygwingcc.php
(I simply googled: eclipse cygwin gcc)