Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / June 2004



Tip: Looking for answers? Try searching our database.

illegal #pragma comment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mireCW - 30 Jun 2004 18:42 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, 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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.