Перейти до

Mysql


Рекомендованные сообщения

Возникла проблема при комплектации модуля.

На форуме поискал,ответа не нашел.

Собственно сабж..

 

[root@w001 mysql]# ./build

#############################################################################

Building STG Mysql Module 0.62 for Linux

#############################################################################

g++ -c mysql_store.cpp -g3 -Wall -fPIC -I ../../../../../include -I /usr/include/mysql -DLINUX

mysql_store.cpp:20:19: error: mysql.h: No such file or directory

mysql_store.cpp:21:20: error: errmsg.h: No such file or directory

mysql_store.h:128: error: Б─≤MYSQLБ─≥ has not been declared

mysql_store.h:129: error: Б─≤MYSQLБ─≥ has not been declared

mysql_store.h:132: error: Б─≤MYSQLБ─≥ has not been declared

mysql_store.h:133: error: Б─≤MYSQLБ─≥ has not been declared

mysql_store.h:135: error: ISO C++ forbids declaration of Б─≤MYSQLБ─≥ with no type

mysql_store.h:135: error: expected Б─≤;Б─≥ before Б─≤*Б─≥ token

mysql_store.cpp: In constructor Б─≤STORE_CREATOR::STORE_CREATOR()Б─≥:

mysql_store.cpp:121: error: cannot allocate an object of abstract type Б─≤MYSQL_STOREБ─≥

mysql_store.h:51: note: because the following virtual functions are pure within Б─≤MYSQL_STOREБ─≥:

../../../../../include/base_store.h:65: note: virtual int BASE_STORE::WriteUserConnect(const std::string&, uint32_t, double, const std::string&, const std::string&) const

../../../../../include/base_store.h:72: note: virtual int BASE_STORE::WriteUserDisconnect(const std::string&, const DIR_TRAFF&, const DIR_TRAFF&, const DIR_TRAFF&, const DIR_TRAFF&, double, const std::string&) const

../../../../../include/base_store.h:76: note: virtual int BASE_STORE::WriteDetailedStat(const std::map<IP_DIR_PAIR, STAT_NODE, std::less<IP_DIR_PAIR>, std::allocator<std::pair<const IP_DIR_PAIR, STAT_NODE> > >*, time_t, const std::string&, const std::string&) const

../../../../../include/base_store.h:115: note: virtual int BASE_STORE::WriteAction(const std::string&, uint32_t, const DIR_TRAFF&, const DIR_TRAFF&, double, const std::string&, int, const std::string&) const

mysql_store.cpp: At global scope:

mysql_store.cpp:228: error: Б─≤MYSQLБ─≥ has not been declared

mysql_store.cpp: In member function Б─≤int MYSQL_STORE::MysqlQuery(const char*, int*) constБ─≥:

mysql_store.cpp:232: error: Б─≤mysql_queryБ─≥ was not declared in this scope

mysql_store.cpp: In member function Б─≤virtual int MYSQL_STORE::ParseSettings()Б─≥:

mysql_store.cpp:251: error: Б─≤MYSQLБ─≥ was not declared in this scope

