I’m working on a project for a computer science class. I wrote the code and tested it using MinGW, and it works fine. I then copied the code over to the university’s Linux server and tested it there, since that’s what my professor grades assignments on. The output is very different – like it printed out a carriage return in
Tag: c++
Installing PHP in my home directory
I need to install PHP in my home directory, without polluting any directory outside my home [very important requirement!]. In the system there is already an older version of PHP running. I found instructions here: http://blog.thecybershadow.net/2013/01/25/installing-php-and-apache-module-under-home/ I am running these commands in my home directory, as normal user dan The author of the article states that you need to use
Meaning of library dl in gcc
I’m checking a makefile, and see that the libraries used are: lcppunit is the unit testing library. What is ldl then? Answer libdl is the dynamic linking library.
Are the load address is common for all the C programs in linux?
Let’s say I have a prog1.c which is build as prog1.out. In prog1.out there is a linker information that will tell where the elf will be loaded. These addresses will be a virtual addresses. The loader will look for these information’s and a launch this as a process. Each section like DS,BSS will be loaded on the virtual address as
Building symbolic link shared library in a shared folder of VirtualBox
I am now building a C++ library in Windows and Linux. For windows I am now using Visual Studio for development, and for Linux I am now using Ubuntu via Virtual Box. In order to make develop much easier, I shared the folder of the project in Windows with Linux via the shared folder function of Virtual Box. I compile
What is the difference between the C programming language and C programming under linux?
What is the difference between the C programming language and C programming under Linux? Are the syntax same in both them? Or is the difference only when you execute the program? Answer The C language is governed by the ISO approved C standard and it does not take in to account the underlying platform on which you use C. So
How to execute a sudo command with in a C/C++ Program?
I would like to execute one of my sudo commands through one of my C demon. I use the command system(echo MYPASSWORD | sudo -v -S); in my C code. It runs fine when I execute the demon. However, when I exit from the terminal it fails with a return value of 256. Please suggest to me some alternate way
gotoxy() function using printf() ‘s position
Hello there i am working a project which need the gotoxy() function i have read gotoxy() implementation for Linux using printf i wonder why the need to change the x y order in printf, is that just to fit the coordinate system? in my way, i change it to printf(“%c[%d;%df”,0x1B,x,y) to meet my needs stil, during my using this gotoxy()
Does using linux capabilities disable LD_PRELOAD
In my custom environment an interceptor library is preloaded which runs a special implementation of bind(), connect(), etc. calls. The problem I see is whenever an application is explicitly enabled capabilities using command setcap, executing the application fails to preload interceptor library and calls default libc connect(). Is it an expected behavior? If yes, what could be the reason to
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