我從ubuntu存儲庫安裝了tidy-dev,檢查了安裝路徑 - 沒關係(/ usr/include/tidy)。如何使用html tidy編譯C++程序C++
但我不能找到一個真正的標誌來編譯我的C++腳本包括http://users.rcn.com/creitzel/tidy/tidyx.h
整潔C++包裝tidyx.h你能幫助我嗎?
我的測試腳本文件名爲1.cpp,tidyx.h我放在附近。 1.cpp內容:
#include "tidyx.h"
int main()
{
}
我嘗試,但沒有良好:
$ gcc -I/usr/include/tidy 1.cpp -ltidy
In file included from 1.cpp:1:
tidyx.h: In constructor ‘Tidy::Source::Source()’:
tidyx.h:83: error: invalid conversion from ‘int (*)(ulong)’ to ‘int (*)(void*)’
tidyx.h:84: error: invalid conversion from ‘void (*)(ulong, byte)’ to ‘void (*)(void*, byte)’
tidyx.h:85: error: invalid conversion from ‘Bool (*)(ulong)’ to ‘Bool (*)(void*)’
tidyx.h:86: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h: In constructor ‘Tidy::Sink::Sink()’:
tidyx.h:123: error: invalid conversion from ‘void (*)(ulong, byte)’ to ‘void (*)(void*, byte)’
tidyx.h:124: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h: In member function ‘void Tidy::Buffer::Attach(void*, uint)’:
tidyx.h:165: error: invalid conversion from ‘void*’ to ‘byte*’
tidyx.h:165: error: initializing argument 2 of ‘void tidyBufAttach(TidyBuffer*, byte*, uint)’
tidyx.h: In member function ‘int Tidy::Document::Create()’:
tidyx.h:496: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h:496: error: initializing argument 2 of ‘void tidySetAppData(const _TidyDoc*, void*)’
tidyx.h: In member function ‘void Tidy::Document::SetAppData(ulong)’:
tidyx.h:511: error: invalid conversion from ‘ulong’ to ‘void*’
tidyx.h:511: error: initializing argument 2 of ‘void tidySetAppData(const _TidyDoc*, void*)’
tidyx.h: In member function ‘ulong Tidy::Document::GetAppData()’:
tidyx.h:512: error: invalid conversion from ‘void*’ to ‘ulong’
什麼是錯誤信息?在黑暗中拍攝會讓你忘記鏈接到整潔的圖書館(你只包括它的標題)? –