# Linker Error Not Reported in 'Problems' View

**URL:** <https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313>\
**Category:** Development tools\
**Created:** [June 8, 2009, 1:51pm UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313 "2009-06-08T13:51:57Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [June 8, 2009, 1:51pm UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/1 "2009-06-08T13:51:57Z")

</div>

I’m adding stuff to a Project, and I did a build to check that what I have so far builds OK.  
I knew that I’d referenced a function that I haven’t written yet - so I expected an “undefined reference” error.

But the ‘Problems’ View showed “0 items” 😮❗

When I checked in the ‘Console’ view, the error was there - as expected:

> [@](#):
>
> src\sdc\_test.o:(.rodata+0x18): undefined reference to `task2’  
> Build error occurred, build is stopped

So why did that not appear in the ‘Problems’ view?! 😮

Does this mean that the ‘Problems’ view cannot be trusted? 😠

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [June 9, 2009, 7:41am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/2 "2009-06-09T07:41:01Z")

</div>

> [@](#):
>
> src\sdc\_test.o:(.rodata+0x18): undefined reference to `task2’

The linker output seems a bit strange… usually, the linker prints a reference to the source file location where the error has occured…

e.g.

> [@](#):
>
> …\src/hello\_world.c:102: undefined reference to `arfarfarf’

Maybe that’s why the error parser is confused…  
Is the source/object file (from where you reference the non-existing function) “special”?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [June 9, 2009, 3:30pm UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/3 "2009-06-09T15:30:00Z")

</div>

> [@daav](#):
>
> Is the source/object file (from where you reference the non-existing function) “special”?

The “undefined reference” was actually in the Task Table - like this:

```auto
const adl_InitTasks_t adl_InitTasks [] =
{
{ MainTask, 3*1024, "MAIN", 3 }, // Main task
{ SubTask1, 3*1024, "SUB1", 2 }, // Sub task 1
{ SubTask2, 3*1024, "SUB2", 1 }, // Sub task 2
{ NULL, 0, NULL, 0 }
};
```

So there isn’t an actual “call” to the function.

Maybe that’s what confuses it?

Still a bug in the parser, though.

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [June 10, 2009, 6:55am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/4 "2009-06-10T06:55:43Z")

</div>

I just made a quick try, and I have the same issue: it’s true that’s confusing to have an unsuccessful build without errors reported visually on the project explorer!

By the way, about the task table management, do you know the Code generation feature?  
By right-clicking on your project \> Open AT \> Generate Code, it opens a specific editor where you can setup your task table, and it generates the code for you…

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [June 10, 2009, 8:11am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/5 "2009-06-10T08:11:25Z")

</div>

> [@daav](#):
>
> By right-clicking on your project \> Open AT \> Generate Code, it opens a specific editor…

Mine just says, “The chosen operation is not enabled”. ☹

So how do I enable it ❓

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [June 11, 2009, 7:44am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/6 "2009-06-11T07:44:16Z")

</div>

> [@](#):
>
> Mine just says, “The chosen operation is not enabled”.

Maybe you’ve made the try on a project depending on an Open AT OS version older than 6.X (the one from which multitasking is supported…)?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [June 11, 2009, 7:59am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/7 "2009-06-11T07:59:10Z")

</div>

No - I had just clicked on a Project that was not the Active project! 😊

The message could be clearer, though; eg,

> [@](#):
>
> “The chosen operation is only allowed on the Active project”.

But, even when I do it on the Active project, I just get a blank form. ☹  
Does this mean that it can’t be used to update an existing project that was started “manually”?

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [June 11, 2009, 8:05am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/8 "2009-06-11T08:05:18Z")

</div>

> [@](#):
>
> Does this mean that it can’t be used to update an existing project that was started “manually”?

Well, yes and no…  
It doesn’t parse existing code to extract Task Table information.  
But you can browse to point on your existing functions in order to generate a new Task Table (and don’t forget to delete the old one, to avoid a “multiply defined link” error).

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [June 11, 2009, 8:13am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/9 "2009-06-11T08:13:31Z")

</div>

> [@daav](#):
>
> you can browse to point on your existing functions in order to generate a new Task Table

Sorry, I don’t get what you mean by that 😕

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [June 11, 2009, 8:22am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/10 "2009-06-11T08:22:48Z")

</div>

Ok, let’s go for a quick tutorial 😉

- In the editor, enable the task table
- Add a new task
- It will propose you to create a new function or to browse for an existing one: just browse to your function
- Just add a name and the call stack size
- And repeat for all your tasks…

By the way, note that by double-clicking on the table line (once created), it will open the source code editor to show the task entry point.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [June 11, 2009, 9:28am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/11 "2009-06-11T09:28:05Z")

</div>

> [@daav](#):
>
> Ok, let’s go for a quick tutorial 😉
> 
> - In the editor, enable the task table

That is, the Code Generation editor.

I don’t find it immediately obvious how to “enable the task table”; when I see a button labelled ‘Generate Task Table’, I take that to mean that pressing it will cause a Task Table to be generated.  
If its function is to enable the GUI facility, it should say that.

There is also an ambiguity about whether “the task table” refers to the list in the GUI, or the table (array) that is generated in the source code…

> [@](#):
>
> - Add a new task

Ah - there’s the catch: I didn’t want to add a new task, so I didn’t consider the ‘new task’ button!

The secret of really good GUI design is to make it really clear and obvious what each element of the GUI does, while at the same time not getting too verbose and/or cluttered as to obscure things!

But why can’t it just find the existing Task Table? It has to be called adl\_InitTasks - so it should be easy to find!  
Similarly for the Interrupt Handler stack sizes, wm\_apmIRQLowLevelStackSize and wm\_apmIRQHighLevelStackSize

Maybe a ‘Search’ button could be added to the form to find potential entries for all the GUI tables, and the user could then choose which one(s) to use…?

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [June 12, 2009, 7:32am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/12 "2009-06-12T07:32:05Z")

</div>

We’ve logged your points for integration in a future release:

- Clarification of the UI
- Propose/Automatically perform a detection of the already defined application settings in the source code

Thanks.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [June 12, 2009, 7:34am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/13 "2009-06-12T07:34:51Z")

</div>

> [@daav](#):
>
> We’ve logged your points for integration in a future release

😃 Thanks! 😃

One more: Is it possible to change the name of the generated files?  
“generated.c” and “generated.h” aren’t really very informative…

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [June 12, 2009, 8:02am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/14 "2009-06-12T08:02:27Z")

</div>

> [@](#):
>
> Is it possible to change the name of the generated files?

Also logged: the capability to configure the output filenames.

Thanks.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [November 28, 2009, 8:44am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/15 "2009-11-28T08:44:02Z")

</div>

> [@daav](#):
>
> Also logged: the capability to configure the output filenames.

But not yet implemented in 1.1.1 ❓

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [November 28, 2009, 8:47am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/16 "2009-11-28T08:47:25Z")

</div>

Back to the original subject of Linker Messages, I think it would be helpful if Linker messages were somehow distinguished from Compiler messages in the ‘Problems’ view…

Especially as the messages can be [listed in the wrong order](http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?f=78&t=4284) in the ‘Problems’ view…

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/daav/32/2767_2.png) [@daav](https://forum.sierrawireless.com/u/daav)\
**Post date:** [November 30, 2009, 9:01am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/17 "2009-11-30T09:01:51Z")

</div>

> [@awneil](#):
>
> I think it would be helpful if Linker messages were somehow distinguished from Compiler messages in the ‘Problems’ view…

Small addition to my answer in the other topic: in the Configure Contents… dialog of the Problems View, you can define new configurations, e.g. to list only “undefined reference” problems.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [November 30, 2009, 9:51am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/18 "2009-11-30T09:51:50Z")

</div>

> [@daav](#):
>
> you can define new configurations, e.g. to list only “undefined reference” problems.

That’s not what I was after.

I still want all the messages, but I want it to be clear which ones are Compiler messages, and which are Linker messages.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [December 2, 2009, 9:34am UTC](https://forum.sierrawireless.com/t/linker-error-not-reported-in-problems-view/3313/19 "2009-12-02T09:34:57Z")

</div>

> [@daav](#):
>
> The linker output seems a bit strange… usually, the linker prints a reference to the source file location where the error has occured…
> 
> e.g.
> 
> > [@](#):
> >
> > …\src/hello\_world.c:102: undefined reference to `arfarfarf’
> 
> Maybe that’s why the error parser is confused…

See: [viewtopic.php?f=78&t=4298](http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?f=78&t=4298)

In that case, a source file location is given - but the ‘Problems’ view still doesn’t handle it properly!

It seems like the error parser has a number of problems with the Linker output…?
