Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. error C2512: 'Cryptography::CRC32' : no appropriate default constructor available

error C2512: 'Cryptography::CRC32' : no appropriate default constructor available

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
10 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CiNN
    wrote on last edited by
    #1

    librarie project namespace Cryptography { class __declspec(dllexport) CRC32 { public: CRC32(void); [..] } } test program project using namespace Cryptography; CRC32 *pcrc=new CRC32(); when I try to use my CRC32 class I get this error error C2512: 'Cryptography::CRC32' : no appropriate default constructor available whats up ?? :sigh:

    M C C 3 Replies Last reply
    0
    • C CiNN

      librarie project namespace Cryptography { class __declspec(dllexport) CRC32 { public: CRC32(void); [..] } } test program project using namespace Cryptography; CRC32 *pcrc=new CRC32(); when I try to use my CRC32 class I get this error error C2512: 'Cryptography::CRC32' : no appropriate default constructor available whats up ?? :sigh:

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Since noone else has replied... Your code as shown compiles for me (if I add the missing semicolon and comment out the "[..]") with no errors/warnings. Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      C 1 Reply Last reply
      0
      • C CiNN

        librarie project namespace Cryptography { class __declspec(dllexport) CRC32 { public: CRC32(void); [..] } } test program project using namespace Cryptography; CRC32 *pcrc=new CRC32(); when I try to use my CRC32 class I get this error error C2512: 'Cryptography::CRC32' : no appropriate default constructor available whats up ?? :sigh:

        C Offline
        C Offline
        Chris Meech
        wrote on last edited by
        #3

        Just a guess, but are you sure that when you compile your test program that the code class __declspec(dllexport) CRC32 becomes class __declspec(import) CRC32

        Chris Meech I am Canadian. [heard in a local bar]

        C 1 Reply Last reply
        0
        • C Chris Meech

          Just a guess, but are you sure that when you compile your test program that the code class __declspec(dllexport) CRC32 becomes class __declspec(import) CRC32

          Chris Meech I am Canadian. [heard in a local bar]

          C Offline
          C Offline
          CiNN
          wrote on last edited by
          #4

          I guess it does I just replaced the EXPORTS macro Visual Studio made for my code to be explicit on the forum. btw I'm using visual studio 2008 beta 2

          1 Reply Last reply
          0
          • M Mark Salsbery

            Since noone else has replied... Your code as shown compiles for me (if I add the missing semicolon and comment out the "[..]") with no errors/warnings. Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            C Offline
            C Offline
            CiNN
            wrote on last edited by
            #5

            I don't seee anything that would prevent it from running either... I don't know whats wrong...

            D M 2 Replies Last reply
            0
            • C CiNN

              librarie project namespace Cryptography { class __declspec(dllexport) CRC32 { public: CRC32(void); [..] } } test program project using namespace Cryptography; CRC32 *pcrc=new CRC32(); when I try to use my CRC32 class I get this error error C2512: 'Cryptography::CRC32' : no appropriate default constructor available whats up ?? :sigh:

              C Offline
              C Offline
              CiNN
              wrote on last edited by
              #6

              here is le test project source for visual studio 2008 b2

              1 Reply Last reply
              0
              • C CiNN

                I don't seee anything that would prevent it from running either... I don't know whats wrong...

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                CiNN wrote:

                I don't seee anything that would prevent it from running either...

                Running or compiling?


                "A good athlete is the result of a good and worthy opponent." - David Crow

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                C 1 Reply Last reply
                0
                • D David Crow

                  CiNN wrote:

                  I don't seee anything that would prevent it from running either...

                  Running or compiling?


                  "A good athlete is the result of a good and worthy opponent." - David Crow

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  C Offline
                  C Offline
                  CiNN
                  wrote on last edited by
                  #8

                  both since I can't compile I can't run

                  1 Reply Last reply
                  0
                  • C CiNN

                    I don't seee anything that would prevent it from running either... I don't know whats wrong...

                    M Offline
                    M Offline
                    Mark Salsbery
                    wrote on last edited by
                    #9

                    Hmm since I copied the code and compiled it, I can only assume your'e not showing us something :) Mark

                    Mark Salsbery Microsoft MVP - Visual C++ :java:

                    C 1 Reply Last reply
                    0
                    • M Mark Salsbery

                      Hmm since I copied the code and compiled it, I can only assume your'e not showing us something :) Mark

                      Mark Salsbery Microsoft MVP - Visual C++ :java:

                      C Offline
                      C Offline
                      CiNN
                      wrote on last edited by
                      #10

                      my last post has the source code which still don't compile with me http://www.rarhost.com/download-pvyb7b.html

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups