Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » The makefile of an export NOGTK project dropped an option -lpng
The makefile of an export NOGTK project dropped an option -lpng [message #29575] Mon, 01 November 2010 12:02 Go to next message
sevenjay is currently offline  sevenjay
Messages: 30
Registered: October 2008
Location: Taiwan
Member
The makefile dropped an option -lpng when theide exports a project with flag NOGTK.
(Build->Output mode->Export project)
When you make it will get lots of errors like "undefined reference to png_create_read_struct".

I Solve it by add an option -lpng in the Makefile.

I hope this is helpful.
Re: The makefile of an export NOGTK project dropped an option -lpng [message #29587 is a reply to message #29575] Tue, 02 November 2010 00:41 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Sevenjay,

Thanks for spotting this, it should be fixed now. It was caused by comparing unix style and windows style path, such a simple detail as \ vs. / makes a difference Smile If M$ would follow the same conventions as the rest of us, none of this would happen Twisted Evil

Funny thing is, that it didn't make any trouble in normal mode (without NOGTK), as libpng is pulled in by gtk. I guess that is one of the reasons nobody noticed that so far (the scarce usage of exported makefiles being the other reason).

Best regards,
Honza
Re: The makefile of an export NOGTK project dropped an option -lpng [message #29588 is a reply to message #29587] Tue, 02 November 2010 05:17 Go to previous messageGo to next message
sevenjay is currently offline  sevenjay
Messages: 30
Registered: October 2008
Location: Taiwan
Member
Thank you.

I am sorry that I didn't mention it was happened on Ubuntu 10.04.

Maybe something on my environment goes wrong?

the attachment is the makefile.

To make it gets errors like below:
_out/plugin/png/GCC-Gcc-Gui-Linux-Nogtk-Posix-Shared/png.a(pngupp.o): In function `Upp::PNGRaster::Init()':
pngupp.cpp:(.text._ZN3Upp9PNGRaster4InitEv+0x2d): undefined reference to `png_create_read_struct'
pngupp.cpp:(.text._ZN3Upp9PNGRaster4InitEv+0x64): undefined reference to `png_create_info_struct'

To solve it just insert this in the 134 line:
			-lpng \

I check it does have included the package png.

my gcc is (Ubuntu 4.4.3-4ubuntu5) 4.4.3.
  • Attachment: Makefile
    (Size: 386.58KB, Downloaded 288 times)
Re: The makefile of an export NOGTK project dropped an option -lpng [message #29590 is a reply to message #29588] Tue, 02 November 2010 07:50 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Oups, looks like I wasn't clear enough... What I meant was that I tracked down the bug and committed a fix Wink Just update your theide to 2830 or higher.

Honza
Re: The makefile of an export NOGTK project dropped an option -lpng [message #29595 is a reply to message #29590] Tue, 02 November 2010 12:02 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Question: why does linking with plugin/png not solve this problem? Why are we still relying on external .so?
Re: The makefile of an export NOGTK project dropped an option -lpng [message #29598 is a reply to message #29595] Tue, 02 November 2010 14:07 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

cbpporter wrote on Tue, 02 November 2010 12:02

Question: why does linking with plugin/png not solve this problem? Why are we still relying on external .so?

Answer: plugin/png uses the libpng sources (plugin/png/lib/*) on win32, but on other systems, the native libpng.so is used (and only part of the plugin/png code is compiled, namely the U++ encapsulation)

I can only guess the reasons for this, but I agree with it. Libpng is available in default installation of most, if not all, Linux distributions, so there should be no problem with that.

Honza
Re: The makefile of an export NOGTK project dropped an option -lpng [message #29609 is a reply to message #29598] Wed, 03 November 2010 17:47 Go to previous message
sevenjay is currently offline  sevenjay
Messages: 30
Registered: October 2008
Location: Taiwan
Member
Those are a good question and a good answer.
I understand now. Thank you both.
Previous Topic: Version Tab in .exe properties
Next Topic: Custom build steps includes
Goto Forum:
  


Current Time: Tue Apr 16 10:36:24 CEST 2024

Total time taken to generate the page: 0.01061 seconds