Hi All,
I've done most of my work on VisualStudio and don't have much experience with gcc or g++. When I tried to compile a (ex. aprogram.cpp) this morning on my pc using cygwin, I got (aprogram.exe) when I tried to compile the same thing on my Ubuntu box I got (aprogram) w/o any extension. I am just wondering if someone be kind enough ...
I'm using g++ to compile and link a project consisting of about 15 c++ source files and 4 shared object files. Recently the linking time more than doubled, but I don't have the history of the makefile available to me. Is there any way to profile g++ to see what part of the linking is taking a long time?
Edit: After I noticed that the ...
I compiled 2 different binaries on the same GNU/Linux server using g++ version 4.2.3.
The first one uses:
GLIBC_2.0
GLIBC_2.2
GLIBC_2.1
GLIBCXX_3.4
GLIBC_2.1.3
The second one uses:
GLIBC_2.0
GLIBC_2.2
GLIBC_2.1
GLIBCXX_3.4.9
GLIBCXX_3.4
GLIBC_2.1.3
Why the second binary uses GLIBCXX_3.4.9 that is only available on libstdc++.so.6.0...
Don't ask why, but is there any way to suppress a failed linking error?
Such as:
undefined reference to BLANK
This is in GCC 3.4.6
...
So. I have a problem where I have two versions of GCC on a machine.
3.4.6 and 4.1
This is due to some dependency issues with a new piece of software. (requires glibc 4.1)
When I go to link this new software with the 4.1 libraries it links fine. However, when it comes to executing the software it can't find the library, because it is...
We have a new application that requires glibc 2.4 (from gcc 4.1).
The machine we have runs on has gcc 3.4.6.
We can not upgrade, and the application must be run on this machine.
We installed gcc 4.1, however, when it comes to compile time it is using all the includes, ect, from 3.4.6.
How do we get around this?
Any suggestions...
Whatever I try to compile in Cygwin I get the following output:
checking for mingw32 environment... no
checking for EMX OS/2 environment... no
checking how to run the C preprocessor... gcc -E
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler ...
Hey!
I'm getting the folling linker errors when compiling with gcc:
undefined reference to `SetStretchBltMode@8'
undefined reference to `StretchDIBits@52'
undefined reference to `SetDIBitsToDevi
Are these functions defined in the windows libs?
If so do they come installed with Vista, or do I need to install them, and if so where c...
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++.
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
int main(int argc, char **...
Hi,
I am trying to port a windows project that includes boost 1.37 and wxwidgets to the mac. It compiles ok, but the linker gives me a "file is not of required architecture for architecture ppc" error for libz.1.dylib and the same message as a warning a few other libraries. I also get a "duplicate dylib" warning for libz.1.dylib.
The ...
I want to suppress specific warnings from g++. I'm aware of the -Wno-XXX flag, but I'm looking for something more specific. I want some of the warnings in -Weffc++, but not all of them. Something like what you can do with lint - disable specific messages.
Is there a built in way in gcc to do this? Do I have to write a wrapper script?
...
How do I tell if gcc (more specifically, g++) is optimizing tail recursion in a particular function? (Because it's come up a few times: I don't want to test if gcc can optimize tail recursion in general. I want to know if it optimizes my tail recursive function.)
If your answer is "look at the generated assembler", I'd like to know ex...
Consider the following test program:
static void func(int a)
{
}
int main()
{
unsigned int b = 42;
func(b);
return 0;
}
Compiling it with gcc:
lol@mac:~/projects$ gcc -Wconversion testit.c
testit.c: In function âmainâ:
testit.c:11: warning: passing argument 1 of âfuncâ as signed due to prototype
lol@mac:~/projects$
...
I've been trying to move a project over from Xcode to Linux (Ubuntu x86 for now, but hopefully the statically-linked executable will run on an x86 CentOS machine? I hope I hope?). I have the whole project compiling but it fails at the linking stage-- it's giving me undefined references for all functions defined by IPP. This is probably...
diff fails as the assembly listing is filled with slightly different labels.
...
I'm trying to compile a simple program, with
#include <gtkmm.h>
The path to gtkmm.h is /usr/include/gtkmm-2.4/gtkmm.h
g++ doesn't see this file unless I specifically tell it -I /usr/include/gtkmm-2.4. My question is, how can I have g++ automatically look recursively through all the directories in /usr/include for all the header files...
When I try to compile a simple c++ file using Magick++ and cygwin, I keep getting this result:
$ g++ -o imageTest imageTest.cpp `GraphicsMagick++-config --cppflags --cxxflags --ldflags --libs`
g++: unrecognized option `-no-undefined'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -ldpstk
collect2:...
I have highly optimized piece of C++ and making even small changes in places far from hot spots can hit performance as much as 20%. After deeper investigation it turned out to be (probably) slightly different registers used in hot spots.
I can control inlineing with always_inline attribute, but can I control register allocation?
...
I've scanned over the (outdated) article that is the first hit on google about ARM cross-compiling. I've also seen the article about compiling OpenCV to the iPhone and the general cross compiling instructions there. My question is can I call the apparently already configured gcc/g++ in the iPhone developer package (which I already have i...
Hi,
I am a newbie in C++ programming.
When compiling I never use any option.
This is my day to day command:
g++ MyCode.cc -o MyCode
For safety practice what's the best option
to use?
...