Skip to content
Advertisement

Tag: g++

gcc 4.x not supporting x87 FPU math?

I’ve been trying to compile gcc 4.x from the sources using –with-fpmath=387 but I’m getting this error: “Invalid –with-fpmath=387”. I looked in the configs and found that it doesn’t support this option (even though docs still mention it as a possible option): Basically, I started this whole thing because I need to supply an executable for an old target platform

gmon.out is not created when executable forks another executable

I am using gprof for profiling. But gmon.out is not created when I fork another executable inside the main executable which is compiled with option -pg. Any idea how to resolve it. Answer But gmon.out is not created when I fork another executable It probably does. It simply has the same name as all the other gmon.out files. They just

g++ custom dynamic library linking error undefined symbol

Ok, I’m looking for a solution for 2 days now. I didn’t find anything to solve my problems. What is currently going on? So, I tried creating a dynamic library (.so) on Linux Mint Maya 13 with g++. foolib.h: foolib.cpp: main.cpp: I compiled these files with these instructions: libfoo.so: foo: Creating libfoo.so works without any errors, but foo throws undefined

Undefined references in makefile

Ok, ive read about 10 tutorials, but i keep getting errors all the time, i have 5 files, main.cpp class.cpp, class.h and functions.cpp and functions.h. All of those use functions from different objects meaning that functions in functions.cpp uses objects from classes.cpp. My makefile looks as follows I keeps telling me that it has undefined references. What am i missing?

How to view symbols in object files?

How can I view symbols in a .o file? nm does not work for me. I use g++/linux. Answer Instead of nm, you can use the powerful objdump. See the man page for details. Try objdump -t myfile or objdump -T myfile. With the -C flag you can also demangle C++ names, like nm does.

Dynamic Shared Library compilation with g++

I’m trying to compile the following simple DL library example code from Program-Library-HOWTO with g++. This is just an example so I can learn how to use and write shared libraries. The real code for the library I’m developing will be written in C++. If I compile the program with gcc it works fine. When I change the filename and

GCC and ld can’t find exported symbols…but they’re there

I have a C++ library and a C++ application trying to use functions and classes exported from the library. The library builds fine and the application compiles but fails to link. The errors I get follow this form: app-source-file.cpp:(.text+0x2fdb): undefined reference to `lib-namespace::GetStatusStr(int)’ Classes in the library seem to be resolved just fine by the linker, but free functions and

Advertisement