1. Jason McKesson
  2. gltut
  3. Issues

Issues

Issue #98 new

Problem with building tutorial

christofer
created an issue

I have a problem with building Learning Modern 3D Graphics Programming tutorial. I've build attached glsdk (by premake and "build" in code::blocks), but when I try build any tutorial I have errors:

||=== Tut 01 Main, Debug ===|

ld.exe||cannot find -lglloadD|

ld.exe||cannot find -lglimgD|

||=== Build finished: 2 errors, 0 warnings ===|

PS I created an issue in SDK section, there I described other error - now (after remove and built again) I have only this.

Comments (10)

  1. Jason McKesson repo owner

    This would appear to be a failure to successfully build the SDK. Did you build all of it, or just part of it?

    Also, did you build the SDK in both debug and release?

  2. christofer reporter

    I've rebuilt glsdk, and build messages in Test are now:

    ||=== framework, Debug ===|

    c:\mingw\bin..\lib\gcc\mingw32\4.7.2\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:\mingw\bin..\lib\gcc\mingw32\4.7.2\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:\mingw\bin..\lib\gcc\mingw32\4.7.2\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:\mingw\bin..\lib\gcc\mingw32\4.7.2\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|

    c:\mingw\bin..\lib\gcc\mingw32\4.7.2\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]|

    ||=== Build finished: 3 errors, 5 warnings ===|

    In Tut 01 and propably every other (I checked to Tut 03) these are just: ||=== Tut 01 Main, Debug ===|

    ..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]|

    c:\mingw\bin..\lib\gcc\mingw32\4.7.2\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|

    ||=== Build finished: 1 errors, 1 warnings ===|

    Yes, I built debug and release.

    EDIT: I have changed in freeglut_std.h

    #   define NOMINMAX
    

    to

    #   ifndef NOMINMAX
    #   define NOMINMAX
    #   endif
    

    Then, there was 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.

    So, I have changed funcitons and headers in Mesh.cpp and Scene.cpp to replacements in backward_warning.h:

    /* A list of valid replacements is as follows:

    Use: Instead of:

    <sstream>, basic_stringbuf | <strstream>, strstreambuf

    <sstream>, basic_istringstream | <strstream>, istrstream

    <sstream>, basic_ostringstream | <strstream>, ostrstream

    <sstream>, basic_stringstream | <strstream>, strstream

    <unordered_set>, unordered_set | <ext/hash_set>, hash_set

    <unordered_set>, unordered_multiset | <ext/hash_set>, hash_multiset

    <unordered_map>, unordered_map | <ext/hash_map>, hash_map

    <unordered_map>, unordered_multimap | <ext/hash_map>, hash_multimap

    <functional>, bind | <functional>, binder1st

    <functional>, bind | <functional>, binder2nd

    <functional>, bind |<functional>, bind1st

    <functional>, bind |<functional>, bind2nd

    <memory>, unique_ptr |<memory>, auto_ptr

    */

    My build log is now:

    -------------- Clean: Debug in framework ---------------

    Cleaned "framework - Debug"

    -------------- Build: Debug in framework ---------------

    Compiling: Scene.cpp In file included from c:\mingw\bin../lib/gcc/mingw32/4.7.2/include/c++/backward/strstream:52:0, from E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp:6: c:\mingw\bin../lib/gcc/mingw32/4.7.2/include/c++/backward/backward_warning.h:33:2: 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] E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp: In constructor 'Framework::SceneTexture::SceneTexture(const string&, unsigned int)': E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp:126:4: error: 'unique_ptr' is not a member of 'std' E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp:126:35: error: expected primary-expression before '>' token E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp:126:37: error: 'pImageSet' was not declared in this scope Process terminated with status 1 (0 minutes, 1 seconds) 3 errors, 1 warnings

    Build massages is:

    c:\mingw\bin..\lib\gcc\mingw32\4.7.2\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]|

    E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp||In constructor 'Framework::SceneTexture::SceneTexture(const string&, unsigned int)':|

    E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp|126|error: 'unique_ptr' is not a member of 'std'|

    E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp|126|error: expected primary-expression before '>' token|

    E:\Krzysiek\OGL\Tutorial 0.3.8\framework\Scene.cpp|126|error: 'pImageSet' was not declared in this scope|

    ||=== Build finished: 3 errors, 1 warnings ===|

    Is it well I've done this? What have I to do now?

  3. Jason McKesson repo owner

    Deprecated does not mean removed. Those headers and code were fine. They aren't going anywhere until at least C++14, and I guarantee you that the C++ standards committee isn't going to break lots of C++ code by removing them.

    In short: ignore the warnings; your "fixes" turned warnings into errors. I can't diagnose build problems if you change my code.

    Also, please try to put any future output logs in proper Markdown tags. Specifically the code tags. It makes it much easier to read.

  4. christofer reporter

    Well, I changed back code and if I build tut1 without changing freeglut_std.h, build messages are:

    ..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]|
    c:\mingw\bin\..\lib\gcc\mingw32\4.7.2\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:\mingw\bin\..\lib\gcc\mingw32\4.7.2\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:\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|
    c:\mingw\bin\..\lib\gcc\mingw32\4.7.2\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]|
    ||=== Tut 01 Main, Debug ===|
    ..\glsdk\freeglut\include\GL\freeglut_std.h|60|warning: "NOMINMAX" redefined [enabled by default]|
    c:\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\c++\mingw32\bits\os_defines.h|46|note: this is the location of the previous definition|
    ||=== Build finished: 4 errors, 5 warnings ===|
    

    When I change this one, these are:

    ||=== framework, Debug ===|
    c:\mingw\bin\..\lib\gcc\mingw32\4.7.2\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]|
    ||=== Build finished: 0 errors, 1 warnings ===|
    

    But when I try to run this, there are console's window and message of Win7 that program stopped working: screen

  5. Jason McKesson repo owner

    Can you translate what that error message is? When you debug the program, where does it stop?

    Also, none of those are compiler errors. Even though it does say "4 errors", it's wrong. Redefinition is a warning; Code::Blocks simply erroneously thinks that it's an error.

  6. christofer reporter

    It is something like: Program Tut 01 MainD.exe stopped working. System Windows is searching solution to the problem.

    Info of debugger is:

    Building to ensure sources are up-to-date
    Build succeeded
    Selecting target: 
    Debug
    Adding source dir: E:\Krzysiek\OGL\Tutorial 0.3.8\Tut 01 Hello Triangle\
    Adding source dir: E:\Krzysiek\OGL\Tutorial 0.3.8\Tut 01 Hello Triangle\
    Adding file: Tut 01 MainD.exe
    Starting debugger: 
    done
    Registered new type: wxString
    Registered new type: STL String
    Registered new type: STL Vector
    Setting breakpoints
    Debugger name and version: GNU gdb (GDB) 7.5
    Child process PID: 3308
    Program received signal SIGSEGV, Segmentation fault.
    In libstdc++-6!_ZNSsC1EPKcRKSaIcE () (C:\Windows\system32\libstdc++-6.dll)
    At E:\Krzysiek\OGL\Tutorial 0.3.8\Tut 01 Hello Triangle\tut1.cpp:77
    

    This is call stack

  7. Jason McKesson repo owner

    Unfortunately, no.

    I've built and run the executable in debug through Code::Blocks on Windows before. It seems to work fine for me. There is nothing on line 77 that would appear suspect. And I have no idea where it's getting wxString from, since neither my code nor any code it depends on uses wxWidgets.

    The crash appears to be happening before main, in the allocation of one of the std::string objects. I cannot imagine why this would happen.

    There's just nothing I can really do about it at this point without being physically on your machine.

  8. Log in to comment