libconfig

    2熱度

    1回答

    目前,我正在修改Raspberry Pi的C應用程序。 我建立應用程序使用此命令: make 現在我想用libconfig庫。 我有這樣的問題,下面 [email protected] ~/yyyyy $ make make --no-print-directory all-am CC tools/xxxxx.o CCLD tools/xxxxx tools/xxx

    0熱度

    1回答

    的我在在一個Debian盒完美運行下的程序。我被要求在CentOs 6.5上編譯和運行它。除了我嘗試從配置文件獲取值的部分之外,所有東西都完美編譯。代碼writen這樣的: char config_file[150]="file.conf"; config_t cfg; config_setting_t *ssl_xor_key; char xkey[256]; ssl_xor_key =

    3熱度

    1回答

    我在項目中使用libconfig,並且認爲使用我的嵌套CMakeLists.txt腳本編譯其餘代碼非常方便。下面是其中libconfig源文件所在的目錄內容: [config] -> ls CMakeLists.txt libconfig.c libconfig.h++ scanctx.h strbuf.c grammar.c libconfigcpp.c++ libconfig.hh s

    0熱度

    1回答

    我想在C++中使用libconfig運行我的第一個基本程序。我編了g++ testing.cpp -o testing。 #include <iostream> #include <cstdlib> #include <libconfig.h++> using namespace std; using namespace libconfig; int main(){ Co

    2熱度

    1回答

    我使用libconfig C api解析屬性文件。 我在前兩個屬性中獲得了空值。 test.properties x = "hello"; y = "world"; z = "test" ; config.c char * getValueByKey(char * file_name , char * key) { config_t cfg; config_set

    1熱度

    1回答

    我使用libconfig.h從配置文件中讀取參數,但是我在打印函數內部/外部的值時遇到問題。 example.h文件 int get_config(); example.c #include <stdio.h> #include <stdlib.h> #include <libconfig.h> #include "example.h" typedef struct Conf{

    2熱度

    1回答

    我從來沒有真正使用過配置文件,但我有興趣使用一個作爲我正在編寫的工程代碼的參數文件。 我不是一個專業的程序員,我花了兩天的時間試圖弄清楚如何使用libconfig導入一個簡單的列表或數組設置,我似乎無法得到任何地方。從example here粗略地工作,我能夠成功導入標設置,如 (importtest.cfg) mynumber = 1; 使用的主要功能像 Config cfg;

    1熱度

    1回答

    我正在編譯一個非常簡單的'Hello,world'使用libconfig。但是,當我編譯這樣的代碼: #include <iostream> #include <libconfig.h++> libconfig::Config cfg; std::string target = "World"; int main(void) { try { cfg.

    0熱度

    1回答

    我有此小的類,圍繞單個雙可變 class SensorTrainData { public: SensorTrainData() : trainingRangeFactor(2.0f) {} SensorTrainData(const double & _factor) { setFactor(_factor); } SensorTrainData

    -2熱度

    2回答

    我正在製作一個SDL遊戲,它使用libconfig從文件讀取一些設置。問題是我創建了一個名爲ClipList的類,其中包含一個std::vector<SDL_Rect>來存儲設置,但是當嘗試將SDL_Rect對象添加到該向量時,出於某種原因,push_back什麼都不做,最終得到一個空向量。 這是類: class ClipList { public: ClipList();