No realize class procedure defined

I suspected the problem could be on the libXt since the XtRealizeWidget symbol is defined in that library. I looked at it using nm but all seemed well: $ nm -D /usr/lib/libXt.so |grep XtRealizeWidget 02b39870 T XtRealizeWidget The “T” means the symbol is in the text (code) section of the object files that compose the … Read more

undefined reference to `log’

I don’t know what the reason is, but if you move -lm to the end, it will compile. $ cc -o randomselection rfc3797.c MD5.c -lm rfc3797.c: In function ‘getinteger’: rfc3797.c:183:3: warning: format not a string literal and no format arguments [-Wformat-security]

Include binary file with GNU ld linker script

You could try using objcopy to convert it to a normal object you can link in, and then reference its symbols in the linker script like you would do to a normal object. From the objcopy manual page: -B bfdarch –binary-architecture=bfdarch Useful when transforming a raw binary input file into an object file. In this … Read more

Strange warnings from the linker (ld) [duplicate]

The solution proposed by xcode with boost : linker(Id) Warning about visibility settings doesn’t work: “Symbols hidden by default” has always been “YES”. This has less to do with being set to “YES”, and more to do with being set to the same value across all projects. Libs/projects that depend on other libs need to … Read more

error while loading shared libraries: libboost_system.so.1.45.0: cannot open shared object file: No such file or directory

The library cannot be found. Libraries are by default looked for in /lib, /usr/lib and the directories specified by /etc/ld.so.conf. Usually system libraries (like boost, if you installed it via your package manager) are located in /usr/lib, but it’s probably not your case. Where are your boost libraries located on your system? Did you compile … Read more

How to make gcc link strong symbol in static library to overwrite weak symbol?

I am puzzled by the answer given by max.haredoom (and that it was accepted). The answer deals with shared libraries and dynamic linking, whereas the question was clearly about the behavior of static linking using static libraries. I believe this is misleading. When linking static libraries, ld does not care about weak/strong symbols by default: … Read more

How do I determine the fastest link order?

As an alternative, why not try compiling your libraries to shared libraries rather than static libraries? Where I work, one large projects link time was around 6 minutes, this was for only 5 libraries! My solution was (for a debug version), create .so files alphabetically (libA.so, libB.so etc) so each indivdual link wasn’t too long, … Read more

Segfault on declaring a variable of type vector

Given the point of crash, and the fact that preloading libpthread seems to fix it, I believe that the execution of the two cases diverges at locale_init.cc:315. Here is an extract of the code: void locale::_S_initialize() { #ifdef __GTHREADS if (__gthread_active_p()) __gthread_once(&_S_once, _S_initialize_once); #endif if (!_S_classic) _S_initialize_once(); } __gthread_active_p() returns true if your program is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)