Code showing error

This is a discussion on Code showing error within the C++ Programming forums, part of the General Programming Boards category; Dear folks, I tried to run a c++ project that I made in Code blocks. I got it from my ...

  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
    21,588
    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?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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,139
    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
    21,588
    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.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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
    21,588
    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.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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,139
    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
    2,541
    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 06:12 AM.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

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, 12:15 AM
  2. GDB showing memory error
    By SasDutta in forum C Programming
    Replies: 3
    Last Post: 12-17-2010, 12:51 PM
  3. number is showing as 2?
    By Corleone in forum C Programming
    Replies: 8
    Last Post: 11-12-2007, 09:12 PM
  4. programs are not showing!
    By Buckz in forum C++ Programming
    Replies: 19
    Last Post: 12-29-2005, 05:58 PM
  5. Pic not showing up
    By Hunter2 in forum Game Programming
    Replies: 14
    Last Post: 11-13-2002, 12:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21