Advertisement

simple nehe tutorial question on making a window in linux

Started by November 18, 2003 08:16 PM
13 comments, last by HTML 21 years, 3 months ago
The only way that I could give a quick example would be to know which IDE you were using. The IDE will have a compile or link time options. It has to.

But no.. I can't give a quick example. The best thing I can say is .. "tell me which IDE you're using and maybe I'll find out how to tell it to link against certain libraries".

The real best thing to do is to actually go to their website or read the docs. Those will tell you how to link. you see, the problem that you're having is that the compiler can't find the functions you're calling - because they're in the library!

Summary:
#1: Read the docs, find out how to link libraries with your projects
#2: Post which IDE you're using and maybe I'll figure it out by proxy and docs.

Scout


BTW... learn to compile things in the console.. there's plenty of stuff out there that still requires it. :-/ This is neither good nor bad, it simply is.



All polynomials are funny - some to a higher degree.
Furthermore, polynomials of degree zero are constantly funny.

[edited by - MrScout on November 22, 2003 3:36:06 AM]
All polynomials are funny - some to a higher degree.Furthermore, polynomials of degree zero are constantly funny.
ok, well I am using KDevelop
Advertisement
http://www.kdevelop.org/doc/manual/index-9.html

I need say no more than this. ;-)

If you still can''t figure it out i may have to actually d/l kdevelop and see. :-/ I don''t have kde installed and this might be a hassle. But I''m confident the website will help you.

Scout



All polynomials are funny - some to a higher degree.
Furthermore, polynomials of degree zero are constantly funny.
All polynomials are funny - some to a higher degree.Furthermore, polynomials of degree zero are constantly funny.
Ok, I figured out how to link the libraries finally. THanks

But would you know why I would get this error when compiling nehe''s opengl window for linux sdl??

g++: cannot specify -o with -c or -S and multiple compilacations

thats all I get, so if I fix that, I may be able to finally make a window

Thanks
quote:
Original post by HTML
Ok, I figured out how to link the libraries finally. THanks

But would you know why I would get this error when compiling nehe''s opengl window for linux sdl??

g++: cannot specify -o with -c or -S and multiple compilacations

thats all I get, so if I fix that, I may be able to finally make a window

Thanks



Because you can''t. You might try to compile the various source files seperately.
g++ -c -g bob.C
g++ -c -g bob2.C
g++ -o main bob.o bob2.o
(this is a normal compile sequence)

What is probably trying to happen is something like this:
g++ -c bob.C bob2.C -o main

Well.. you''re compiling bob.C and bob2.C and trying to put *BOTH* of their outputs into main! (object files) You obviously couldn''t make sense of that.

Thus, a possible solution:
g++ bob.C bob2.C -o main (I don''t compile this way, but suspect it works.)

The -c flag specifies compile only - it only creates a .o file...
Without the -c flag it will continue through the whole process...

Thus, ... you''re still compiling wrong!




All polynomials are funny - some to a higher degree.
Furthermore, polynomials of degree zero are constantly funny.
All polynomials are funny - some to a higher degree.Furthermore, polynomials of degree zero are constantly funny.

This topic is closed to new replies.

Advertisement