Ecere SDK/eC Forums • View topic - Program link issue




Ecere SDK/eC Forums

Ecere Developers Community

Program link issue

General help: new users, installing the Ecere SDK, using the IDE to compile and run applications.

Program link issue

Postby shakeshuck » Sun Dec 31, 2017 9:23 am

Hi Jerome,
I thought I had the IDE sorted, but only tried using it today.

On trying to build a test program, I get the message:

Code: Select all
Linking...
   /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crt1.o: In function `_start':
   ../../../../abuild/rpmbuild/BUILD/glibc-2.22/sysdeps/x86_64/start.S:114: error: undefined reference to `main'
   Linker Error: collect2: error: ld returned 1 exit status


Is this (assuming from the path) that this is a dependency issue...?
Or is it something simple like a path config problem?

Cheers.
shakeshuck
 
Posts: 42
Joined: Tue Dec 01, 2015 6:52 pm

Re: Program link issue

Postby jerome » Sun Dec 31, 2017 2:33 pm

Hi shakeshuck,

The main() function is usually generated and present in [yourproject].main.ec -> [yourproject].main.c.

And this should automatically be generated by the IDE as soon as you have a .ec file present in the project. Is there an eC module added to the main section of the project view? (Alt+0)

Regards,

-Jerome
jerome
Site Admin
 
Posts: 622
Joined: Sat Jan 16, 2010 11:16 pm

Re: Program link issue

Postby shakeshuck » Mon Jan 01, 2018 7:27 am

Hi Jerome, Happy New Year :)

I remember now, when I first created the project the IDE crashed. I thought it was a one-off (first use) so just created the source file myself. As it's been a while since I used ecere, I forgot to name it as an .ec file.
If I now try to save the file in the IDE as an ec source file, the IDE crashes again and no main file is created.
Is there a log file I can look at to see what the cause is?

Thanks,
Graham.
shakeshuck
 
Posts: 42
Joined: Tue Dec 01, 2015 6:52 pm

Re: Program link issue

Postby shakeshuck » Mon Jan 01, 2018 9:18 am

The linux log shows this:

Code: Select all
ecere-ide[2736]: segfault at 8 ip 00007f378c6c2324 sp 00007ffe44314160 error 4 in libecere.so.0.44[7f378c54c000+214000]
shakeshuck
 
Posts: 42
Joined: Tue Dec 01, 2015 6:52 pm

Re: Program link issue

Postby jerome » Mon Jan 01, 2018 4:43 pm

Happy New Year :)

The .main.ec file is generated when you build the project.

What file are you trying to save as a .ec file?
Is this a crash when you try to save using eC extension, if so it might be a crash in the parser...

If that's the case, if you could please send me or attach the file in question (save it using e.g. a .txt extension), then I could try to reproduce the problem.

Cheers,

-Jerome
jerome
Site Admin
 
Posts: 622
Joined: Sat Jan 16, 2010 11:16 pm

Re: Program link issue

Postby shakeshuck » Mon Jan 01, 2018 6:21 pm

I was only trying to test the setup by using the 'hello world' example.

I deleted and re-added the project a couple of times (!) and now it seems to have settled down, and is working (as far as the example app is concerned). Odd!

I'll have a little play tomorrow with a few more lines of code, and report back...

Cheers,
Graham.
shakeshuck
 
Posts: 42
Joined: Tue Dec 01, 2015 6:52 pm

Re: Program link issue

Postby shakeshuck » Wed Jan 03, 2018 4:47 pm

Seems OK now.
Perhaps it was just some config error on my part...

Cheers,
Graham.
shakeshuck
 
Posts: 42
Joined: Tue Dec 01, 2015 6:52 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 4 guests