hi!
I'm trying to link an external library to my project. I have tried
to add a .lib file, but I was not able to select the file. Then, I
tried to use: #pragma comment(lib,"FreeImage"), but when I compile the
project, it returns me the following: illegal #pragma, and when I debug
the project, it returns me: link error, because it cannot find the
library.
Please help me!!!
Thanks.
--
mireCW
------------------------------------------------------------------------
Denis @ Work - 30 Jun 2004 21:35 GMT
Looks to me like a MS-VS pragma I should know I use it all the time.
I don't think it is supported in CW.
If that is the case you can place it in a #ifdef _MSC_VER, OR #ifdef WIN32,
#endif pair.
Anyhow, it means to the linker (Not the compiler) To link that particular
lib
as part of the lib resolution.
Denis Co
> hi!
> I'm trying to link an external library to my project. I have tried
[quoted text clipped - 13 lines]
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------
MW Ron - 30 Jun 2004 21:39 GMT
>hi!
>I'm trying to link an external library to my project. I have tried
>to add a .lib file, but I was not able to select the file.
Then it is the wrong file type. that is why it is greyed out. You are
probably trying to use a CFM library one a Mach-O or vice versa
Ron
> Then, I
>tried to use: #pragma comment(lib,"FreeImage"), but when I compile the
>project, it returns me the following: illegal #pragma, and when I debug
>the project, it returns me: link error, because it cannot find the
>library.
pragma comment is not on all platforms (I'm not sure if it is supported
at all) use pragma message instead
Ron

Signature
Metrowerks, one of the world¹s top 100 companies and influencers
in the software development industry. - SD Times May 2004
http://www.sdtimes.com/2004sdt100.htm
Metrowerks, maker of CodeWarrior
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com