News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Adding new class with the class wizzard causes "undefined reference to main"

Started by linuser42, November 30, 2015, 03:59:51 PM

Previous topic - Next topic

linuser42

edit: see last post for solution

I'm using Code Blocks Release 13.12 rev 9501 (2013-12-25 18:25:45) gcc 5.2.1 Linux/unicode - 64 bit

This is not a new found bug by me, but has happened to a lot of people

- http://forums.next.codeblocks.org/index.php?topic=20115.0
- http://forums.next.codeblocks.org/index.php?topic=19639.0
- http://forums.next.codeblocks.org/index.php?topic=19772.0
- https://stackoverflow.com/questions/24537874/undefined-reference-to-main-after-adding-a-class-to-project


I didn't have this bug with the 32 bit version of Code Blocks on my previous system!
edit: I was using a svn build from https://launchpad.net/~pasgui/+archive/ubuntu/ppa which didn't contain the bug

As you can see from the link workarounds include:
- adding class by wizard, then closing and opening the project
- adding files manually to the project one by one
- installing the nightly builds

The most obvious one it to install the nightly builds of course.

But this seems like a minor bug to fix, especially since it has worked flawlessly for years.

Is anybody else experiencing this?
Is there a plan to add this to the stable builds?

Thanks in advance.

edit: see last post for solution

oBFusCATed

We have 15.12rc1, so if you don't use a nightly try this and tell us if the bug is really fixed.
We won't be patching 13.12 for sure.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

linuser42

So it's a bug on the 64 bit version?

How do I install that version?

I'm running Ubuntu MATE 15.10, and there's no .deb package or something similar here:

http://sourceforge.net/projects/codeblocks/files/Binaries/15.12-RC1/


So nightly is the only option for me?

BlueHazzard

Quote from: linuser42 on November 30, 2015, 05:46:39 PM
So it's a bug on the 64 bit version?

As far as i know this was a bug in 13.12. In every version not only 64 or 32 bit.

Quote from: linuser42 on November 30, 2015, 05:46:39 PM
So nightly is the only option for me?
yes. Your bug is fixed there. You can find pre build packages for your os in the corresponding forum posts: http://forums.next.codeblocks.org/index.php/topic,20707.msg141111.html#msg141111

greetings

linuser42

Quote from: BlueHazzard on November 30, 2015, 06:44:31 PM
As far as i know this was a bug in 13.12. In every version not only 64 or 32 bit.

I forgot to mention I used the svn build on Ubuntu 12.04 from https://launchpad.net/~pasgui/+archive/ubuntu/ppa and didn't have this bug.

So, which one should I use?

https://apt.jenslody.de - I'm guessing I need the unstable? Can I use them on Ubuntu?

or

https://launchpad.net/~damien-moore/+archive/ubuntu/codeblocks - will this work on Ubuntu 15.10?

BlueHazzard

Quote from: linuser42 on December 01, 2015, 01:43:22 AM
I forgot to mention I used the svn build on Ubuntu 12.04 from https://launchpad.net/~pasgui/+archive/ubuntu/ppa and didn't have this bug.
note the svn in the name? this probably means that it was a nightly where this bug was fixed....

Quote from: linuser42 on December 01, 2015, 01:43:22 AM
https://apt.jenslody.de - I'm guessing I need the unstable? Can I use them on Ubuntu?
or
https://launchpad.net/~damien-moore/+archive/ubuntu/codeblocks - will this work on Ubuntu 15.10?
probably this one of damien-moore, because it is specifically for ubuntu... but you have to try it... both are the latest svn builds (on damien-moore NOT for ubuntu ubuntu13.10.1 , ubuntu12.10.1  and ubuntu13.04.1 )

greetings

linuser42

Quote from: BlueHazzard on December 01, 2015, 01:18:06 PM
note the svn in the name? this probably means that it was a nightly where this bug was fixed....

I understand now, thanks.

Quote from: BlueHazzard on December 01, 2015, 01:18:06 PM
probably this one of damien-moore, because it is specifically for ubuntu... but you have to try it... both are the latest svn builds (on damien-moore NOT for ubuntu ubuntu13.10.1 , ubuntu12.10.1  and ubuntu13.04.1 )

I sent a PM do dmoore to ask if the build would work with Ubuntu 15.10, and he uploaded his ppa with the latest Code Blocks builds for Ubuntu 15.10.
Much appreciated and awesome from him to do that.
https://launchpad.net/~damien-moore/+archive/ubuntu/codeblocks