Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid question?

Status
Not open for further replies.

JaybOt

Programmer
Apr 18, 2001
101
0
0
GB
Hi all,

I have just started a to write code in c++ under windows ME , and I have also been writing code under unix. With this i mind, is it possible to use the windows .lib and .h library and header files under unix? Can one be converted to the other? E.g. Can i convert .lib file to .a ,or how would i go about recompiling the library file under unix?

All comment welcome,

Thanks, JayBot.

"Always know what you say, but don't always say what you know!"
 
As a rule, library functions have code that is locked into a specific operating system. Some header files do, too. What most companies do is create libraries for Windows, Linux, OS/2, Unix, or whatever so when the source code calls a library function, the source code needs only be recompiled with the other OS's library. This is because each OS has its own functions. For example, unlink deletes a file in DOS, Windows, or Unix but each OS uses a different function call to delete the file.

Now having said that, it really depends on how much your library and header files call OS functions. I will say that Borland is trying to create a C++ version that can be easily compiled under Windows or Linux. See for more info. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Thanks! "Always know what you say, but don't always say what you know!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top