• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 780
  • Last Modified:

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.

2 Solutions
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.
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.

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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

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
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.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now