User forums > Using Code::Blocks
"Test6" does not support the current platform. Skipping...
stahta01:
--- Quote from: AE6RV on February 05, 2017, 12:01:19 am ---Hi jens,
I don't understand how that solves my problem. If I turn on all platforms, then one, and only one, executable is created, and that executable is a Linux executable, not a Windows executable. I thought the whole idea behind mingw32 was to create a Windows executable. So, none of the results I get make any sense.
--- End quote ---
CB only creates a single output (libraries can optionally have import/def files also created) for each CB target that is built.
If, you want more than one output then add more CB targets.
Tim S.
AE6RV:
--- Quote from: stahta01 on February 05, 2017, 12:09:18 am ---POST a full rebuild log!!!!!!
Tim S.
--- End quote ---
OK. I decided to start from scratch. This is a freshly generated Hello World program. I have the two Project->Properties->Platforms values (Project Settings and Build Targets) set to Windows. Here's the output of the build log. If that's not what you wanted, please let me know.
--- Code: ---"HelloWorld" does not support the current platform. Skipping...
"HelloWorld" does not support the current platform. Skipping...
Nothing to be done (all items are up-to-date).
--- End code ---
Here's main.cpp:
--- Code: ---#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
--- End code ---
Jenna:
Make sure you hose the correct output name on the "Build targets" tab for a cross-build (don't use automatic creation of the extension!) you have to specify the fullname including the ".exe" here and and , as I said, chose the correct platform.
The platform on the "Build targets"-tab is the platform of the build-system, not the platform you want to run the executable on.
I attach a minimal test-project based on the console-project of the wizard.
Note my cros-compiler is named "MinGW Cross" you need to fix this on your system.
That's the output of the file-command against the executables created by the virtual "All"-target:
--- Code: ---file /tmp/test/bin/*/*
/tmp/test/bin/Debug/test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=83afae287b48027353c1e0c825967752eb8222fa, not stripped
/tmp/test/bin/Release/test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=6869d09ad4e0187ef831524973dcbe8527d2e57a, stripped
/tmp/test/bin/WinDebug/test.exe: PE32 executable (console) Intel 80386, for MS Windows
/tmp/test/bin/WinRelease/test.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
--- End code ---
AE6RV:
--- Quote ---The platform on the "Build targets"-tab is the platform of the build-system, not the platform you want to run the executable on.
--- End quote ---
Then how do I get a program compiled for the platform I want it to run on? I thought the whole idea of a cross-compiler was to actually cross-compile. I admit it: I'm thick sometimes. But this makes no sense.
BlueHazzard:
https://en.wikipedia.org/wiki/Cross_compiler
--- Quote ---Then how do I get a program compiled for the platform I want it to run on? I thought the whole idea of a cross-compiler was to actually cross-compile. I admit it: I'm thick sometimes. But this makes no sense.
--- End quote ---
Use a cross compiler ;) (Note: codeblocks is not a compiler but an IDE, that works with many compiler)
This setting you mentioned is for codeblocks to know how to use one target on different platforms. If you want to crosscompile an application you have to set the correct compiler for the build target. Note: you can't run a windows program on linux if you crosscompile it for windows. A windows app can only run on windows (let out wine) and a linux program can only run on linux. SO if you use a mingw cross compiler on linux to compile for windows you set the compiler for the target to mingw and the platform setting for linux or all... And you can't run this compiled program on linux...
Simply look at the example of jens...
--- Quote ---Then how do I get a program compiled for the platform I want it to run on?
--- End quote ---
don't mess with cross compiler and use the system default compiler?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version