paroj / gltut

Learning Modern 3D Graphics Programming
https://paroj.github.io/gltut/
MIT License
1.57k stars 377 forks source link

ld.exe: cannot find -lglloadD #54

Closed paroj closed 8 years ago

paroj commented 12 years ago

Originally reported by: droxler (Bitbucket: droxler, GitHub: Unknown)


Hi,

when I'm trying to build the Tut 01, I've got this error:

c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lglloadD

any idea how to resolve it?

thanks


paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


I am happy to report that everything builds! It's alive!!! Thanks for your help. I didn't understand that I had to build in two places, the glsdk folder, and also in the AllTutorials workspace.

BTW, To the author: The book looks really good, congratulations.

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


I went back into the glsdk folder and ran the premake4.exe command as shown below. It looks like I got the libraries. What do you think?


C:\Users\ggrosso\CodeBlocks_workspace\Tutorial 0.3.8\glsdk>premake4.exe codeblocks
Building configurations...
Running action 'codeblocks'...
Generating glsdk.workspace...
Generating glload/glload.cbp...
Generating glimg/glimg.cbp...
Generating freeglut/freeglut.cbp...
Generating glutil/glutil.cbp...
Generating glmesh/glmesh.cbp...
Done.

C:\Users\ggrosso\CodeBlocks_workspace\Tutorial 0.3.8\glsdk>

Now I will try to re-build this and report my results.

paroj commented 11 years ago

Original comment by Danny Sapato (Bitbucket: dsapato, GitHub: dsapato):


Thank you so much guys, this helped me solve this, and there's no way I would've gotten it

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


Thanks Giuseppe. I will keep this as a backup, but I wanted to see why I cannot generate the necessary libraries to make this work.

@alfonse Thanks for getting back to me. I will try to generate these libraries from inside the glsdk folder and report back my results.

paroj commented 11 years ago

Original comment by Jason McKesson (Bitbucket: alfonse, GitHub: alfonse):


I built the entire workspace. I opened AllTutorials.workspace in CodeBlocks, then I went to Build, and chose Build Workspace. Same error. Tried it again this morning, same error.

Did you do this with the glsdk workspace? That's what I asked about. Forget about the tutorials and focus on getting libraries from the SDK build.

paroj commented 11 years ago

Original comment by Giuseppe Barbieri (Bitbucket: gbarbieri, GitHub: gbarbieri):


I dont know if the libs I compiled could be used also on your pc..

If this is the case here is the 7z folder

https://dl.dropboxusercontent.com/u/1401029/glsdk.7z

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


Hi Jason, Thank you for your help. This issue is somewhat puzzling, I seem to be missing something. I wanted to send you some screenshots to better explain what I am doing in hopes that you may see something there that I’ve missed and can help me proceed. Here is some information on my PC: OS: Windows 7 Enterprise x64 IDE: CodeBlocks v12.11 rev 8629 (which is 32-bit)

[cid:image005.png@01CE6B37.67A36D60]

Here are the builds using the Windows 7 command line: * The first image shows the premake4 build for all the tutorials. I used the same command window to perform the glsdk build. * The glsdk build portion is shown (as a continuation) in the second image.

[cid:image001.png@01CE6B36.536A6250]

[cid:image002.png@01CE6B36.536A6250]

Here you’ll see the folder structure of glsdk. As you can see, glload is the only directory that seems to contain a lib folder.

[cid:image004.png@01CE6B36.C4A33780]

Hopefully, you can see something that I am missing. Thanks again.

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


I built the entire workspace. I opened AllTutorials.workspace in CodeBlocks, then I went to Build, and chose Build Workspace. Same error. Tried it again this morning, same error.

paroj commented 11 years ago

Original comment by Jason McKesson (Bitbucket: alfonse, GitHub: alfonse):


If there's no directory there, then you didn't build what you think you did.

Did you build the entire workspace (Build->Build Workspace), or just the active project (Build->Build)?

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


Hmmm... you say that within the following directory

...\myCodeBlocks_workspace\Tutorial 0.3.8\glsdk\glimg\

there should be a lib folder?

No lib folder present in that directory. I can however see it some of the other folders in the glsdk directory. So does this mean that the SDK did not actually build correctly, or perhaps completely? If yes, then how can I fix this?

paroj commented 11 years ago

Original comment by Jason McKesson (Bitbucket: alfonse, GitHub: alfonse):


Jason can you please help?

All I can say is that it works on my machine. The only things you can check are:

  1. Did you, by chance, download the SDK separately from the tutorials? Because you're not supposed to do that; it's part of the distro, and what you're supposed to build is the glsdk directory within the tutorial distribution.
  2. See if it built the SDK by manually checking the /lib directories under each of the directories in the glsdk folder.
paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


BTW, thanks for helping Giuseppe. I appreciate it very much. :D

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


No, I haven't tried to rebuild because I didn't get any errors when i did the builds the first time. They all seemed to build as they should. I wanted to include a screenshot here but I am not sure how to do that at this time.

