#include <windows.h> //Le fichier d''entête de window
#include <conio.h> //Fichier d''entête pour les entrés et les sortis
#include <gl\gl.h> //Fichier d''entête pour opengl
#include <gl\glaux.h> //Fichier d''entête pour glaux
void main(void)
{
auxInitDisplayMode(AUX_SINGLE | AUX_RGBA);
auxInitPosition(100,100,250,250);
auxInitWindow("Mon premier programme en opengl");
glClearColor (0.0f, 0.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
cprintf("Appuyer sur une touche pour continuer");
getch();
}
When I compil with microsoft visual c++, I got those two errors:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Jo 3d opengl.exe : fatal error LNK1120: 1 unresolved externals
Those anyone know how to solve them?
~-~-~-~-~-~-~-~-~
RPG D&D
Problem with my first opengl program
Ok, here is my program:
Perhaps you could post this in the OpenGL-section for a quicker answer.
----PATRIOTISM----
“Beware the leader who bangs the drums of war in order to whip the citizenry into a patriotic fervor, for patriotism is indeed a double-edged sword. It both emboldens the blood, just as it narrows the mind. And when the drums of war have reached a fever pitch and the blood boils with hate and the mind has closed, the leader will have no need in seizing the rights of the citizenry. Rather, the citizenry, infused with fear and blinded by patriotism, will offer up all of their rights unto the leader and gladly so. How do I know? For this is what I have done.
And I am Caesar.”
— Julius Caesar
----PATRIOTISM----
“Beware the leader who bangs the drums of war in order to whip the citizenry into a patriotic fervor, for patriotism is indeed a double-edged sword. It both emboldens the blood, just as it narrows the mind. And when the drums of war have reached a fever pitch and the blood boils with hate and the mind has closed, the leader will have no need in seizing the rights of the citizenry. Rather, the citizenry, infused with fear and blinded by patriotism, will offer up all of their rights unto the leader and gladly so. How do I know? For this is what I have done.
And I am Caesar.”
— Julius Caesar
------------------------Why of course the people don’t want war. ... That is understood. But after all it is the leaders of the country who determine the policy, and it is always a simple matter to drag the people along, whether it is a democracy, or a fascist dictatorship, or a parliament, or a communist dictatorship ...Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is to tell them they are being attacked, and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same in any country. [Herman Goering]
You are trying to compile it as a Win32 GUI application rather than a console application. I don''t use MSVC so I can''t tell you how to change it, but I''m sure you can find it in the options somewhere if you look hard enough.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Ah this is easy. When you made your project you selected Win32 Application. What you should have selected was Win32 Console Application. Since you selected Win32 Application, VC++ is expecting to see WinMain(...) not main(). Instead of making a whole new project you could just change your main function to int WINAPI WinMain( blah blah blah ). If you don''t understand that function there then search for a quick windows programming tutorial on google. Also check out http://nehe.gamedev.net . I would reccommend you drop glaux, it''s old and not supported. There are much better ways to use opengl. Like glut for instance if you want.
-SirKnight
-SirKnight
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement