Add lib by pragma
-
Why the compiler take
#pragma comment(lib, "glut32.lib")
bot not
#pragma comment(lib, "gl/glut32.lib")
it get me (on second trial):
LINK : fatal error LNK1104: cannot open file "glut32.lib"
It is not possible to have libs in other folders than main one ? P.S. Of course that I have glut32.lib file on the right path, the problem become that is not recognize gl\glut32.lib path (however glut32.lib is there) ! -
Why the compiler take
#pragma comment(lib, "glut32.lib")
bot not
#pragma comment(lib, "gl/glut32.lib")
it get me (on second trial):
LINK : fatal error LNK1104: cannot open file "glut32.lib"
It is not possible to have libs in other folders than main one ? P.S. Of course that I have glut32.lib file on the right path, the problem become that is not recognize gl\glut32.lib path (however glut32.lib is there) !You are using a relative path vs. an absolute path. A better approach is to just use "glut32.lib" in the
#pragma
statement, and have the linker configured to search the proper directory for the .lib file with the Additional Library Directories setting."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
You are using a relative path vs. an absolute path. A better approach is to just use "glut32.lib" in the
#pragma
statement, and have the linker configured to search the proper directory for the .lib file with the Additional Library Directories setting."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles