Dec 25, 2010 0
create a Win32 console or window application by linking with linux compiled or gcc libs
link linux static library to win32 application,
It is possible to create a Win32 console or window application by linking with linux compiled or gcc libs?
I understand direct equivalent for shared libraries(.so) in windows is DLL, right?
Another alternative is to just use a .def file for your windows project. This file specifies the DLL exports, so you won’t have to mess up your code base.
I could solve the C89_COMPILER C89_LINKER and mspdb80.dll errors thanks to jerker_back’s solution.
1) Open a Korn Shell
2) “cd” to go back to the home directory
3) “edit .profile”
4) The following content goes into the .profile file:
__msvc=”/dev/fs/C/Program Files/Microsoft Visual Studio 9.0″
export PATH=”$PATH:${__msvc}/Common7/IDE:${__msvc}/VC/bin”
export C89_COMPILER=”${__msvc}/VC/bin/cl.exe”
export C89_LINKER=”${__msvc}/VC/bin/link.exe”
unset __msvc
5) Save it, quit edit
6) chmod 0600 .profile
7) restart Korn Shell so that .profile gets executed
“echo $C89_COMPILER” , it should be defined now, and c89 should run properly
http://www.interopsystems.com/tools/FAQs.aspx#501
“5.01 – Accessing Win32 APIs”
“… – Starting with Windows 2003 R2, Interix (aka Windows Subsystem for UNIX-based Applications) is included as part of the OS and Interix and Win32 API’s can be both linked into the same program.”
http://www.suacommunity.com/forum/tm.aspx?m=8207
Further readings.
Basic of Static, Shared Dynamic and Loadable Linux Libraries.
link linux library to win32 application

Popular Discussion Here