NO

Author Topic: Problem with LibXls (unresolved external symbol Assert and Errno)  (Read 6773 times)

Rnard

  • Guest
Hi All,
i found by accident an interesting library which allows to access and read an excel file (http://libxls.sourceforge.net/).

I included the library name (libxlsreader.a) within Project options -> Linker etc.,

but i got the following error message:

POLINK: error: Unresolved external symbol '__errno'.
POLINK: error: Unresolved external symbol '__assert'.
POLINK: fatal error: 2 unresolved external(s).

I did many many attempts to try to solve this: including assert.h and errno.h, linking to several other libraries etc. but nothing to do.
But it compiles correctly in Codeblocks - MinGW.

What else could i do, to solve this ?

As an alternative, can you suggest me another library that allows access to Xls spreadsheets, and works fine with Pelles ?

Thank you in advance and kind regards !
Rnard

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #1 on: December 27, 2014, 11:52:20 PM »
The problem is that the library you're atrying to use is built against MSVCRT.lib that gives a different name to the two symbols not found in PellesC runtime libraries.
You have two options:
- link your program against msvcrt.lib (be sure to select 'Omit default library names in object files' from compiler tab).
- (preferred one) Rebuild the library with PellesC (I will try myself as soon as I'll have time).
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Rnard

  • Guest
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #2 on: December 28, 2014, 08:24:41 AM »
Thank you Frankie for your quick reply.
I will try asap with building the library myself, thank you again !

czerny

  • Guest
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #3 on: December 29, 2014, 12:59:10 PM »
Maybe this is from some use vor you!

This module uses DDEML to talk with excel. An example is included. I have not tested this very much! So, be carfull!

updated 31.12.14 20:31:00
« Last Edit: December 31, 2014, 08:31:17 PM by czerny »

Rnard

  • Guest
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #4 on: December 30, 2014, 06:43:48 AM »
Czerny,
I have no chance to test it before early January but i had a look at the two .c examples in the zipped file, and this looks fantastic !

Looks simple to handle and exactly what i was looking for, thank you!

One question: who developed this?
I was just thinking that, on the developer's webpage, some other interesting stuff can be found.

Thank you again for you hint, i think i will "replace" libxls with the library you just sent me!!!

Roberto

czerny

  • Guest
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #5 on: December 30, 2014, 07:38:15 AM »
One question: who developed this?
This is developed by me. It is not very well tested. So, please, send me your errors/problems.

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #6 on: December 30, 2014, 07:38:03 PM »
Maybe this is from some use vor you!

This module uses DDEML to talk with excel. An example is included. I have not tested this very much! So, be carfull!

Nice! Reminds me of my own attempts.
Excel sheets opens fine, but it doesn't write to cell 3,1 - and no error message.

czerny

  • Guest
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #7 on: December 31, 2014, 10:43:14 AM »
Excel sheets opens fine, but it doesn't write to cell 3,1 - and no error message.
I can not reproduce the problem on my system. Will test it on a quicker computer in 2015!

But there is an other one: XLSExec works with an call to DdeClientTransaction  where the timeout flag is set to TIMEOUT_ASYNC.
This works ok if this was not the last XLSExec call bevor an XLSClose. So it would be better to set this parameter to an explicit timeout value, say 3000.

czerny

  • Guest
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #8 on: December 31, 2014, 02:01:46 PM »
This
Code: [Select]
ShellExecute(0, "open", "C:\\test.xls", 0, 0, SW_SHOWMINIMIZED);is not working (open not minimized).

Is this Excel specific, or what?

SW_HIDE dowsn't work either. But SW_SHOWMAXIMIZED works.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Problem with LibXls (unresolved external symbol Assert and Errno)
« Reply #9 on: December 31, 2014, 03:15:39 PM »
LibXLS 1.4 example xls2csv.
« Last Edit: December 31, 2014, 03:41:05 PM by TimoVJL »
May the source be with you