VC++ 2008 Express crashes after linking

Started by
5 comments, last by RobotGymnast 16 years, 1 month ago
I'm using Visual C++ 2008 Express Edition. I'm trying to run multiple different OpenGL codes using different libraries, and have even tried on different computers, but every time I hit compile, the compiler crashes and restarts. I've tried it with simple code, eg. int main(){return 0;} but it still crashes! Am I adding the libraries wrong? I go to project -> properties -> configuration properties -> linker -> input -> additional dependencies, then I add the library I want to link.. Is this right? Is there another way to do it inside the actual code (like my friend said something about #pragma or something) Thanks
Advertisement
#pragma comment(lib, "LIBRARYNAME.lib")

Not at ALL recommended, as it's VS specific, and it's subject to change as well. When you say the compiler is crashing, what exactly do you mean? Are you getting an error?
"I'd rather know one thing, no matter how ordinary, than discourse endlessly on great issues." -- Galileo
I mean the program gets an error and tells me it needs to close.

and thanks, the pragma way works
You don't get the crashes now that you use the pragma statement?
"I'd rather know one thing, no matter how ordinary, than discourse endlessly on great issues." -- Galileo
Yeah.. It's weird, it happened on both computers o_O
Yeah, that's weird... something tells me you weren't setting up your linker settings right. Did you try building it in release mode, and seeing if that made a difference?
"I'd rather know one thing, no matter how ordinary, than discourse endlessly on great issues." -- Galileo
didn't try that. I used the default linker settings -_-

This topic is closed to new replies.

Advertisement