🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
8 messages
8 total messages Started by Rusty Thu, 27 Mar 2003 16:57
Including a .lib file in a custom component
#17276
Author: Rusty
Date: Thu, 27 Mar 2003 16:57
9 lines
1243 bytes
Greetings:

I am trying to create a custom component like TColorBox that has additional
support for colors with alpha.  I would like to use GDI+ to draw the color
square in the color box.  I can't seem to find a way to add the gdiplus.lib
file to my project.  What is the proper way for accomplishing this?

All the Best,
Rusty
Re: Including a .lib file in a custom component
#17279
Author: Remy Lebeau (TeamB)
Date: Thu, 27 Mar 2003 18:47
16 lines
1514 bytes
Did you try using the IDE's "Add to Project" option?

Are you using Microsoft's original gdiplus.lib file?  If so, it probably
won't work even if you do add it to the project.  Microsoft's library
formats are not compatible with Builder.  You would need to find the
original DLL and run it through Builder's IMPLIB tool to generate a
compatible import .lib file, if you haven't already.


Gambit

"Rusty" <rustyr@redstorm.com> wrote in message
news:3e832d86@newsgroups.borland.com...

> I can't seem to find a way to add the gdiplus.lib file
> to my project.
Re: Including a .lib file in a custom component
#17281
Author: Rusty
Date: Thu, 27 Mar 2003 19:52
6 lines
1292 bytes
I did implib the library from the gdiplus.dll, but, whenever I add it, the
following error message pops up:

Error: One or more lines were too long and have been truncated.

Is that happening because builder is trying to open the file in text format?
Re: Including a .lib file in a custom component
#17283
Author: Remy Lebeau (TeamB)
Date: Thu, 27 Mar 2003 20:37
23 lines
1619 bytes
"Rusty" <rustyr@redstorm.com> wrote in message
news:3e835663$1@newsgroups.borland.com...
> I did implib the library from the gdiplus.dll

Ok, just making sure.

> but, whenever I add it, the following error message pops up:
>
> Error: One or more lines were too long and have been truncated.

It sounds like you're trying to add it as a source file, not a library, so
that the IDE tries to parse and compile it as a text file instead.

How EXACTLY did you add the library to the project?

> Is that happening because builder is trying to open the file in text
format?

Sounds like it.


Gambit
Re: Including a .lib file in a custom component
#17287
Author: Rusty
Date: Thu, 27 Mar 2003 23:43
11 lines
1645 bytes
*I made dclusr.bpr the active project
*Then I went to Project->Add to Project
*On the Add Unit tab, I clicked on the Browse button.
*In the dialog, I specified *.lib as my filter, located the lib file I
wanted to include and hit OK
*Then, I clicked on OK in the Add Dialog
*Then I get the error message

Even though I get the error message, it still seems to add it correctly.  My
project was able to link to the stuff it could not find before.  Should I
even worry about it?
Re: Including a .lib file in a custom component
#17292
Author: nicolasr
Date: Fri, 28 Mar 2003 00:22
11 lines
1393 bytes
Hmm...
I had the same error with resource files I added to the component sometimes.
But it always seemed to work correctly.
Nick

> Even though I get the error message, it still seems to add it correctly.
My
> project was able to link to the stuff it could not find before.  Should I
> even worry about it?
>
>
Re: Including a .lib file in a custom component
#17295
Author: Darren Stone
Date: Fri, 28 Mar 2003 05:53
24 lines
2023 bytes
Rusty wrote:

> *I made dclusr.bpr the active project
> *Then I went to Project->Add to Project
> *On the Add Unit tab, I clicked on the Browse button.
> *In the dialog, I specified *.lib as my filter, located the lib file I
> wanted to include and hit OK
> *Then, I clicked on OK in the Add Dialog
> *Then I get the error message
> 
> Even though I get the error message, it still seems to add it correctly.  My
> project was able to link to the stuff it could not find before.  Should I
> even worry about it?

If the IDE is giving you troubles, you can accomplish the same thing by 
adding...

   #pragma link "gdiplus.lib"

... to one of your project's source files.  The linker will search 
through your project's library-path for this file.

Regards,
-- darren
Re: Including a .lib file in a custom component
#17302
Author: Vladimir Afanasyev
Date: Fri, 28 Mar 2003 10:50
23 lines
1785 bytes
Hi,

Darren Stone <dastone_spam_@engr.uvic.ca> wrote:

>
>If the IDE is giving you troubles, you can accomplish the same thing by 
>adding...
>
>   #pragma link "gdiplus.lib"
>
>.... to one of your project's source files.  The linker will search 
>through your project's library-path for this file.
>

I had similar problem with using cfgmg32.dll in my 
TPortControl component.
I used various way to accomplish it (#pragma also) but 
without success.
Only way that worked was dynamic loading.
It seems that .lib file was incorrect (I used implib).
But cfgmg32.dll is from DDK so may because.
Vladimir.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads