bonjour,
voilà ce que je fait :
tout marche, compilation, execution, sauf à la fin, ca m'affiche les element de ma table liste et puis, mega erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 mysqlpp::Connection con(false); con.connect("ListesDiffusion"); mysqlpp::Query query = con.query(); query << "select nom from Liste"; mysqlpp::Result res = query.store(); cout << "Listes :" << endl; if (res) { mysqlpp::Row row; mysqlpp::Row::size_type i; for (i = 0; row = res.at(i); i++) { //cout << '\t' << row.at(0) << endl; } }
là je vois pas, j'ai pris exactement l'exemple de mysql++.... de plus j'ai jamais eu ce type d'erreur que je comprends pas trop d'ailleur.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70 *** glibc detected *** ./serveur: free(): invalid pointer: 0x083ff8c8 *** ======= Backtrace: ========= /lib/libc.so.6[0x701124] /lib/libc.so.6(__libc_free+0x77)[0x70165f] /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x6679c9] /usr/lib/libmysqlpp.so.2(_ZN7mysqlpp3RowD1Ev+0x34d)[0x3944fd] ./serveur[0x804b003] ./serveur[0x804b1ca] ./serveur[0x804b481] ./serveur[0x804f96d] /lib/libpthread.so.0[0x5a6b80] /lib/libc.so.6(__clone+0x5e)[0x7689ce] ======= Memory map: ======== 00111000-00134000 r-xp 00000000 03:03 5668914 /lib/libm-2.3.5.so 00134000-00135000 r-xp 00022000 03:03 5668914 /lib/libm-2.3.5.so 00135000-00136000 rwxp 00023000 03:03 5668914 /lib/libm-2.3.5.so 00136000-00148000 r-xp 00000000 03:03 5442432 /usr/lib/libz.so.1.2.2.2 00148000-00149000 rwxp 00011000 03:03 5442432 /usr/lib/libz.so.1.2.2.2 00149000-00158000 r-xp 00000000 03:03 5668927 /lib/libresolv-2.3.5.so 00158000-00159000 r-xp 0000e000 03:03 5668927 /lib/libresolv-2.3.5.so 00159000-0015a000 rwxp 0000f000 03:03 5668927 /lib/libresolv-2.3.5.so 0015a000-0015c000 rwxp 0015a000 00:00 0 001b6000-001d8000 r-xp 00000000 03:03 5450672 /usr/lib/libmysqlclient.so.12.0.0 001d8000-001ec000 rwxp 00021000 03:03 5450672 /usr/lib/libmysqlclient.so.12.0.0 00241000-00253000 r-xp 00000000 03:03 5670514 /lib/libnsl-2.3.5.so 00253000-00254000 r-xp 00011000 03:03 5670514 /lib/libnsl-2.3.5.so 00254000-00255000 rwxp 00012000 03:03 5670514 /lib/libnsl-2.3.5.so 00255000-00257000 rwxp 00255000 00:00 0 00259000-0025e000 r-xp 00000000 03:03 5670515 /lib/libcrypt-2.3.5.so 0025e000-0025f000 r-xp 00004000 03:03 5670515 /lib/libcrypt-2.3.5.so 0025f000-00260000 rwxp 00005000 03:03 5670515 /lib/libcrypt-2.3.5.so 00260000-00287000 rwxp 00260000 00:00 0 002d1000-002d2000 r-xp 002d1000 00:00 0 00340000-0035a000 r-xp 00000000 03:03 5668882 /lib/ld-2.3.5.so 0035a000-0035b000 r-xp 00019000 03:03 5668882 /lib/ld-2.3.5.so 0035b000-0035c000 rwxp 0001a000 03:03 5668882 /lib/ld-2.3.5.so 0035c000-003d2000 r-xp 00000000 03:03 5439630 /usr/lib/libmysqlpp.so.2.0.7 003d2000-004c9000 rwxp 00076000 03:03 5439630 /usr/lib/libmysqlpp.so.2.0.7 005a1000-005af000 r-xp 00000000 03:03 5668895 /lib/libpthread-2.3.5.so 005af000-005b0000 r-xp 0000d000 03:03 5668895 /lib/libpthread-2.3.5.so 005b0000-005b1000 rwxp 0000e000 03:03 5668895 /lib/libpthread-2.3.5.so 005b1000-005b3000 rwxp 005b1000 00:00 0 005b3000-00693000 r-xp 00000000 03:03 5439706 /usr/lib/libstdc++.so.6.0.5 00693000-00698000 rwxp 000df000 03:03 5439706 /usr/lib/libstdc++.so.6.0.5 00698000-0069e000 rwxp 00698000 00:00 0 0069e000-007c1000 r-xp 00000000 03:03 5668891 /lib/libc-2.3.5.so 007c1000-007c3000 r-xp 00123000 03:03 5668891 /lib/libc-2.3.5.so 007c3000-007c5000 rwxp 00125000 03:03 5668891 /lib/libc-2.3.5.so 007c5000-007c7000 rwxp 007c5000 00:00 0 00c37000-00c3b000 r-xp 00000000 03:03 5668913 /lib/libnss_dns-2.3.5.so 00c3b000-00c3c000 r-xp 00003000 03:03 5668913 /lib/libnss_dns-2.3.5.so 00c3c000-00c3d000 rwxp 00004000 03:03 5668913 /lib/libnss_dns-2.3.5.so 00c6e000-00c77000 r-xp 00000000 03:03 5668916 /lib/libnss_files-2.3.5.so 00c77000-00c78000 r-xp 00008000 03:03 5668916 /lib/libnss_files-2.3.5.so 00c78000-00c79000 rwxp 00009000 03:03 5668916 /lib/libnss_files-2.3.5.so 00ddb000-00de4000 r-xp 00000000 03:03 5668917 /lib/libgcc_s-4.0.1-20050727.so.1 00de4000-00de5000 rwxp 00009000 03:03 5668917 /lib/libgcc_s-4.0.1-20050727.so.1 00de5000-00de6000 --xp 00de5000 00:00 0 00de6000-017e6000 rwxp 00de6000 00:00 0 08048000-08052000 r-xp 00000000 03:03 4818858 /root/workspace/projet_rezo/serveurtcp/serveur 08052000-08053000 rw-p 00009000 03:03 4818858 /root/workspace/projet_rezo/serveurtcp/serveur 08373000-0841d000 rw-p 08373000 00:00 0 [heap] b7e00000-b7e21000 rw-p b7e00000 00:00 0 b7e21000-b7f00000 ---p b7e21000 00:00 0 b7fcb000-b7fcf000 rw-p b7fcb000 00:00 0 b7fde000-b7fe1000 rw-p b7fde000 00:00 0 bfccb000-bfcde000 rwxp bfccb000 00:00 0 [stack] bfcde000-bfce1000 rw-p bfcde000 00:00 0 Abandon
A savoir : ce prog s'execute dans un thread (creer avec pthread.h)
Merci de votre aide
Partager