Jump to content
  • Advertisement
Sign in to follow this  
Silicon Seed

exe to be used for the debug session?

This topic is 3794 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I opened someone elses Visual Studio project and fixed the bugs in it but now that the build is succeding it is asking me this: "Please specify the name of the executable file to be used for the debug session." If I point it at the Visual Studio EXE it just opens another copy of Visual Studio and says that this exe doesnt have debugger information... Does anyone know? I have never been asked this before when creating my own projects. I am new to this whole thing though.

Share this post


Link to post
Share on other sites
Advertisement
You may be building it as a library rather then an executable. This is the only time that I have seen it, anyways.

If it is supposed to be an executable and not a library, go to Project Properties->Configuration Type and insure it is Application (.exe) and then rebuild the solution.

If it is supposed to be a library, then you need an application to link it with. You cannot execute libraries by themselves (which is what seems to be happening here)

Dynamic libraries are a little different, but lets not go there ;)

Share this post


Link to post
Share on other sites
Humm.. you were right. Thats odd, this wasnt meant to be a library. Well I changed it to an application and now it have 1 unresolved error

It says "LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup"

Thats a general Visual Studio library.. how could it have a undefined symbol? Now I guess I am going off subject...

Share this post


Link to post
Share on other sites
Quote:
It says "LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup"

main() is only for executables. Because its not in this project, I am suspecting it was meant to be a library and not an application.. (libraries do not have an entry point like applications do.)

(I am excluding the Win32's DllMain() routine here, but thats only used for DLLs and is optional anyways)

You will need to define main(), which is the entry point for your program.

---

If this is a Visual Studio library, then I am suspecting you need to build your application and statically link with it in order to use it.

Share this post


Link to post
Share on other sites
Here is the main statement in main.cpp under Common Files:
void main(int argc, char** argv)
{
// Set up GLUT and the timers
glutInit(&argc, argv);
TimingData::init();

// Create the application and its window
app = getApplication();
createWindow(app->getTitle());

// Set up the appropriate handler functions
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
glutDisplayFunc(display);
glutIdleFunc(update);
glutMouseFunc(mouse);
glutMotionFunc(motion);

// Run the application
app->initGraphics();
glutMainLoop();

// Clean up the application
app->deinit();
delete app;
TimingData::deinit();
}

Share this post


Link to post
Share on other sites
You need to change your system type from /WINDOWS to /CONSOLE int he linker options (or recreate the project as a Console app and not a Windows app).

Share this post


Link to post
Share on other sites
I think I might see what is happening here: Part of the project (the physics engine) wants to be a library when compiled. The other part called Ballistic wants to be an EXE, but when it compiles the libaray it wants to know where the exe is that hasnt been created yet. Can't it just figure all that out??!?

Share this post


Link to post
Share on other sites
Quote:
Here is the main statement in main.cpp under Common Files:

What do you mean by common files? With this code, do you still get the
same error? If so, then your file is still not being built with the project.

Share this post


Link to post
Share on other sites
Quote:
Original post by Silicon Seed
I think I might see what is happening here: Part of the project (the physics engine) wants to be a library when compiled. The other part called Ballistic wants to be an EXE, but when it compiles the libaray it wants to know where the exe is that hasnt been created yet. Can't it just figure all that out??!?

Wait, I think I know whats going on: Project Dependencies. You need to tell what order to build your projects in to insure the needed libraries or executables are built before the others that rely on them.

Right click your project->Project Dependencies. Set what projects depend on what and check it with the Build Order tab.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!