1)‘_wcsicmp’在此作用域中尚未声明

#ifdef WIN32
#define _tcsicmp        _wcsicmp
#else
#define _tcsicmp        wcscasecmp
#endif

2)_stricmp 在此作用域中尚未声明
#include <string.h>
将_stricmp改成strcasecmp

3)atoi的wchar版本不存在,
#define _ttoi       _wtoi
改成使用
#define _tcstol     wcstol

4)_atoi64
改成
atoll

5)‘itoa’在此作用域中尚未声明 或者 ‘_itoa’在此作用域中尚未声明
改成
sprintf(buf,"%d",n);

6)‘ultoa’在此作用域中尚未声明 或者 ‘_ultoa’在此作用域中尚未声明
改成
sprintf(buf,"%ul",n);

7)‘ltoa’在此作用域中尚未声明 或者 ‘_ltoa’在此作用域中尚未声明
改成
sprintf(buf,"%l",n);

8)‘_i64toa’在此作用域中尚未声明
改成

sprintf(buf,"%lld",n);

9)‘_ui64toa’在此作用域中尚未声明
改成
sprintf(buf,"%llu",n);

10)htonl,htons,ntohl,ntohs 在此作用域中尚未声明
包含
#include <arpa/inet.h>

11)‘__int64’没有命名一个类型
将__int64 改为 long long
32位为ILP32(int,long,pointer为32位),64位采用LP64(long,pointer为64),其他不变

12)‘struct in_addr’没有名为‘S_un’的成员
in_addr ip;
ip.S_un.S_addr = "127.0.0.1";
将ip.S_un.S_addr改为ip.s_addr,如下:
ip.s_addr = "127.0.0.1";

13)
std::vector<InternalObj<T>* >::iterator iter = used_obj_.begin();
 错误:expected ‘;’ before ‘iter’

std::vector<int> testv;
std::vector<int>::iterator iter1 = testv.begin();
以上两句语法正确。

C++规定,引用嵌套模版类的内部类型(如std::vector<T>::iterator),必须显示告诉编译器这是个type而不是variable。
例如
typename std::vector<InternalObj<T>* >::iterator iter = used_obj_.begin();

在VC或Intel Compiler中不会出现这样的问题。
但GCC编译器则会严格按照C++规定认为是个变量。
http://blog.csdn.net/tedious/article/details/6063910

14)
boost::timer
elapsed函数windows返回正确,linux下返回0

15)
‘memset’在此作用域中尚未声明
‘strlen’在此作用域中尚未声明
‘memcpy’在此作用域中尚未声明
 #include <string.h>
 
16)
 ‘free’在此作用域中尚未声明
 ‘malloc’在此作用域中尚未声明
#include <stdlib.h>

17)‘_vsnprintf’在此作用域中尚未声明
#include <stdarg.h>
将_vsnprintf改成vsnprintf

18)‘_snprintf’在此作用域中尚未声明
#include <stdarg.h>
将_snprintf改成snprintf

19)‘_access’在此作用域中尚未声明
#include <unistd.h>
将_access改成access

20)
typedef ACE_Hash_Map_Manager< CQQ_USERSERIAL, SUserAppDACItem*,ACE_Thread_Mutex> MAP_USER_APP_DAC;
ACE_Thread_Mutex在windows中和ACE_SYNCH_RECURSIVE_MUTEX效果相同,都为递归锁。
但在linux下
ACE_Thread_Mutex为非递归锁,同一个线程第二次进入则会死锁

21)
char p;
windwos下为:
typeid(p).name() 等于 "char"
linux下为:
typeid(p).name() 等于 "c"

unsigned long p
windwos下为:
typeid(p).name() 等于 "unsigned long"
linux下为:
typeid(p).name() 等于 "m"

unsigned short p
windwos下为:
typeid(p).name() 等于 "unsigned short"
linux下为:

typeid(p).name() 等于 "t"

22)
ssp_ep.cpp:65: 错误:跳转至标号‘redispatch_lab’
ssp_ep.cpp:37: 错误:从这里
ssp_ep.cpp:61: 错误:跳过‘CServerRegEvent* e’的初始化

gcc规定goto语句后不能定义变量,要定义需要用{}括起来

