Cross-compiling with wxwidgets in codeblocks - linux

I searched around a fair amount and didn't see anyone else with this specific problem. I'm running Ubuntu 14.04 (amd64) and codeblocks 13.12 (from the ubuntu repositories). I've followed the directions here: "wxWidgets how to cross compile an application for windows from linux using codeblocks?" and am finding myself a bit stuck. I can successfully compile win32 CLI code and code that uses windows.h. If I create a wxwidgets project I can successfully compile it for linux, but if I try and compile it using the mingw compiler setup (per the instructions in that link) I get the following error:
unrecognized command line option "-Wno-unused-local-typedefs"
Any suggestions would be greatly appreciated!

Just remove this option, you're using a compiler too old to have it. As all -Wno-xxx options, this one just suppresses a warning, so removing it is harmless.

Related

How to solve "plugin failed code 127" compiling with nanopb

I am trying to compile a c++ code in an conan enviroment, here are details:
Ubuntu 18.04 WSL x86-64
Windowns 10 x64
python 3.7.5
protoc 3.19.4
The project is located at /mnt/c/project
The build directory is located at /mnt/c/build
The build occurs without any errors but when I try to compile with "ninja" it throws an error related to protoc-gen-nanopb, as you can see attached image.
I tried to install a new protobuf from its c++ source, i added the LD_LIBRARY_PATH that was missing, and I have also tried to clean everything and erase all the files and build again. Everything seems to fail. I believe it's related to compatibility between protobuf and my python version, but I am not sure.
Could someone help me understand how to solve it? I am new to ubuntu and stackoverflow and i am sorry if some information is missing. In this case, just ask.
Error 127

Get AVR with gcc running on fedora

im trying to solve this issue for a few days now and i cant find any solution.
I got myself an Atmega88A and i want to program it on fedora.
I tried to program C with gcc and that went well. But as i tried to include the avr/io.h, i always get the failure that it didnt found anything. I tried to get the new version of gcc, but that gives me an error too. Would it be enough to just download the avr/io.h library and implement it somewhere in my files? or is there any way to download this all together, including also all the other libraries that i need (e.g. util/delay.h)
You need to use a version of GCC that is specifically built to target AVR chips, you cannot just use the normal gcc executable for your system because it will produce the wrong kind of program. If you download a correctly-configured toolchain, then lines like #include <avr/io.h> should work automatically because the toolchain's default include search paths will be set up properly.
Many Linux distributions provide an avr-gcc package that you can just install with your package manager, including Fedora. You might have to install the avr-libc package to get the avr/io.h header.
If that doesn't work for some reason, you could try downloading Microchip's official AVR toolchain from this page:
http://www.microchip.com/avr-support/avr-and-arm-toolchains-(c-compilers)
What fixed this problem for me was this missing package: avr-gcc-c++. Running the command:
dnf install avr-gcc-c++
fixed it.

Beaglebone cross compilation

I am a freshman for the beaglebone. I need your help. I have installed the cross compiler toolchain arm-linux-gnueabi on my 64 bit xubuntu in eclipse as well as codeblocks environment. I have made a hello world program, cross compiled it in 3 ways using eclipse , using terminal,using Codeblocks. But when i run my executable file in Beaglebone i get the error saying cant load shared file libstdc++6.so.6:file not found.
Though i have already installed latest libstdc++6,ia32-libs and configured it. I am using ssh for logging into my Beaglebone. My all projects are pending because of this. Please suggest solution. I will be grateful to you. I have worked according to derek molloy c,c++ video but still got the error. I think it is because of difference between 32 bit and 64 bit in beaglebone and laptop respectively.
Have you really installed libstdc++6,ia32-libs on your BB? It looks like x86 lib. Take a look at Buildroot. It already provides BB target, so you can get your basic rootfs quite quickly. Then just add needed packages and you are done. The main benefit, when using such distro like BR, that you have all needed dependencies in your rootfs, that you burn on your microSD card. BR also provides Eclipse plugin.
I thought abi used was arm-linux-gnueabi but when i got the details of abi version running on my beagleboard i found it was arm-linux-gnueabihf. So i just replaced the compiler and then it was able to find all the files.

linux, freepascal, fp-ide: No debugger support availble. How to enable debugger?

How to enable debugger in fp-ide? I read somewhere that I should compile fp-ide from sources, but I don't know how to do this. Can someone help me?
Get the generic linux tar installer (fpc-2.6.0.x86_64-linux.tar) for FPC from http://www.freepascal.org/down/x86_64/linux-hungary.var It comes with a precompiled IDE with integrated debugger support and it works fine at least on 12.04 LTS.
I wasn't able to find a PPA for fp-ide, but I can describe how the CLI IDE is compiled on Arch Linux as documented in the repository. Do note that compiling will not enable the debugger in the CLI, as it seems to be an incompatibility between gdb and fp (fp-ide) according to e.g. this bug report in Debian. On Arch Linux, the fpc package also doesn't support the debugger in fp by design (it is explicitly disabled using the NOGDB flag).
Anyhow, here goes the compilation process:
Make sure you have FreePascal installed already, as you need it to compile the IDE
Download the source tarball
Extract the tarball to a location of your convenience and cd into that directory
Execute the following code from within your shell:
pushd fpcsrc/compiler
fpcmake -Tall
popd
make build
make -j1 install
# in Arch, the switch "NOGDB=1" is present in both make lines
That should compile the IDE and install it (you can even try to integrate it in dpkg by using checkinstall instead of make install, but take a look at the Arch PKGBUILD to see an example of what might be needed).
But why do you use the command line IDE fp instead of lazarus? With lazarus you can also make console applications and it offers much more features (e.g. working debug support).

Trouble with codeblocks installation on Ubuntu 9.10

I installed Code::Blocks on Ubuntu 9.10, but when I start it from terminal, it shows the following error:
relocation error: /usr/lib/libcodeblocks.so.0: symbol _Z18wxSafeConvertWX2MBPKw, version WXU_2.8.2 not defined in file libwx_baseu-2.8.so.0 with link time reference
What is wrong with it? It seems to me I have installed all necessary libraries. Any ideas?
P.S. I am a Linux noobie - so sorry if it is some kind of a well-known mistake.
The most likely problem is that libcodeblocks.so.0 was (apparently) linked against libwx_baseu-2.8.2.so, but the libwx_baseu you have installed is an earlier version 2.8.0.
Try locating libwx_baseu-2.8.2.so or some such and installing that.

Resources