Problem is not related to Irrlich. I've got same results (segfault before main) with application compiled only with -lGL -lglut.
Yes, my CPU is 32-bit
Code: Select all
~/$ uname -a
Linux g 3.13.0-83-generic #127-Ubuntu SMP Fri Mar 11 00:26:47 UTC 2016 i686 i686 i686 GNU/Linux
Code: Select all
$ cat main3.cc
#include <stdexcept>
#include <GL/glut.h>
int main(int argc, char** argv){
if (argc != 1) {
throw std::runtime_error("err");
}
glutInit(&argc, argv);
return 0;
}
Code: Select all
$ g++ -g -O0 -Wall -Wextra -std=c++11 -o main main3.cc -lGL -lglut && ./main
Segmentation fault (core dumped)
Code: Select all
(gdb) r
Starting program: /home/j/github/space-game/main
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt full
#0 0x00000000 in ?? ()
No symbol table info available.
#1 0xb5d3dfe1 in init () at dlerror.c:177
No locals.
#2 0xb5d3e42e in _dlerror_run (operate=operate@entry=0xb5d3de10 <dlsym_doit>, args=args@entry=0xbffff160) at dlerror.c:129
result = <optimized out>
#3 0xb5d3de98 in __dlsym (handle=0x0, name=0xb7c9cfe5 "posix_memalign") at dlsym.c:70
args = {handle = 0x0, name = 0xb7c9cfe5 "posix_memalign", who = 0xb7c794bc, sym = 0x0}
result = <optimized out>
#4 0xb7c794bc in ?? () from /usr/lib/nvidia-304/libGL.so.1
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)