UNIX/Linux Programming - June 2012 (Page 2)

undefined reference to 'functions'
 
i have added a module to ns2 and i am compiling it when i get undefined reference error. g++ -lneoclassic -lrt -o ns \ common/tclAppInit.o tools/rand...
[1 reply] : after adding lxml2 library to linker flag i was past few of the errors... (by hasanalikhattak)
can not compiling the c++ project
 
Hello guys, I need to develop my own peap protocol. I've found some source code to inspect, but i dont know how to compile it. In Linux? In Visual Studio C...
[1 reply] : hi, i saw the two source code who has it's makefile. In Linux,you can... (by evefree2)
how to write a map or vector into a file
 
hi guys, i have a problem in my prog which is that i want to write a map or a vector into a file. here: map<string,string> tmp; map<uint32_t,vector<int>...
[4 replies] Last: thanks normvcr,i see. and now,i've done. (by evefree2)
by alend
delete heap after returning pointer
 
Hi all, I have a function as follow: int* readFile(string InputPath) { int *myvar = new int ; //The file has 10 lines (Using heap) ifstream ...
[16 replies] Last: ^Actually, you probably want to pass in a parameter to the FreeDynamic... (by firedraco)
Problem with char array or string
 
Im having a problem. I want to store some text (names) in an array. However, I cant get it to work. The code for the small function can be seen below. Note lin...
[2 replies] Last: Yes it is. I finally realised the problems after a 1 day of considerat... (by dolle39)
by Eric99
mmap with files >2GB
 
I've been trying to get mmap to work on a 3GB file (Linux Ubuntu 12.04), but it keeps returning MAP_FAILED. If I ignore it, I eventually get a segmentation fau...
[5 replies] Last: mmap maps the file into your virtual address space, which has a size o... (by Athar)
by mhalf7
startup process
 
hello masters.. I honestly don't have any idea in accessing or timing the running program in my OS..that's why I'm having a hard time in writing a program th...
[1 reply] : There's already a standard utility to time programs. http://www.freebs... (by kbw)
How to use GCC from console?
 
I'd like to know how to compile with gcc in a terminal just in case if I need to...so any advice?
[7 replies] Last: The reason to use makefiles is to avoid recompilation. As long as the ... (by ne555)
question about template class
 
I met a error when running the program. The error is *** glibc detected *** ./a.out: double free or corruption (fasttop): 0x0000000000c19050 *** the cod...
[5 replies] Last: Yes that copy is incorrect, I missed that. That templated thing doesn... (by kbw)
Linux Binary Extension
 
I have been told multiple times over the internet that a linux binary has the ".elf" postfix. However, all the programs that I've compiled/linked have been spa...
[2 replies] Last: Thank you for explaining. When I 'hacked' my Nintendo Wii a few years... (by SmallTock)
How to tell who accessed file
 
Hi, My apologies in advance that this is only loosely related to C++, but I don't know a better place to ask it. Normally, I would ask it on Stack Overflow, bu...
[1 reply] : No. Only the access time is maintained, and even that can be switched... (by kbw)
undefined reference to 'function'
 
I write a brief code to call an exist class and always was told "undefined reference to `T::T(char*)' and undefined reference to `T::~T()'... The main functio...
[6 replies] Last: Thanks ne555. I found it's because the name of T.C ... The Makefile ... (by deritha)
System call overhead
 
Hi I know there are many programming gurus who say no-no to invoking system calls because of overheads and what not. But the way I see it, if I am to run a rel...
[3 replies] Last: So how is it faster? You Should actually NEVER use system. You can cre... (by S G H)
Input file?
 
Hi, I made a program that finds the root of a quadratic equation. I want to speed up my testing since I want to try alot of different senarios. My program tak...
[no replies]
by Sintax
How to compile for Windows under Linux? (1,2)
 
Let's say I am running linux and my friend is running Windows. I want to compile my program into a Windows ".exe" file rather than a linux binary. How do I go...
[20 replies] Last: WOOHOO!!! Thank you all! I finally got it to work!!!! PS: It was Pet... (by Sintax)
undefined reference to 'function'
 
i want to use one program as a shared library for an other program. i started as follows: i have a application which i have compiled using /usr/bin/g+...
[6 replies] Last: /usr/lib/ should be already on the lib path. What if the lib is in /... (by S G H)
Simple program segment faulting
 
I have the following simple C program giving segmentation fault and for the life of me I cannot see why. #include <stdlib.h> #include <stdio.h> int main(i...
[4 replies] Last: Thank you. (by straygrey)
Radix Sort Negative Numbers
 
So I have to write a program that performs radix sort. I have radix sort working. but only with positive numbers. I need to write a function called in the code ...
[1 reply] : A signed 32 bit integer goes from −2,147,483,648 to 2,147,483,647 an... (by mik2718)
by Bella
Finding mean of the doubles using vector!
 
Hi, I'm new to C++... I need to write a C++ code for taking values of 'x' and 'y' coordinates from the user using a space between the two values of the pai...
[1 reply] : just for finding the mean you don't need to store all the numbers. the... (by vkrishan)
by mIXpRo
installing an older version of g++ on ubuntu 12.04
 
can someone guide me on how to install g++ say 3.6 version on ubuntu 12.04 which runs 4.x ?
[4 replies] Last: Try this article - it may help. http://ubuntuforums.org/showthread.ph... (by budman85)
June 2012 Pages: 123
  Archived months: [may2012] [jul2012]

This is an archived page. To post a new message, go to the current page.