mysql_store.cpp:251: error: expected `;' before Б─≤mysqlБ─≥

mysql_store.cpp:252: error: Б─≤sockБ─≥ was not declared in this scope

mysql_store.cpp:253: error: Б─≤mysqlБ─≥ was not declared in this scope

mysql_store.cpp:253: error: Б─≤mysql_initБ─≥ was not declared in this scope

mysql_store.cpp:266: error: Б─≤mysql_real_connectБ─≥ was not declared in this scope

mysql_store.cpp:269: error: Б─≤mysql_errorБ─≥ was not declared in this scope

mysql_store.cpp:270: error: Б─≤mysql_closeБ─≥ was not declared in this scope

mysql_store.cpp:275: error: Б─≤mysql_select_dbБ─≥ was not declared in this scope

mysql_store.cpp:282: error: Б─≤mysql_errorБ─≥ was not declared in this scope

mysql_store.cpp:283: error: Б─≤mysql_closeБ─≥ was not declared in this scope

mysql_store.cpp:291: error: Б─≤mysql_errorБ─≥ was not declared in this scope

mysql_store.cpp:292: error: Б─≤mysql_closeБ─≥ was not declared in this scope

mysql_store.cpp:300: error: Б─≤mysql_closeБ─≥ was not declared in this scope

mysql_store.cpp: At global scope:

mysql_store.cpp:317: error: Б─≤MYSQLБ─≥ has not been declared

mysql_store.cpp: In member function Б─≤bool MYSQL_STORE::IsTablePresent(const std::string&, int*)Б─≥:

mysql_store.cpp:319: error: Б─≤MYSQL_RESБ─≥ was not declared in this scope

mysql_store.cpp:319: error: Б─≤resultБ─≥ was not declared in this scope

mysql_store.cpp:321: error: Б─≤mysql_list_tablesБ─≥ was not declared in this scope

mysql_store.cpp:324: error: Б─≤mysql_errorБ─≥ was not declared in this scope

mysql_store.cpp:325: error: Б─≤mysql_closeБ─≥ was not declared in this scope

mysql_store.cpp:329: error: Б─≤mysql_num_rowsБ─≥ was not declared in this scope

mysql_store.cpp:332: error: Б─≤mysql_free_resultБ─≥ was not declared in this scope

mysql_store.cpp: At global scope:

mysql_store.cpp:337: error: Б─≤int MYSQL_STORE::CheckAllTablesБ─≥ is not a static member of Б─≤class MYSQL_STOREБ─≥

mysql_store.cpp:337: error: Б─≤MYSQLБ─≥ was not declared in this scope

mysql_store.cpp:337: error: Б─≤sockБ─≥ was not declared in this scope

mysql_store.cpp:338: error: expected Б─≤,Б─≥ or Б─≤;Б─≥ before Б─≤{Б─≥ token

gmake: *** [mysql_store.o] Error 1

[root@w001 mysql]#

Ссылка на сообщение
Поделиться на других сайтах

dev - это не "через что", это "что". Это development-пакет для мускула, содержащий заголовочные файлы и симлинки на библиотеки.

Ссылка на сообщение
Поделиться на других сайтах

[root@w001 mysql]# yum install mysql-devel

 

Installed: mysql-devel.i386 0:5.0.45-6.fc8

Complete!

 

[root@w001 mysql]# ./build

#############################################################################

Building STG Mysql Module 0.62 for Linux

#############################################################################

g++ -c mysql_store.cpp -g3 -Wall -fPIC -I ../../../../../include -I /usr/include/mysql -DLINUX

In file included from mysql_store.cpp:29:

mysql_store.h:17: error: stray Б─≤#Б─≥ in program

mysql_store.h:17: error: expected unqualified-id before Б─≤+Б─≥ token

mysql_store.cpp: In constructor Б─≤STORE_CREATOR::STORE_CREATOR()Б─≥:

mysql_store.cpp:121: error: cannot allocate an object of abstract type Б─≤MYSQL_STOREБ─≥

mysql_store.h:50: note: because the following virtual functions are pure within Б─≤MYSQL_STOREБ─≥:

../../../../../include/base_store.h:65: note: virtual int BASE_STORE::WriteUserConnect(const std::string&, uint32_t, double, const std::string&, const std::string&) const

../../../../../include/base_store.h:72: note: virtual int BASE_STORE::WriteUserDisconnect(const std::string&, const DIR_TRAFF&, const DIR_TRAFF&, const DIR_TRAFF&, const DIR_TRAFF&, double, const std::string&) const

../../../../../include/base_store.h:76: note: virtual int BASE_STORE::WriteDetailedStat(const std::map<IP_DIR_PAIR, STAT_NODE, std::less<IP_DIR_PAIR>, std::allocator<std::pair<const IP_DIR_PAIR, STAT_NODE> > >*, time_t, const std::string&, const std::string&) const

../../../../../include/base_store.h:115: note: virtual int BASE_STORE::WriteAction(const std::string&, uint32_t, const DIR_TRAFF&, const DIR_TRAFF&, double, const std::string&, int, const std::string&) const

mysql_store.cpp: In member function Б─≤virtual int MYSQL_STORE::GetMessage(uint64_t, STG_MSG*, const std::string&) constБ─≥:

mysql_store.cpp:1867: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1875: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1883: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1891: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1899: error: Б─≤strtoi2Б─≥ was not declared in this scope

mysql_store.cpp:1907: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp: In member function Б─≤virtual int MYSQL_STORE::GetMessageHdrs(std::vector<STG_MSG_HDR, std::allocator<STG_MSG_HDR> >*, const std::string&) constБ─≥:

mysql_store.cpp:1967: error: Б─≤strtoull2Б─≥ was not declared in this scope

mysql_store.cpp:1972: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1976: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1980: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1984: error: Б─≤strtou2Б─≥ was not declared in this scope

mysql_store.cpp:1988: error: Б─≤strtoi2Б─≥ was not declared in this scope

mysql_store.cpp:1992: error: Б─≤strtou2Б─≥ was not declared in this scope

gmake: *** [mysql_store.o] Error 1

[root@w001 mysql]#

Ссылка на сообщение
Поделиться на других сайтах

А, стоп, я не обратил внимание. Это древний, совершенно устаревший модуль. Актуальная версия сейчас идет вместе с исходниками.

Ссылка на сообщение
Поделиться на других сайтах

Один фиг.

Вот модуль который был в стг.

 

[root@w001 mysql]# make

g++ -c mysql_store.cpp -O2 -I/usr/local/include -Wall -fPIC -I /usr/stg-2.405.9.8_STG-WEB/projects/stargazer/../../include -I /usr/local/include/mysql -DLINUX

mysql_store.cpp: In member function Б─≤virtual int MYSQL_STORE_SETTINGS::ParseSettings(const MODULE_SETTINGS&)Б─≥:

mysql_store.cpp:210: warning: overflow in implicit constant conversion

mysql_store.cpp: In member function Б─≤virtual int MYSQL_STORE::SaveUserConf(const USER_CONF&, const std::string&) constБ─≥:

mysql_store.cpp:1090: warning: format Б─≤%dБ─≥ expects type Б─≤intБ─≥, but argument 3 has type Б─≤long intБ─≥

mysql_store.cpp: In member function Б─≤virtual int MYSQL_STORE::SaveUserStat(const USER_STAT&, const std::string&) constБ─≥:

mysql_store.cpp:1137: warning: format Б─≤%dБ─≥ expects type Б─≤intБ─≥, but argument 6 has type Б─≤long intБ─≥

mysql_store.cpp:1137: warning: format Б─≤%dБ─≥ expects type Б─≤intБ─≥, but argument 7 has type Б─≤long intБ─≥

mysql_store.cpp:1137: warning: format Б─≤%dБ─≥ expects type Б─≤intБ─≥, but argument 8 has type Б─≤long intБ─≥

mysql_store.cpp: In member function Б─≤virtual int MYSQL_STORE::WriteAction(const std::string&, uint32_t, const DIR_TRAFF&, const DIR_TRAFF&, double, const std::string&, int, const std::string&) constБ─≥:

mysql_store.cpp:2286: warning: format Б─≤%dБ─≥ expects type Б─≤intБ─≥, but argument 6 has type Б─≤time_tБ─≥

mysql_store.cpp:2302: warning: format Б─≤%dБ─≥ expects type Б─≤intБ─≥, but argument 5 has type Б─≤time_tБ─≥

g++ mysql_store.o /usr/stg-2.405.9.8_STG-WEB/projects/stargazer/../../lib/libstg_locker.so -L/usr/local/lib -shared -L/usr/stg-2.405.9.8_STG-WEB/projects/stargazer/../../lib -Wl,-rpath,/usr/lib/stg -lmysqlclient_r -L /usr/local/lib/mysql -lstg_locker -o mod_store_mysql.so

/usr/bin/ld: cannot find -lmysqlclient_r

collect2: ld returned 1 exit status

make: *** [mod_store_mysql.so] Error 1

[root@w001 mysql]#

 

Тут ошибка в

/usr/bin/ld: cannot find -lmysqlclient_r //не могу найти бла бла бла...

collect2: ld returned 1 exit status //хз

Но че ему нада...

Ссылка на сообщение
Поделиться на других сайтах

А по подробнее?

 

Щас выдает только это.

 

g++ mysql_store.o /usr/stg-2.405.9.8_STG-WEB/projects/stargazer/../../lib/libstg_locker.so -L/usr/local/lib -shared -L/usr/stg-2.405.9.8_STG-WEB/projects/stargazer/../../lib -Wl,-rpath,/usr/lib/stg -lmysqlclient_r -L /usr/local/lib/mysql -lstg_locker -o mod_store_mysql.so

/usr/bin/ld: cannot find -lmysqlclient_r

collect2: ld returned 1 exit status

make: *** [mod_store_mysql.so] Error 1

 

Т.к некоторые пакеты например glib2-devel я установил.

Ссылка на сообщение
Поделиться на других сайтах

На свежую голову все сам сделал.

 

 

###############################################################################

# $Id: Makefile,v 1.1.1.1 2007/11/17 18:28:39 faust Exp $

###############################################################################

 

include ../../../../../Makefile.conf

 

PROG = mod_store_mysql.so

 

SRCS = ./mysql_store.cpp

 

#LIBS = -lconffiles -lstg_common

#LIBS = -lmysqlclient

LIBS = -lstg_locker

 

include ../../Makefile.in

 

SEARCH_DIRS += -I /usr/local/include/mysql

LDFLAGS += -lmysqlclient_r -L /usr/lib/mysql/ // а было хз какой путь.

Ссылка на сообщение
Поделиться на других сайтах

Создайте аккаунт или войдите в него для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать аккаунт

Зарегистрируйтесь для получения аккаунта. Это просто!

Зарегистрировать аккаунт

Вхід

Уже зарегистрированы? Войдите здесь.

Войти сейчас
  • Зараз на сторінці   0 користувачів

    Немає користувачів, що переглядають цю сторінку.

×
×
  • Створити нове...