After installing a new build machine, I found out it came with 6.0.10 of the standard C++ library
-rw-r--r-- 1 root root 1019216 2009-01-02 12:15 libstdc++.so.6.0.10
Many of our target machines, however, still use an older version of libstdc++, for example:
-rwxr-xr-x 1 root root 985888 Aug 19 21:14 libstdc++.so.6.0.8
Apparently ...
I'm trying to use someone else's Makefile to complile a very simple c++ library. The makefile is as follows:
JNIFLAGS=-O2 -pthread -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
all:
rm -f ../dist/libUtils.so
g++ $(JNIFLAGS) -c -m32 -o com_markets_utils_dates_NativeTime.o com_markets_utils_dates_Nativ...
I understand Linux ships with a c library, which implements the ISO C functions and system call functions, and that this library is there to be linked against when developing C. However, different c compilers do not necessarily produce linkable code (e.g. one might pad datastructures used in function arguments differently from another). ...
To see what memory map regions a running program contains, I write a simple C program to read data from /proc/self/maps:
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
int main() {
char buf[1024];
int fd;
ssize_t n;
fd = open("/proc/self/maps", O_RDONLY);
if (fd ...
I would like to replace the global operator new() and operator delete() (along with all of their variants) in order to do some memory management tricks. I would like all code in my application to use the custom operators (including code in my own DLLs as well as third-party DLLs). I have read things to the effect that the linker will c...
Hello everyone
I am having some trouble compiling a programm with gcc on windows which was initially developed with Visual Studio. So far I was able to resolve almost all problems like missing header files and such, but now I am stuck at one last thing: gcc fails to link to one of the third party libs my program uses (FlyCapture2.lib). ...
Can anybody please help me to configure Visual Studio 2005 (if that's the solution to the problem). I'm using some external libs and I'm getting this error:
1>Compiling...
1>main.cpp
1>c:\documents and settings\mz07\desktop\project\vs8test1\vs8test1\main.cpp(99) : warning C4996: 'getch' was declared deprecated
1> c:\program files...
I've built a program that uses mkl and ipp that runs on mac and linux. I'm now building that program for Windows using cygwin and gcc, and can't get it to link.
The errors I'm getting are:
Warning: .drectve
-defaultlib:"uuid.lib" ' unrecognized
../../../bin/libMath.a(VectorUtility.cxx.o):VectorUtility.cxx:(.text+0x95):
undefi...
Hello,
I am using gcc to compile a program which I need to link to a C library with non-standard name; it is called stuff.a instead of libstuff.a.
I cannot change the name of the file (permission issues).
I don't want to include the full library (i.e. using gcc program.c stuff.a -oprogram)
I want to compile as gcc program.c -L/path...
I'm working on a project that's link against SOCI, which comes as both static and dynamic libraries. I'd like CMake to choose the static version when available, and dynamic otherwise. Is there a reasonable way to do this in CMake? I've come up with nothing looking through the docs so far.
...
Hi. I'm using visual studio 2003 and I'm getting the following linking error in my project:
Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj)
C:\Documents and Settings\mz07\Desktop\project\H...
I'm using Visual Studio 2008.
I have a solution with two projects. One builds a DLL, which is my "production code". The other builds a console app exe, which is my unit test suite.
For my unit test project, I have listed as linker inputs the names of the source modules from the DLL. I.e., I have a DLLMain.cpp in the DLL project, and...
I am getting linker errors that suggest I am not using #ifndef and #define.
1>TGALoader.obj : error LNK2005:
"struct TGA tga" (?tga@@3UTGA@@A)
already defined in main.obj
1>TGALoader.obj : error LNK2005:
"struct TGAHeader tgaheader"
(?tgaheader@@3UTGAHeader@@A) already
defined in main.obj 1>TGALoader.obj :
error LNK2005...
I am trying to figure out a way of embedding a resource into a static library for linking with C source using the gcc toolchain. The equivalent of a Windows DLL in which resources are embedded. Can this be done with a linux static library?
In short, would for example, doing this
cat someresourcedata.txt > mylib.a and to be able to lin...
I've been trying to write a small application which will work with mysql in C++. I am using MySQL server 5.1.41 and MySQL C++ connector 1.0.5. Everything compiles fine when i write console applications, but when i try to compile windows forms application exactly the same way (same libraries, same paths, same project properties) i get thi...
I've always been curious about
How exactly the process looks in memory?
What are the different segments(parts) in it?
How exactly will be the program (on the disk) & process (in the memory) are related?
My previous question: http://stackoverflow.com/questions/1966920/more-info-on-memory-layout-of-an-executable-program-process
In m...
So I found out that C(++) programs actually don't compile to plain "binary" (I may have gotten some things wrong here, in that case I'm sorry :D) but to a range of things (symbol table, os-related stuff,...) but...
Does assembler "compile" to pure binary? That means no extra stuff besides resources like predefined strings, etc.
If C co...
Hi there,
When I include "Python.h" from Python 2.5 in a C++ project, it knows through some magical process that it has to link with "python25.lib" and load "python25.dll" at runtime, though I didn't specified anything neither in "Linker -> Additional Dependencies" nor in "Linker -> Additional Library Directories".
Now I would like to ...
I got a .h file, two .lib files, a .dll file and a tiny test project from a hardware vendor to talk to their hardware.
Compiling and running their test project works just fine. Noteworthy: they don't use the .dll. I can throw the dll-directory and all of it's content away, everything works just fine.
To start things off I simply copie...
I've just organized my code by using headers, but just as I've done this, I got a warning that turned into an error when linking.
I have a code(use of a function that is inside a header) in test.c that is like this:
#include "test1.h"
/* Some code */
main()
{
Testing();
}
And my test1.h header is like this:
void Testing();
void ...