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? 1

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!"
 
Executables, libraries, dlls etc., created under Windows will not work directly on Unix platforms (unless you are using some kind of emulator, such as Wine).

If your program (i.e source code) makes use of GUI/graphics code on Windows then it is unlikely to compile on Unix.

You cannot use libraries created under Windows for use on
Unix but you may be able to use the .h files, it depends upon what they actually contain. If your program uses simple input/output (say from a file/to a DOS or 'terminal'
window) and doesn't contain graphic or GUI dependencies, then there is a good chance that it will port from one system to the other.

Note however, that there are a number of systems available (& some like the Fox Toolkit are free!) that permit you to write a program (including GUI/graphics) that can be compiled on both Windows and Unix.
 
Thanks! "Always know what you say, but don't always say what you know!"
 
I suggest if you are looking to do cross platform GUIs and things use a tool like Alegro and DJGPP on windows and g++ and Alegro on [L\U]nix. This way the same source should run, except if using system() or other more advanced features or anything involving bits and bit shifting.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top