templates C++ with GCC
templates C++ with GCC
我正在尝试将c++ windows应用程序移植到Linux。我也有问题。我不知道如何正确地解释,但我会尽力的。
我有下一个代码:在头文件:
template<typename bidtype,typename chartype>
class pst_appointment_impl :
virtual public pst_appointment,
public pst_message_impl<bidtype,chartype>
{
...
}
在cpp文件(有我的问题):
...
template pst_appointment_impl<DWORD, char>;
template pst_appointment_impl<DWORDLONG,wchar_t>;
我不知道,它到底是如何调用的,但VS2010编译得很好。但是,在linux中,GCC在最后两行给出错误"Syntax error"。
有什么办法解决这个问题吗?
======================================================
(版)定义了所有的窗口类型。我在linux上使用Eclipse。当类型有问题时,它给出错误"cannot resolve name",但现在:"Syntax error"
您必须正确声明DWORD
和DWORDLONG
并使用
template class pst_appointment_impl<DWORD, char>;
template class pst_appointment_impl<DWORDLONG, wchar_t>;
相关文章:
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- 奇怪的结构&GCC&clang(void*返回类型)
- GCC本机矩阵运算库
- PowerPC ppc64le上的Gcc Woverloaded虚拟错误
- gcc和c++17的过载解析失败
- 数据成员SFINAE的C++17测试:gcc vs clang
- GCC对可能有效的代码抛出init list生存期警告
- 如何解决gcc编译器优化导致的centos双编译器设置中的分段错误
- 如何在 GCC 中启用 C/C++ "Conditional with Omitted Operand"(又名猫王操作员 "?:" )
- 在独立(裸金属)项目上使用std::tuple with arm none eabi gcc
- 不理解 gcc --with-local-prefix, --with-native-system-header-dir=
- Boost 1.49/1.50/1.51 ASIO with MinGW & GCC 4.7.0 中的转换错误
- gcc 未给出的 Clang 错误"attempted to construct a reference element in a tuple with an rvalue"
- GCC with Cygwin/Win7: missing syscall.h
- GCC with Windows SDK?
- compiling .cpp with gcc
- icpc C++11 with gcc stdlib
- templates C++ with GCC
- Eclipse CDT with MinGW GCC Make Error 127
- #pragma pack(show) with GCC