Author Topic: "Test6" does not support the current platform. Skipping...  (Read 6954 times)

Offline AE6RV

  • Single posting newcomer
  • *
  • Posts: 6
"Test6" does not support the current platform. Skipping...
« on: February 03, 2017, 09:36:36 pm »
The error message in the subject says it all.  I tried going through the setup procedure in the "Howto - Cross Compiling in Linux using MingW32" sticky thread and I was able to get everything to go in, except for "gdb".  The version of Code::Blocks I have won't allow me to put the debugger name in manually.  Or at least I can't figure that part out.  But that's neither here nor there.  My real problem is "does not support..."  When I did a compile with "all" platforms selected, then I got a successful Linux program.  But, when I turned everything off except for Windows platform, I got the error on the subject line: "Test6" does not support the current platform. Skipping...

So, how do I get past this?  I've been working on this for several days, and am not getting any closer.  That makes me think that there is some fundamental idea that I'm not understanding.


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: "Test6" does not support the current platform. Skipping...
« Reply #2 on: February 04, 2017, 10:26:03 am »
Change the platform in the project properties, tab "Build targets" to all or whatever you run C::B on.

Offline AE6RV

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Test6" does not support the current platform. Skipping...
« Reply #3 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: "Test6" does not support the current platform. Skipping...
« Reply #4 on: February 05, 2017, 12:09:18 am »
POST a full rebuild log!!!!!!

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: "Test6" does not support the current platform. Skipping...
« Reply #5 on: February 05, 2017, 12:50:59 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.

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.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline AE6RV

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Test6" does not support the current platform. Skipping...
« Reply #6 on: February 06, 2017, 04:16:28 am »
POST a full rebuild log!!!!!!

Tim S.

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).


Here's main.cpp:
Code
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: "Test6" does not support the current platform. Skipping...
« Reply #7 on: February 06, 2017, 05:34:19 am »
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

Offline AE6RV

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Test6" does not support the current platform. Skipping...
« Reply #8 on: February 06, 2017, 05:41:49 am »
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.

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.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: "Test6" does not support the current platform. Skipping...
« Reply #9 on: February 06, 2017, 11:21:02 am »
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.
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?
don't mess with cross compiler and use the system default compiler?

Offline AE6RV

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Test6" does not support the current platform. Skipping...
« Reply #10 on: February 06, 2017, 04:17:32 pm »
In that case, I'm at a loss to understand the whole process of setting up a cross compiler using mingw32.  I have a Linux machine.  I have Windows customers.  And I have Linux customers.  The whole reason for mingw32 is to be able to compile on one machine and run on another, right?  I'm missing something critical here.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: "Test6" does not support the current platform. Skipping...
« Reply #11 on: February 06, 2017, 05:39:35 pm »
OK, i never cross compiled so i don't know if my description is 100% correct...

You have:
Linux machine with
compiler installed:
1) gcc
2) mingw-gcc

You have a project file with two targets:
A)
name "Linux"
compiler: "gcc"
target platform: linux
This target produces executable runnable on linux

B)
name "Windows"
compiler: "mingw-gcc"
target platform: linux
This target produces executable runnable on windows

Offline AE6RV

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Test6" does not support the current platform. Skipping...
« Reply #12 on: February 06, 2017, 05:43:59 pm »
Yes.  That's what I thought too.  But previous posters have insisted that the target platform selection is for the machine I'm running on.  That totally defeats the whole principle of cross-compiling.