POrting Windows source code to Linux

 I am porting Cyberlink UPnP code from windows to Linux. It is working fine in windows .net environment. I want to know what are the steps to follow for porting on LInux.

 I have a Makefile.am and Makefile.in I tried to execute them in Linux. But it gives error in Makefile.in first instruction. Please give me your inputs.

Who is Participating?
Nguyen Huu PhuocSenior ManagerCommented:
To view your libexpat version, you can use command:
xmlwf -v
The output of configure command say your libexpat is old. Upgrade your libexpat before and reexecute configure command again.
Download libexpat here http://www.libexpat.org
What are you porting and from what sources?
Is Cyberlink UnPNP written on Java?
What is an error in Makefile.in?

Makefile.am and Makefile.in are automake and autoconf files.
There presence indicates that the product has probably already been ported to Linux.
First run the configure script:

That should create a makefile specific to your system.  Then run make:

That should build the system.  Many autoconf products also have a 'test'
target for make, to test that the product is functioning successfully:
make test

Lastly, if you are satisfied, you would install the product.  Most autoconf
products also specify an 'install' target in the makefile:
make install

There is likely a README file that describes the build and install procedures.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

sreenathkAuthor Commented:
Hi Brett,
 I tried your way. THe ./configure is generating one error.  see below..

checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for unistd.h... (cached) yes
checking expat.h usability... no
checking expat.h presence... no
checking for expat.h... no
configure: error: CyberLink needs Expat 1.95 later

I copied the  expat.h file into /usr/sys/inlcude, /sys  and /usr/sys ... But still this error is coming..
Please help me out.

expat.h is not enough, you need to install entire package. What kind of Linux do you run?
uname -a
sreenathkAuthor Commented:
It is
Linux Ocean 2.4.27-1-386 #1 Wed Dec 1 19:43:08 JST 2004 i686 GNU/Linux

Ocean is our PC name

sreenathkAuthor Commented:
Thank you for your inputs..

I installed expat in hte LInux. It is ok. Now ./configure gave me success.
I make the project..
It gave me error in the end.

../../../lib/unix/libclinkc.a(cxml_parser_expat.o)(.text+0x110):../../src/cybergarage/xml/cxml_parser_expat.c:105: undefined reference to `XML_SetUserData'
../../../lib/unix/libclinkc.a(cxml_parser_expat.o)(.text+0x12a):../../src/cybergarage/xml/cxml_parser_expat.c:106: undefined reference to `XML_SetElementHandler'
../../../lib/unix/libclinkc.a(cxml_parser_expat.o)(.text+0x13b):../../src/cybergarage/xml/cxml_parser_expat.c:107: undefined reference to `XML_SetCharacterDataHandler'
../../../lib/unix/libclinkc.a(cxml_parser_expat.o)(.text+0x15a):../../src/cybergarage/xml/cxml_parser_expat.c:109: undefined reference to `XML_Parse'
../../../lib/unix/libclinkc.a(cxml_parser_expat.o)(.text+0x164):../../src/cybergarage/xml/cxml_parser_expat.c:110: undefined reference to `XML_ParserFree'

Basically all are XML errors. I checked in the expat installation. The lib is in the /usr/local/lib path and header files are in /usr/local/include.

I also tried by setting export LD_LIBRARY_PATH. But still the error is coming.

Can you give me some inputs.

Thank you,
sreenathkAuthor Commented:
Thank you for your help. I solved the issue. Actually I did not install the expat correctly. With that all got solved.

I am splitting the points among  phuocnh and  brettmjohnson.  But I sincerely thank all who participated in this. Excellent answer.

Thank you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.