paroj commented 11 years ago

Original comment by Giuseppe Barbieri (Bitbucket: gbarbieri, GitHub: gbarbieri):


Have you already try to build again the glimg in the glsdk (or also the whole glsdk)?

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


When I open the AllTutorials.workspace, highlight the first tutorial and select build, I get the same error.

Jason can you please help?

paroj commented 11 years ago

Original comment by Giuseppe Barbieri (Bitbucket: gbarbieri, GitHub: gbarbieri):


I guess Jason would be much more helpful than me now..

btw, what happens if you try to build just the first tutorial? (Tut 01 Main)

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


Okay. I followed your steps and built the tutorial files with premake4.exe codeblocks. The process completed successfully (no errors) and a AllTutorials.workspace codeblocks file was created. Then I did the same for the files in the glsdk folder. Again all seemed to go well and a glsdk.workspace file was created. I opened this glsdk.workspace file in CodeBlocks and built the files found there. No errors.

From within CodeBlocks, I went to File > Open > AllTutorials.workspace and the workspace with all of the tutorials opened in CodeBlocks.

I highlighted AllTutorials and clicked on the Build icon.

The following error results: cannot find -lglimgD

Can you help?

paroj commented 11 years ago

Original comment by Giuseppe Barbieri (Bitbucket: gbarbieri, GitHub: gbarbieri):


Yep, sorry I didnt have the file with me, I wrote by memory

paroj commented 11 years ago

Original comment by Jason McKesson (Bitbucket: alfonse, GitHub: alfonse):


That should be premake4, not premake.

paroj commented 11 years ago

Original comment by Giuseppe Barbieri (Bitbucket: gbarbieri, GitHub: gbarbieri):


In the console, enter where you see all the "tut 01", "tut 02" and so on folders.

Type (settting the right path to the downloaded premake)

premake.exe codeblocks

then enter in the glsdk, type again

premake.exe codeblocks

A codeblock file will appear, click on it, codeblock will open with all the srcs of the glsdk, then build all of them.

Then you can build also the tutorials

paroj commented 11 years ago

Original comment by George Grosso (Bitbucket: ggrosso, GitHub: ggrosso):


Hello, I have the exact same error, and I am also using Windows 7 x64 with CodeBlocks, and I also built all of the tutorials inside glsdk. Could you please explain the steps you used to solve this problem?

paroj commented 11 years ago

Original comment by Giuseppe Barbieri (Bitbucket: gbarbieri, GitHub: gbarbieri):


Solved, once created the build files in glsdk I didnt build them....

Ps: however congratulation to the author, the books looks great :)

paroj commented 11 years ago

Original comment by Giuseppe Barbieri (Bitbucket: gbarbieri, GitHub: gbarbieri):


Hello,

I have the same problem..

After launching premake on all the tutorials and inside glsdk, when I try building I get

#!||=== framework, Debug ===| ..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]| c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition| ..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]| c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition| c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\backward\backward_warning.h|33|warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]| c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\backward\backward_warning.h|33|warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]| ..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]| c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition| ||=== Tut 01 Main, Debug ===| ..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]| c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition| ld.exe||cannot find -lglloadD| ld.exe||cannot find -lglimgD| ld.exe||cannot find -lglutilD| ld.exe||cannot find -lglmeshD| ld.exe||cannot find -lfreeglutD| ||=== Build finished: 5 errors, 6 warnings (0 minutes, 13 seconds) ===|

||=== framework, Debug ===|
..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|
..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\backward\backward_warning.h|33|warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\backward\backward_warning.h|33|warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]|
..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|
||=== Tut 01 Main, Debug ===|
..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|
ld.exe||cannot find -lglloadD|
ld.exe||cannot find -lglimgD|
ld.exe||cannot find -lglutilD|
ld.exe||cannot find -lglmeshD|
ld.exe||cannot find -lfreeglutD|
||=== Build finished: 5 errors, 6 warnings (0 minutes, 13 seconds) ===|
paroj commented 12 years ago

Original comment by droxler (Bitbucket: droxler, GitHub: Unknown):


I built what was in the sdk directory. I'm not sure if the problem come from the files of the tutorial, it seems that the problem come from mingw, I tried to reinstall it, but always the same problem

paroj commented 12 years ago

Original comment by Jason McKesson (Bitbucket: alfonse, GitHub: alfonse):


Did you download the SDK separately, or did you build what was in the SDK directory of the tutorial?

paroj commented 12 years ago

Original comment by droxler (Bitbucket: droxler, GitHub: Unknown):


I'm on windows 7, I work with codeblocks, I followed the tutorial with premake to build glsdk's directory and all tutorial. I never had an error during all those process.

paroj commented 12 years ago

Original comment by Jason McKesson (Bitbucket: alfonse, GitHub: alfonse):


It looks like you didn't build the SDK as the instructions stated, or the build otherwise failed. But I can't really say without knowing more about what platform you're using and what you're using to build the tutorials with.