LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   gcc Linker options (https://www.linuxquestions.org/questions/programming-9/gcc-linker-options-638699/)

Ace Blackwell 04-29-2008 12:30 PM

gcc Linker options
 
All,

I'm trying to compile and run a simple hello world program using KDeveloper. The program is a C program. Also I am trying to use SVGALib commands. I no longer get errors for the SVGA commands but I do get a SVGALib can't find /dev/svga is SVGALIB_Helper loaded (or something of this nature) The program compiles with no errors. I only get the SVGA error when I try to execute the program.

So I think I may have an issue with not having lvga loaded. My question is, can anyone tell me where linker options are located in Kdeveloper?

Or if anyone else knows of this issue and knows the I'm looking in the wrong area, please let me know.

One last quick question, is it really necessary to have all the Make, configure, and various other files for a simple Yo World program. I was going to try and run the program from the prompt and there was a boat load of files. I'm guessing Kdeveloper generates them automatically. I've seen less files and setup items from programs a whole lot larger than mine.

Thanks
Ace

Mara 04-29-2008 03:52 PM

If you get the error when running your program, compiling it differently will not help that easily. It seems that the program can't find the library it needs. During compilation it got to the headers, it seems. I'd check if the library is in LD_LIBRARY_PATH.

Second question: you can generate the project in many different ways. Running autoconf and stuff for single file is simply too much, but you can choose a project to use your own custom Makefile (but you need to write it yourself then!). Note that the defaults are quite verbose. You should be able to remove most of the stuff it checks for because they aren't needed by your program. That requires basic knowledge of automake/autoconf, but there are manuals online.

You can also try cmake-based project, for instance.


All times are GMT -5. The time now is 12:39 PM.