Programming :: How To Attach New C Header Files And Libraries

Mar 10, 2010

I have been a predominant Windows user for a long time but shifted to Ubuntu recently. I was just trying out a few basic C functions when i realized that the "conio.h" header file isn't included in the libraries and therefore i was unable to use the "clrscr()" function.

I downloaded a tarball which contained the necessary library and header files including conio.h. Once extracted, i specified the location and included in the program as " #include "path to the header file" ".

I still didn't call the "clrscr()" function, and it compiled successfully. Next i edited the program to call that function and it gave the following error...

How i can add new libraries in the future?

View 14 Replies


Ubuntu :: Correctly Installing Libraries And (non-kernel) Header Files?

Jun 9, 2010

Not I recently installed a package (Vision Egg) that requires the Open GL libraries and headers, specifically, gl.lib and gl.h. I used Synaptic to install nvidia-current and nvidia-current-dev and it now looks as if the required libraries (under different names) are installed in /usr/lib/nvidia-current and as if the required headers are in /usr/include/nvidia-current. I am a bit confused because I also have /usr/lib/nvidia and /usr/lib/nvidia-173.

The installation of Vision Egg fails with "cannot find GL/gl.h" and "/usr/bin/ld: cannot find -lGL"There is a related post a few years ago under thread 200901 but it relates only to a single file problem that is fixed manually. I'd rather avoid that because it looks like it is easily breakable.Is there a standard way --- that is, a method that does not require error-prone manually changing or linking a multitude of file names --- of ensuring that programs which require GL/gl.h actually find the correct nvidia header file and also that the link loader finds the GL libraries.

View 2 Replies View Related

Software :: Dependent Libraries And Header Files In Non System Folder?

Apr 5, 2011

I've a source code of a program and I know that to compile and install that program I've to do:
./configure --prefix=/opt/test
make install

Now I want the program to look for dependent libraries and header files first in a non system folder. Now how can i instruct "configure" and "make" script to look for dependencies first in a different folder without editing configure and Makefile. And after these folders are searched for dependencies by the script it can look in system folder. Is there any environment variable that i can supply to "configure" and "make"? Will that work without any conflict? what are these environment variables? And also if I use these environment variables do I need to edit the source code files?

I mean do I need to change these lines
#include <test1.h> ...
#include "test1.h" ...

If yes then is there any other way to compile them without modifying the source code?

View 2 Replies View Related

Programming :: C Header Files And Object Files ?

Sep 18, 2010

When is it good to use separate translation units and object files and link them into the main C program, and when is it good to include the header files in the main C program? I don't understand if most people include header files or if most people just link in object files and use their contents in the main program. It's sort of a simple question, but it's confusing to me and that's why I need help with it. I sort of don't understand the difference, or if there's really no difference other than the way the final result is achieved, which way is better or preferred, etc...

For example:




Simple explanation of the difference? or which one is preferred or better? I've read a little on the ELF format... so is there no difference in the end result? It's just a matter of preference or necessity, and where the information is to begin with?

View 9 Replies View Related

Programming :: Cannot Find Header Files To Use Kmalloc()

Jun 16, 2010

I want to use kmalloc() to allocate contiguous memory on ram. But I can not seem to find the required header file(s) like linux/slab.h. I suppose I do not have the required library and I certainly do not know what and where to look.

View 14 Replies View Related

Programming :: Using Header Files - Reference And Put Formulas?

Feb 14, 2011

New to programming having issues reference header files.

Not sure how to put the fomula in headers below:


using namespace std;

View 7 Replies View Related

Programming :: Put Header Files For A Shared Library?

Feb 26, 2010

I have written a simple library and ended up with a .so file. I have a header file from writing the code that describes how to use the functions in the source code I have written. I think this .h files needs to be available to other programs that access this code.

I have seen lots of tutorials on how to copy the .so file to the relevant directories and make links with the version number. What I can't find is where to put the header file so that any programs I write to use my new library can access the header.

Hope this makes sense. For example, I might use <stdio.h> normally, I will need to access <mylibrary.h> once is loaded (as far as I understand!)

It's weird, I've been using C compilers for embedded processors over ten years now and never given a second thought to how libraries and headers work behind the scenes!

View 6 Replies View Related

Programming :: Cmake - Using Header Files In Higher Directories ?

Nov 1, 2010

Say I have a directory structure:

And other.c has:

How do I setup the CMakeFiles.txt files in each directory, so the executable "program" (from program.c) is created.

Currently I get the error:

View 1 Replies View Related

Programming :: Codeblocks Plugins And Header Files Location?

Jan 29, 2010

I installed Codeblocks and build some programs, but I have two questions:1. Where are my header files placed, since I don't know where codeblocks is installed. Soemetimes I have to remove header file extension (.h) to be able to compile some source. I use gcc as setting for codeblocks to compile and build programs.2. Plugins for Codeblocks can be installed, but when browse codeblocks's wiki I can't find download links neither developer pages

View 3 Replies View Related

Programming :: Compile C++ Program Without Changing #include Line & Header Files Not System?

Apr 3, 2011

I have C++ source code(*.cpp) files that expects it's header files in System's include folder which is/usr/include.The cpp files has include lines like this:

#include <some.h>
#include <another.h>


View 3 Replies View Related

Programming :: C++ Compilation And Attach In Tcl Interpreter?

Mar 25, 2011

i am working with ad hoc network but the problem is not getting any good documentation of how to compile c++ code then how to add the code into Tcl intrepreter and how to work with make file. i want to run my own algorithm using c++ and then want to incorporate it into tcl interpreter and then want to run.

View 2 Replies View Related

Ubuntu :: Attach Shared Files To A Thunderbird Mail?

Dec 18, 2010

I am trying to attach shared files to a Thunderbird mail.The files are stored into a remote machine inside my LAN. The path is something like smb//:<something>But when trying to attach the file I get a permission error:"controllare i permessi di accesso al file"(trad: "check the access permissions to the file")

View 1 Replies View Related

Programming :: Attach Source Code To A Remote Debug?

May 25, 2011

running a java application in a remote site,and I would like to debug the application. I'm using jdb, and, due to network architecture, I can only use jdb do debug in text-mode. To debug in text-mode I use the command: jdb -attach remotesite: port. At this point this is ok. Now I would like to attach the source code to the jdb. I tried the command

jdb -attach remotesite: port ~/src/org/path/

to attach the source code to the remote debug to. But it doesn't work. In jdb, I try the command use ~/src/org/path/ but it doesn't work either. How can I attach the source code to the remote debug?

View 1 Replies View Related

Ubuntu :: Unable To Attach Files In Webmail And Firefox 5 / Enable This?

Jul 26, 2011

Just recently built and setup a new PC for my Dad running Kubuntu 11.04 64bit. As always, I installed and configured the latest Firefox (v5) as the default browser and appropriate plugins such as Flash (64bit using flashaid), adblock plus, video download helper and download status bar.

Everything is running fine, except for we are unable to attach files in Gmail. Further testing returned the same results in Hotmail also.

When composing a message, then clicking 'attach file', the file browser windows as per normal. However, when attempting to navigate to the required folder to select a file, when clicking on the folder to open, the file browser 'attached' a link to the folder.

I was able to replicate this on a 2nd machine with almost identical software setup. I then tried Konquerer (sp?) on the 2nd machine and was able to correctly navigate, and attach the file as needed.

I never noticed this problem before as I use Thunderbird on my all my systems.. but am able to replicate it on 3 different systems.

View 4 Replies View Related

Ubuntu Networking :: Installed WLAN Router ZyXEL 660HN - Cannot Attach Big Files - 1.7 Mb - To Emails

Jan 15, 2010

Does anybody know what to do? Internet works fine except for that problem.

I can attach files of 33kb in web-based email service (Gmail) but no big ones.

View 3 Replies View Related

Ubuntu :: G++ Header Files?

Apr 12, 2011

I tried to update the header files manually in the include folder, because I thought that I needed to have windows.h etc, but now nothing compiles and I get a good 80 errors for even hello world. I have tried removing g++ and all related packages, deleting the header files folder and reinstalling, but it reinstalls the broken files. Any way of restoring the originals without reinstalling ubuntu?

View 1 Replies View Related

Programming :: C Tcp Header Change?

Jul 25, 2011

I am trying to write a program that will send a packet to a server as a different IP address so I can test my firewall rules as I only have access to a couple of machines:

int my_socket;
struct sockaddr_in sin;


View 2 Replies View Related

Fedora :: Vmware And C Header Files ?

Dec 28, 2009

I've installed Fedora 12 (KDE version) on VMware workstation running under Windows 7.

I've been able to configure the VMware tools fine up until this point:


What is the location of the directory of C header files that match your running kernel? After some searching online I deduced I should install all of the latest updates and kernel-devel.

I then nuked the previous VMware tools install and started over with it again, but alas, no directory I try works (i.e. /usr/src/kernels/, /usr/src/kernels/ and so forth).

View 8 Replies View Related

General :: Add Header And Footer To Many Files

Aug 27, 2010

I'm trying to add a header to many .cpp files in a directory (or directory tree).

My attempt was:


If I put part of the command inside quotes the substitution occurs, but then I get other errors like:



No such file or directory

I could just write a small program to do it.

View 3 Replies View Related

Ubuntu :: Adding New Header Files

Jan 26, 2010

I am new to linux. I want to use a header file asm/msr.h. But the /usr/include does not contain the header file that I want. Can I just copy the whole asm directory into the directory /usr/include, and overwrite the old one?

View 2 Replies View Related

General :: Location Of C Header Files ?

Jan 30, 2011

I'm trying to install vmware tools in mint.

All goes well until I get to this -

What is the location of the directory of C header files that match your running kernel? [usr/src/linux/include]

When installing the vmware tools it says to just hit enter and the default will be used.

Hitting enter just keeps giving me the error message- The path "usr/src/linux/include" is not an existing directory.

View 14 Replies View Related

Slackware :: Huge.s No Header Files ?

Feb 12, 2011

I've started using the huge.s kernel and when i try to compile packages slackware complains about kernel headers but all i see is the smp header files on the slackware discs ?

View 2 Replies View Related

CentOS 5 :: How To Get Missing Mod And Header Files

Jan 10, 2010

i was trying to install iftop using make installso when i ran /configureit told me that some header files are missing and some modules aaare also missingis there a way to search for the missing header files on the internet and missing modules n the internet

View 1 Replies View Related

Fedora :: C Header Files Which Match Currently Used Kernel

Jan 13, 2011

I need to install some module which needs to be interated into OS's.

It asks me: "What is the location of the directory of C header files that match your running kernel? "

I know that I need kernel-devel package and I installed this yum install kernel-devel after that I have this /usr/src/kernels/

Now when I run configuration it does not work

Does it mean that I need to update the kernel so that it matches to the kernel-devel module available in the net?

View 4 Replies View Related

General :: Installing Kernel Header Files ?

Feb 13, 2010

I am using Ubuntu 9.04 with kernel version 2.6.28-11-generic.I want to compile the foll. file but i get <linux/slab.h> no such file or directory.

The kernel headers are installed in my system at /usr/src/linux-headers-2.6.28-11-generic/ directory. During compilation i specified as follows:

Why gcc is unable to find the linux/slab.h header file?

View 1 Replies View Related

CentOS 5 :: The Location Of The Directory Of C Header Files?

Jan 5, 2010

While setup of vmware on CentOS5.4 i am facing the below error.What is the location of the directory of C header files that match your runningkernel? [/usr/src/linux/include]

View 5 Replies View Related

Programming :: Can't Write Header To Excel File?

Jan 15, 2010

I am having trouble getting some code to work. It takes an input file (csv) and converts it to an XLS. The problem is that I can't seem to get a header to be printed first...

use Spreadsheet::WriteExcel;
my $input = $ARGV[0];


View 5 Replies View Related

Programming :: Get Jpeg File Header Using C Language?

Oct 10, 2009

I want to get files header as much as possible which are mostly used so how can i get jpeg file header using C ?

If any other headers of MS Office is possible for U.

View 7 Replies View Related

Programming :: Setting For Header File And Library?

May 8, 2010

I have 3 files: main.c, mylib.h, mylib.c Now I want to put mylib.h into : /usr/include/mydir/mylib.h And I create a static library: libmylib.a, and put into the folder: /usr/lib/mydir/libmylib.a Then I compile: $ gcc -o main main.c Then I got linking error

main.c:(.text+0x3e): undefined reference to `extract_v1'
main.c:(.text+0x7b): undefined reference to `modify_v1'
collect2: ld returned 1 exit status

So I try with -l options: $ gcc -o main main.c -lmylib I still got error

/usr/bin/ld: cannot find -lmylib
collect2: ld returned 1 exit status
Any idea about this?

Also, I want to ask about: how to create my own header and library to put into /usr/include/mylib/ and /usr/lib/mylib/, so when I use function in my program, the compiler will automatically link to library. It's like when you #include <stdio.h>, and you compile: $ gcc -o program program.c, you don't need to specify any linking folder or library.

View 4 Replies View Related

Programming :: Simple Header For Perl Programs?

Nov 5, 2010

i am trying to do something very simple like a header and a footer for my first perl programs, what iam trying to do is that when i create a file in vim: lets say , i would like that file to have already this in its header:

and this on the footer:
print "

so that i dont have to type everytime #!/usr etc i tried to do it this way but i get weird vim errors: header is a file that contains the header and footer $ vim;header > is there another way to do it as a function in bash or some other one liner command?

View 1 Replies View Related

Copyrights 2005-15, All rights reserved