Thread: Code showing error

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    73

    Code showing error

    Dear folks,


    I tried to run a c++ project that I made in Code blocks. I got it from my supervisor and my task it to run it properly. I have basic knowledge of C++ programming and now a days, trying to improve. In the time of compiling the the code shows lots of error. Anyone could help me to run it properly ? I heard that I need to install Intel TBB library but dont know how to do that. Errors are -


    ||=== CFD Code, Debug ===|


    mungsmechanik\CFD Code\glbcls.h|5|error: /opt/tbb30_104oss/include/tbb/tick_count.h: No such file or directory|

    mungsmechanik\CFD Code\glbcls.h|19|error: ISO C++ forbids declaration of 'Real' with no type|

    mungsmechanik\CFD Code\glbcls.h|19|error: typedef 'Real' is initialized (use decltype instead)|

    mungsmechanik\CFD Code\glbcls.h|19|error: 'Interpolation_FP' was not declared in this scope|

    mungsmechanik\CFD Code\glbcls.h|36|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|76|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|77|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|78|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|102|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|103|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|104|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|112|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|115|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|151|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|152|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|154|error: 'Real' does not name a type|

    mungsmechanik\CFD Code\glbcls.h|155|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|156|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|157|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|158|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|161|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|165|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|166|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|171|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|172|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|173|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|174|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|175|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|176|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|191|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|194|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|195|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|216|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|221|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|222|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|222|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|222|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|231|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|244|error: 'Real' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|263|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|264|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|265|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|269|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|270|error: 'Real' does not name a type|
    mungsmechanik\CFD Code\glbcls.h|276|error: 'tbb' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|276|error: ISO C++ forbids declaration of 'interval_t' with no type|
    mungsmechanik\CFD Code\glbcls.h|276|error: expected ';' before 'GPUmm'|
    mungsmechanik\CFD Code\glbcls.h|277|error: 'tbb' has not been declared|
    mungsmechanik\CFD Code\glbcls.h|277|error: ISO C++ forbids declaration of 'interval_t' with no type|
    mungsmechanik\CFD Code\glbcls.h|277|error: expected ';' before 'CPUmm'|
    ||More errors follow but not being shown.|
    ||Edit the max errors limit in compiler options...|
    ||=== Build finished: 50 errors, 0 warnings ===|

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by chaklader
    I tried to run a c++ project that I made in Code blocks. I got it from my supervisor and my task it to run it properly. I have basic knowledge of C++ programming and now a days, trying to improve. In the time of compiling the the code shows lots of error. Anyone could help me to run it properly ? I heard that I need to install Intel TBB library but dont know how to do that.
    So, you are using a library, but it is not installed or otherwise available?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    mungsmechanik\CFD Code\glbcls.h|5|error: /opt/tbb30_104oss/include/tbb/tick_count.h: No such file or directory|
    Obviously there is no such file. Solve this first. There is really nothing we could do about it. Seems to be a tbb file, so google for tbb, that will bring up the official site. The go there and click on downloads. Pick the version you need. Follow the installation instructions.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    73
    I guess that its from this page : TBB Home

    Now I will try to install it and let you know again. However, thanks for the comments

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    73
    I downloaded the TBB for windows but there is nothing to install. Some folders named - bin, lib, doc, include, build, examples, src etc. src folder contains some c++ source and header file. Anyone knows how to use Intel TBB with a C++ project ?

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    There may be a file named INSTALL.txt or similiar. Read it. It may amount to merely extracting the contents to a suitable location, possibly compiling the sources, and then including the relevant headers and possibly linking to the compiled library from your program.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    73
    Thanks laserlight. However, there is only a text file Changes.txt that mainly confirms the modifications of the TBB from previous versions. I put my project in : D:\Lehrstuhl für Aerodynamik und Strömungsmechanik\CFD Code and installed the code blocks in : C:\Program Files\CodeBlocks. My intel TBB is here : D:\Lehrstuhl für Aerodynamik und Strömungsmechanik\Intel TBB\tbb40_233oss
    I dont know where exactly I need to put that TBB stuff as there is no information and also which ones I need to compile. Same for the including header files as well.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by chaklader
    I dont know where exactly I need to put that TBB stuff as there is no information and also which ones I need to compile. Same for the including header files as well.
    They have documentation on the website. Since you are using Code::Blocks, your compiler is presumably g++, so follow the instructions relevant to GCC.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Registered User
    Join Date
    May 2010
    Posts
    73
    Just to let you know that as header file I used #include "tick_count.h" but it seems still the same error is coming --> mungsmechanik\CFD Code\glbcls.h|5|error: /opt/tbb30_104oss/include/tbb/tick_count.h: No such file or directory|

  10. #10
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Your compiler is probably right. There is no such file. It is included in the package you downloaded. Maybe you should read the documentation first, there is a "Getting started" guide on their page including a "Setup" step.

    And if you can, drop the O-Umlaut from your path or replace it with oe. That's just a big problem waiting to happen. Don't use non-ASCII characters in programming. Ich hatte schon mehr als genug Probleme damit.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  11. #11
    Registered User
    Join Date
    May 2010
    Posts
    73
    Well, it is Germany

  12. #12
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    FYI: I never read anything about TTB before today and have still not used it.

    Note: I am guessing windows based on the backslash in "mungsmechanik\CFD Code\glbcls.h".
    It may make difference if it is CygWin, MSys, or MinGW setup.

    From what I read the Windows Binary is for the Visual C++ Compilers(vc8,vc9,vc10).
    Note: You can use the Visual C++ Compiler under Code::Blocks.
    You need to determine what Compiler you are supposed to be using.

    If MinGW G++ Compiler you most likely need to build it yourself or find a Binary build already done for it.
    Note: I only looked at the OSS links on TBB site, it is possible the commercial version has MinGW GCC builds.
    The clearest direction I found to build it for MinGW GCC; I only followed 6 Google links.

    Building/Linking to TBB under MinGW - Stack Overflow

    Tim S.
    Last edited by stahta01; 01-25-2012 at 07:12 AM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code showing error
    By chaklader in forum C++ Programming
    Replies: 5
    Last Post: 01-05-2012, 01:15 AM
  2. GDB showing memory error
    By SasDutta in forum C Programming
    Replies: 3
    Last Post: 12-17-2010, 01:51 PM
  3. number is showing as 2?
    By Corleone in forum C Programming
    Replies: 8
    Last Post: 11-12-2007, 10:12 PM
  4. programs are not showing!
    By Buckz in forum C++ Programming
    Replies: 19
    Last Post: 12-29-2005, 06:58 PM
  5. Pic not showing up
    By Hunter2 in forum Game Programming
    Replies: 14
    Last Post: 11-13-2002, 01:19 PM