Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24

    Getting General Error c1010070 when building code in VS2008


    I just started to get back into C++, and had installed VS2008 on my machine (I am using a macbook with MacOS X 10.5.2, with Vista as my VM).

    I'm starting right from the beginning on a book that I had for a few years now.

    First off, here's the code:

    Code:
    #include <iostream>
    
    int main()
    {
    std::cout << "Hello World!\n";
    return 0;
    }
    And I am getting this error when I go to build:

    Code:
    ------ Build started: Project: Listing 1.1, Configuration: Debug Win32 ------
    Embedding manifest...
    .\Debug\Listing 1.1.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
    Build log was saved at "file://c:\Work\C++\Listing 1.1\Listing 1.1\Debug\BuildLog.htm"
    Listing 1.1 - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    I am very new to VS2008, and would love to learn how to use it more. I have no idea about what this error means, and based upon the code I put in, it should not be this complicated to do a simple "Hello World!" program.

    Any advice on this is greatly appreciated.
    -Jason Clark
  2. #2
  3. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,964
    Rep Power
    4851
    I suspect you set up your project improperly. Exactly what steps did you go through from beginning to end?
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24
    Originally Posted by sizablegrin
    I suspect you set up your project improperly. Exactly what steps did you go through from beginning to end?
    I do not recall the exact steps, but in a nutshell, here's what I did...

    I set up a Win32 Console application (which the book calls for any type of console app.). I created this as an empty project as well.

    I'm going to walk through the process again, I will keep a closer eye on anything that stands out, and report back.
    -Jason Clark
  6. #4
  7. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,964
    Rep Power
    4851
    I did that as well. It works perfectly. Under your projects directory you should have a directory with the name of the project (Listing 1.1). Under that should be a debug directory (I see the debug mode in your build info) and another directory with your project name repeated. In the debug directory under that, you should see your manifest file. The higher level debug directory should have your executable, once you reach that point.

    Comments on this post

    • JSClark agrees : A little rep your way for your help... Thanks!
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24
    Originally Posted by sizablegrin
    I did that as well. It works perfectly. Under your projects directory you should have a directory with the name of the project (Listing 1.1). Under that should be a debug directory (I see the debug mode in your build info) and another directory with your project name repeated. In the debug directory under that, you should see your manifest file. The higher level debug directory should have your executable, once you reach that point.
    Are you using VS2008?

    I will be documenting this step-by-step. Hopefully this may help, as I tried it again, and failed again.

    - Going into VS 2008, I select New Project, under the Visual C++ Project Types, I select Win32.
    - From here, I go to select Win32 Console Application, and then type in the name as "Listing 1.1".
    - On the next screen that comes up, the Application Wizard comes up. I click on Next to bring up the Application Settings screen. I tried the "Precompiled Header" box as checked, which created the .cpp source code file for me, however, called the wrong header as to what I needed. At this point, I chose "Empty Project" and clicked on finish.
    - From here, I right-click on "Source Files", click "Add", then "New Item". Under the Visual C++ -> Code category, I select C++ File (.cpp), and type in the file name ("Listing 1.1.cpp"). Type in the code and do a Save. From here, there is a yellow stripe that follows along as I type in the code, and once I hit the save button, it turns green.
    - Once I tell VS to build the selection, I get the error. However, the weird thing is, if I close out the solution without saving, then open it back up and build again, the build runs fine?
    - But then, if I go to LINK the project and try to create an .exe file, I am presented with a new error...

    Code:
    ------ Build started: Project: Listing 1.1, Configuration: Debug Win32 ------
    Linking...
    LINK : error LNK2001: unresolved external symbol _mainCRTStartup
    C:\Work\C++\Listing 1.1\Debug\Listing 1.1.exe : fatal error LNK1120: 1 unresolved externals
    Build log was saved at "file://c:\Work\C++\Listing 1.1\Listing 1.1\Debug\BuildLog.htm"
    Listing 1.1 - 2 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    I am seriously beginning to wonder what is up with this program... nothing but frustration so far.
    -Jason Clark
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24
    Well, it appears that I found out what the problem is after numerous attempts and fails (with ONE success!)

    I think VS2008 did not like that I was using "Listing 1.1" as the project name and source code filename. I replaced both these with "Listing1_1", worked like a charm!

    Thanks!
    Last edited by JSClark; May 27th, 2008 at 12:02 AM. Reason: Late night coding makes my typing wonky...
    -Jason Clark
  12. #7
  13. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,964
    Rep Power
    4851
    Forget the frustration. You probably had to learn how to use a hammer, too. It goes with any new tool

    You don't want the precompiled header. Further, you can shorten the process.

    1. Click File>New>Project
    2. Select General in the left pane, Empty Project in the right pane.
    3. Name the project and click Finish.
    4. Now open the project.
    5. Click Project>Add Existing Item.
    6. Browse to your .cpp file, select it, and click Add.
    7. Double click it in the Explorer pane to open a copy.
    8. Click Build Solution
    Correct any errors and rebuild until it's all okay.
    Run it.

    You can do this by going through Win32 like you did, and selecting the Console Application,
    name it, and click OK.

    When you get to the next pane, choose Next instead of Finish. Make sure you select Console and Empty Project on the next screen, then click Finish. Proceed from step 4, above.
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  14. #8
  15. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,073
    Rep Power
    1802
    Seems you have solved it, but using dots in a file name is probably a bad idea in any application. Spaces are a bad idea too.

    For future reference note the line in the log that says:

    Code:
    Build log was saved at "file://c:\Work\C++\Listing 1.1\Listing 1.1\Debug\BuildLog.htm"
    That contains information that might have been useful in diagnosis.
  16. #9
  17. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,964
    Rep Power
    4851
    I suspected the dots and spaces, also; consequently, I used the same name (Listing 1.1) on my second attempt, after using "hmmmmm" successfully, and it worked, as well.
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24
    Originally Posted by sizablegrin
    Forget the frustration. You probably had to learn how to use a hammer, too. It goes with any new tool

    You don't want the precompiled header. Further, you can shorten the process.

    1. Click File>New>Project
    2. Select General in the left pane, Empty Project in the right pane.
    3. Name the project and click Finish.
    4. Now open the project.
    5. Click Project>Add Existing Item.
    6. Browse to your .cpp file, select it, and click Add.
    7. Double click it in the Explorer pane to open a copy.
    8. Click Build Solution
    Correct any errors and rebuild until it's all okay.
    Run it.

    You can do this by going through Win32 like you did, and selecting the Console Application,
    name it, and click OK.

    When you get to the next pane, choose Next instead of Finish. Make sure you select Console and Empty Project on the next screen, then click Finish. Proceed from step 4, above.
    I'm pretty sure I tried it that way as well last night, and kept getting the same errors, but as we all agree, it was the naming convention that I was using.
    -Jason Clark
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24
    Originally Posted by clifford
    Seems you have solved it, but using dots in a file name is probably a bad idea in any application. Spaces are a bad idea too.

    For future reference note the line in the log that says:

    Code:
    Build log was saved at "file://c:\Work\C++\Listing 1.1\Listing 1.1\Debug\BuildLog.htm"
    That contains information that might have been useful in diagnosis.
    Nope, no diagnosis in there. I checked after my first few errors.
    -Jason Clark
  22. #12
  23. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,964
    Rep Power
    4851
    Actually, I have a perfectly working "Listing 1.1" project....
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24
    Originally Posted by sizablegrin
    Actually, I have a perfectly working "Listing 1.1" project....
    THat's too weird.

    I just did a couple more programs, and they all worked fine now.

    And you are using Visual Studio 2008, correct?
    -Jason Clark
  26. #14
  27. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,964
    Rep Power
    4851
    Yep. I still wouldn't recommend dots and spaces in names, though.
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Massachusetts
    Posts
    278
    Rep Power
    24
    Originally Posted by sizablegrin
    Yep. I still wouldn't recommend dots and spaces in names, though.
    I have been keeping all my names to one name, no spaces, etc.
    -Jason Clark
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo