2

There's a #pragma command to link in a library from the source file rather than from the project settings. I just can't seem to remember it.

Can anyone here remind me?

Thanks

4
  • 3
    This is compiler-specific and does not work, in general, in C++. Commented Mar 4, 2010 at 10:27
  • Linking is outside the scope of a source file. Linking usually involves combining translated source files without their knowledge. This is commonly done in a makefile, build file or project file. Commented Jun 15, 2012 at 19:38
  • What compiler & platform? Could be different on PC, Linux or embedded system. Commented Jun 15, 2012 at 19:39
  • This question is similar to: How can I add a (.a) static library to a C++ program?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Commented Jan 4 at 1:30

2 Answers 2

6
#pragma comment(lib, "library") 

http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx

Sign up to request clarification or add additional context in comments.

Comments

2

You mean this thing #pragma comment(lib, "Library")

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.