Author Topic: Adding new class with the class wizzard causes "undefined reference to main"  (Read 4746 times)

Offline linuser42

  • Multiple posting newcomer
  • *
  • Posts: 10
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.codeblocks.org/index.php?topic=20115.0
- http://forums.codeblocks.org/index.php?topic=19639.0
- http://forums.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
« Last Edit: December 04, 2015, 12:53:32 pm by linuser42 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
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!]

Offline linuser42

  • Multiple posting newcomer
  • *
  • Posts: 10
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?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
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.

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.codeblocks.org/index.php/topic,20707.msg141111.html#msg141111

greetings

Offline linuser42

  • Multiple posting newcomer
  • *
  • Posts: 10
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?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
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....

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

Offline linuser42

  • Multiple posting newcomer
  • *
  • Posts: 10
note the svn in the name? this probably means that it was a nightly where this bug was fixed....

I understand now, thanks.

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