windows迁移linux问题集锦的更多相关文章

  1. windows迁移linux问题集锦[ZZ]

    http://blog.csdn.net/m_star_jy_sy/article/details/8482202 1)‘_wcsicmp’在此作用域中尚未声明 #ifdef WIN32#define ...

  2. 如丝般顺滑地从Windows迁移SQLServer数据库到Linux

    老鸟看过菜鸟的上一篇<MSSQL On Linux备份与还原>文章后,很满意,但是还是忍不住发问:"这篇文章讲的是MSSQL在Linux系统上的备份与还原,如果我之前是Windo ...

  3. Oracle数据库迁移--->从Windows到Linux

    I did a practice to migrate the oracle database from windows to linux operation system. The followin ...

  4. C语言集锦(二) 图像显示 Windows和Linux

    关于图像显示有很多库可以用,Windows下有GDI,GDI+,D3D等,Linux下有X Window和Wayland,此外还有OpenGL ,SDL等图形库以及各种GUI库. 了解最原始的方式,对 ...

  5. paip.java win程序迁移linux的最佳实践

    paip.java win程序迁移linux的最佳实践 1.class load路径的问题... windows哈第一的从calsses目录加载,,而linux优先从jar加载.. 特别的是修理了ja ...

  6. 全网最详细的Git学习系列之介绍各个Git图形客户端(Windows、Linux、Mac系统皆适用ing)(图文详解)

    不多说,直接上干货! 一.TortoiseGit - The coolest Interface to Git Version Control TortoiseGit 是 TortoiseSVN 的  ...

  7. SQL Server 2017 正式发布:同时支持 Windows 和 Linux(现在看下来,当年那德拉的“云优先,移动优先”是有远见的,而且是有一系列的措施和产品相配合的,只是需要一点时间而已。真是佩服!!)

    微软在去年 3 月首次对外宣布了 Linux 版的 SQL Server,并于今年 7 月发布了首个公开 RC 版.前几日在美国奥兰多召开的微软 Ignite 2017 大会上,微软宣布 SQL Se ...

  8. windows和linux执行class

    windows java -classpath .;lib/* com.Test linux java -classpath .:ib/* com.Test "."代表当前路径,这 ...

  9. windows和linux中搭建python集成开发环境IDE——如何设置多个python环境

    本系列分为两篇: 1.[转]windows和linux中搭建python集成开发环境IDE 2.[转]linux和windows下安装python集成开发环境及其python包 3.windows和l ...

随机推荐

  1. CodeForces - 1099F:Cookies (线段树)

    Mitya and Vasya are playing an interesting game. They have a rooted tree with n vertices, and the ve ...

  2. Beta周第7次Scrum会议(11/16)【王者荣耀交流协会】

    一.小组信息 队名:王者荣耀交流协会 小组成员 队长:高远博 成员:王超,袁玥,任思佳,王磊,王玉玲,冉华 小组照片 二.开会信息 时间:2017/11/16 17:03~17:17,总计14min. ...

  3. this语句的第三、四点

    接着上次的继续更新  up~` 第三点主体怎么找? 就在这个函数(方法)带不带“.”,如果函数和方法执行带“.”,那么this就指向“.”前面的对象,如果不带“.”就指向window. 第四点自执行函 ...

  4. djkstra nlogn

    #include<bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> usi ...

  5. 命令提示符操作及Java的特点

    day1_3 命令提示符的操作 GUI 图形化方式(可视化) CLI 命令行方式 (编程方式) dir 列出当前目录下文件及文件夹 md 创建文件夹 rd 删除文件夹(只能删除空文件夹) cd 进入指 ...

  6. day 53 js学习之

    ---恢复内容开始--- 1.昨日作业讲解 弄一个上图一样的选择器,可以全选,可以反选,取消 <!DOCTYPE html> <html lang="zh-CN" ...

  7. Why service collaboration needs choreography AND orchestration

    转自:https://blog.bernd-ruecker.com/why-service-collaboration-needs-choreography-and-orchestration-239 ...

  8. Architecture options to run a workflow engine

    This week a customer called and asked (translated into my own words and shortened): “We do composite ...

  9. Singer 学习四 可视化数据操作工具

    knots 是一款基于electron 开发的可视化UI界面,我们可以此工具进行方便的数据处理,注意工具使用了 docker 运行,需要安装docker 下载地址   https://github.c ...

  10. tailor 基础模版的使用

    对于需要实现共享的html 内容,tailor 提供了基础模版的概念,我们需要操作的就是添加slots ,以及使用slots 做为占位符 环境准备 使用现有的仓库代码 https://github.c ...