我有一个main.cpp,它包含一个struct,一些全局常量和一个main函数.
我运行doxygen,我在输出index.html中获得的唯一文档是我的struct.
我想doxygen将index.html文件记录到我的main()中.我做错了什么?
/// Definition of Pi
const auto Pi = 3.141592653589793238462643383279502884197169399;
/// \struct myStruc
/// \brief myStruc description
///
struct myStruc
{
/// Comments inside myStruc
};
/// \file
/// \brief Main function
/// \param argc An integer argument count of the command line arguments
/// \param argv An argument vector of the command line arguments
/// \return an integer 0 upon exit success
int main(int argc, char** argv)
{
/// Comments I would like to be documented in …Run Code Online (Sandbox Code Playgroud) 我的代码中定义了一个typedef
typdef unsigned int size_t;
Run Code Online (Sandbox Code Playgroud)
它与stddef相矛盾
typedef __SIZE_TYPE__ size_t;
Run Code Online (Sandbox Code Playgroud)
我不确定如何绕过这个但仍想在我的代码中保留size_t.
除了共享对象不存在之外,dlopen可能会出现什么原因?
在我的情况下,我知道共享对象存在,但是当我的程序使用dlopen加载它时,会出现段错误.我检查了我的lib文件夹,共享对象在那里,路径都是正确的.
handle = dlopen(libraryName.c_str(), RTLD_LAZY | RTLD_GLOBAL);
Run Code Online (Sandbox Code Playgroud)
gdb bt:
#0 0x00000000001b94f5 in ?? ()
#1 0x00007fffefd96db6 in __do_global_ctors_aux () from /usr/local/lib/MY_LIB2.so
#2 0x00007fffefcf82c3 in _init () from /usr/local/lib/MY_LIB2.so
#3 0x00007fffed69c6c8 in ?? () from /usr/local/lib/MY_LIB1.so
#4 0x00007ffff7de9dc4 in call_init () from /lib64/ld-linux-x86-64.so.2
#5 0x00007ffff7de9ef6 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#6 0x00007ffff7dedf43 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#7 0x00007ffff7de9c36 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8 0x00007ffff7ded7ca in _dl_open () from /lib64/ld-linux-x86-64.so.2
#9 0x00007ffff5c5af26 in dlopen_doit () from /lib64/libdl.so.2
#10 0x00007ffff7de9c36 …Run Code Online (Sandbox Code Playgroud) 找出C++类中所有调用的最佳方法是什么?我想不仅找到所有的调用,我想找出根本没有被调用的函数,所以我可以清理我的代码.我听说doxygen在生成调用图时可以创造奇迹,但它似乎只为我的构造函数生成调用图,并且当我有一堆我需要的时候它就像另一个函数一样.
我的所有课程功能都已记录在案.
我有一个定义如下的函数:
template < class T> T doSomething(const T value, const T value2, const T value3)
{
T temp = value;
//Do stuff
return temp ;
}
Run Code Online (Sandbox Code Playgroud)
在我的主要内容中,我将其称为如下:
doSomething(12.0, 23.0f, 2.0f);
Run Code Online (Sandbox Code Playgroud)
我收到错误,说没有匹配的呼叫功能doSomething(double, float, float).
我试图使用const_cast但它似乎没有解决问题.任何帮助,将不胜感激.
我一直以为c数组会比C++中的std :: array快,但是我根据访问速度做了一些基准测试,看起来std :: array更快.这是为什么?