GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-Jan-2005, 17:23
george george is offline
New Member
 
Join Date: Jan 2005
Posts: 13
george is on a distinguished road

Can I import another Lib while I am creating a static library in C++.Net? How?


Can I import another Lib while I am creating a static library in MSVC++.Net? How?
  #2  
Old 06-Jan-2005, 02:00
george george is offline
New Member
 
Join Date: Jan 2005
Posts: 13
george is on a distinguished road
no body answered?

ok, I will give a simple example:

file: a.Lib
CPP / C++ / C Code:
==================================
function: 
     int getInt( int input ){
         return input*2;
     }
==================================

file: b.Lib
CPP / C++ / C Code:
function:
     CString getStr( int in ){
        CString c;
        return c.Format( "%d", getInt( in ));
     }
==================================

b.Lib imports and calls the function getInt() from a.Lib
and then another MFC application need to import and call the function getStr() from b.Lib

The problem is:
In Virual Studio.Net(MSVC++.Net), usually I can link the input Lib file through Project Properties->Linker->Input-> b.Lib

But, I could not find "Linker" in the same place to import a.Lib when I tried to create b.Lib...why?

The procedure I created b.Lib project wasin Virual Studio.Net)
File->New->Project->Virual C++ Projects->Win32 Project->Application Settings->Static Library->Finish

Is there any problem or we just can not link a Lib when creating a Lib?

Hope someone can take me out from confusions

Cheers
George
Last edited by LuciWiz : 06-Jan-2005 at 16:02. Reason: Please insert your C code between [c] & [/c] tags
  #3  
Old 06-Jan-2005, 16:07
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 918
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough
Sure you can!
The only difference is that the property page is called in this case Librarian, instead of Linker->Input. Static library projects don't have the "Linker" property page at all.

Hope this helps!

Best regards,
Luci
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
 
 

Recent GIDBlogWriting a book by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Introduction to .NET LuciWiz .NET Forum 5 09-Aug-2007 04:53
calling a DLL in a static library csuohio C++ Forum 3 05-Aug-2004 05:14
calling a DLL in static library in visual c++.net or visualc++ 6.0 csuohio MS Visual C++ / MFC Forum 0 30-Jul-2004 14:35

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:19.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.