Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Пытаюсь сделать helloworld спомощью сабж. Пример взял с вики, установил в kepler pkg-config-support , понаставил галочек, жму кнопку и получаю: ересь23:36:01 **** Incremental Build of configuration Debug for project test-cpp **** Info: Internal Builder is used for build g++ -I/usr/include/atkmm-1.6 -I/usr/include/atk-1.0 -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/gtk-3.0/unix-print -O0 -g3 -Wall -c -fmessage-length=0 -pthread -o main.o ../main.cpp g++ -shared -o libtest-cpp main.o -latkmm-1.6 -latk-1.0 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 -lcairo -lcairomm-1.0 -lfreetype -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lgdk-3 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lgtkmm-3.0 -lharfbuzz -lpixman-1 -latkmm-1.6 -latk-1.0 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 -lcairo -lcairomm-1.0 -lfreetype -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lgdk-3 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lgtkmm-3.0 -lpixman-1 -lGL -lQt5Bootstrap -lQt5Concurrent -lQt5Core -lQt5DBus -lQt5Gui -lQt5Network -lQt5OpenGL -lQt5Widgets -lQt5PlatformSupport -lQt5PrintSupport -lQt5Qml -lQt5QmlDevTools -lQt5Quick -lQt5QuickParticles -lQt5QuickTest -lQt5Sql -lQt5Test -lQt5Xml -latk-bridge-2.0 -lfontconfig -lz -lpng12 -lxcb-render -lxcb -lxcb-shm -lX11 -lXext -lXrender -lexpat -lform -lncurses -ltinfo -lgdk_pixbuf_xlib-2.0 -lgmodule-2.0 -lGLU -lgthread-2.0 -lharfbuzz -lICE -lcrypto -ldrm -ldrm_intel -ldrm_nouveau -ldrm_radeon -lexslt -lxslt -lxml2 -lffi -lkms -lpcre -lpcrecpp -lpcreposix -lssl -lvlc -lmenu -lncurses++ -lpanel -lpangoft2-1.0 -lpangox-1.0 -lpangoxft-1.0 -lXft -lSM -lsqlite3 -ltic -lwayland-client -lwayland-cursor -lwayland-server -lX11-xcb -lXau -lxcb-dri2 -lxcb-glx -lXcomposite -lXcursor -lXdamage -lXfixes -lXdmcp -lXi -lXinerama -lxkbcommon -lXrandr -lXxf86vm -lyaml /usr/bin/ld: main.o: перемещение R_X86_64_32 для «.rodata» не может использоваться при создании общего объекта; перекомпилируйте с -fPIC main.o: could not read symbols: Некорректное значение collect2: ошибка: выполнение ld завершилось с кодом возврата 1 ЧЯДНТ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.08.2013, 23:43 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Вот когда ты перестанешь считать процитировнное ересью и начнешь пытаться это понять - ты сразу же догадаешься что надо сделать. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 02:26 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
White Owl, Я не понимаю, что такое R_X86_64_32, «.rodata» и где прописать -fPIC. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 08:24 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Devider, а что такое "перекомпилируйте с -fPIC", понимаешь? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 11:58 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
DeviderWhite Owl, Я не понимаю, что такое R_X86_64_32, «.rodata» и где прописать -fPIC. .rodata -- (как я понимаю, это только догадка) сегмент данных READ ONLY (приложения). R_X86_64_32 -- это какой-то объектник или библиотека. И главное -- это всё не важно, у тебя есть чёткая инструкция. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 12:01 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Илья, а слабо вместо сарказма дать простой и доступный ответ? Какая инструкция? Какое значение считается некорректным? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 12:16 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
DeviderИлья, а слабо вместо сарказма дать простой и доступный ответ? Какая инструкция? Какое значение считается некорректным? Сарказма и не было. Тебе надо добавить при компиляции твоего приложения флаг компилятору -fPIC. Перекомпилировать приложение и заново собрать. Важно, что надо перекомпилировать. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 12:40 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Вот что это за ключики, если надо. GCC-fpic Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine. Such code accesses all constant addresses through a global offset table (GOT). The dynamic loader resolves the GOT entries when the program starts (the dynamic loader is not part of GCC; it is part of the operating system). If the GOT size for the linked executable exceeds a machine-specific maximum size, you get an error message from the linker indicating that -fpic does not work; in that case, recompile with -fPIC instead. (These maximums are 8k on the SPARC and 32k on the m68k and RS/6000. The 386 has no such limit.) Position-independent code requires special support, and therefore works only on certain machines. For the 386, GCC supports PIC for System V but not for the Sun 386i. Code generated for the IBM RS/6000 is always position-independent. When this flag is set, the macros __pic__ and __PIC__ are defined to 1. -fPIC If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. This option makes a difference on the m68k, PowerPC and SPARC. Position-independent code requires special support, and therefore works only on certain machines. When this flag is set, the macros __pic__ and __PIC__ are defined to 2. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 12:59 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
А вообще странно, что -fPIC не проставлен автоматом - это ведь обязательное требование для динамических библиотек под 64-битным Линуксом. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 13:01 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Так может он и собирает с 32-битными библиотеками, напр. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 13:04 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Ну и я подумал -- для начала лучше наверное прочитать README и сделать всё БЕЗ Eclipse. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 13:05 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Без эклипса все собиралось: Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 13:35 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Devider, Код: plaintext 1. Ты не пытаешься ли случайно собирать библиотеку вместо приложения ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 13:48 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Нет. Скажем так: я не пытаюсь, а вот что за эклипс не ручаюсь... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 14:41 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Devider, попробуй убрать -shared. Код: plaintext 1. 2. 3. 4. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 15:29 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
В общем, создал новый проект, все завелось с первой попытки. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 20:21 |
|
||
|
gtkmm + eclipse
|
|||
|---|---|---|---|
|
#18+
Получается это было виновато: Deviderпонаставил галочек :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.08.2013, 22:08 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=38355304&tid=2020059]: |
0ms |
get settings: |
9ms |
get forum list: |
12ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
71ms |
get topic data: |
9ms |
get forum data: |
3ms |
get page messages: |
53ms |
get tp. blocked users: |
1ms |
| others: | 11ms |
| total: | 175ms |

| 0 / 0 |
