[GH-ISSUE #174] undefined reference to 'workbook_new' #140

Closed
opened 2026-05-05 11:46:03 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @rafalkobe on GitHub (Apr 30, 2018).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/174

Originally assigned to: @jmcnamara on GitHub.

Anyone help me?

https://snag.gy/qbOBHn.jpg

I don't know what can I do? :(

Originally created by @rafalkobe on GitHub (Apr 30, 2018). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/174 Originally assigned to: @jmcnamara on GitHub. Anyone help me? https://snag.gy/qbOBHn.jpg I don't know what can I do? :(
gitea-mirror 2026-05-05 11:46:03 -06:00
Author
Owner

@jmcnamara commented on GitHub (May 1, 2018):

That is just a link error. You need to set up you environment to link against libxlsxwriter.

$ cd examples

$ cc hello.c -o hello                 
/tmp/ccD0YNKK.o: In function `main':
hello.c:(.text+0xe): undefined reference to `workbook_new'
hello.c:(.text+0x23): undefined reference to `workbook_add_worksheet'
hello.c:(.text+0x48): undefined reference to `worksheet_write_string'
hello.c:(.text+0x73): undefined reference to `worksheet_write_number'
hello.c:(.text+0x7f): undefined reference to `workbook_close'
collect2: error: ld returned 1 exit status

$ cc hello.c -o hello -lxlsxwriter

See the Getting Started section of the docs.

<!-- gh-comment-id:385621515 --> @jmcnamara commented on GitHub (May 1, 2018): That is just a link error. You need to set up you environment to link against libxlsxwriter. ``` $ cd examples $ cc hello.c -o hello /tmp/ccD0YNKK.o: In function `main': hello.c:(.text+0xe): undefined reference to `workbook_new' hello.c:(.text+0x23): undefined reference to `workbook_add_worksheet' hello.c:(.text+0x48): undefined reference to `worksheet_write_string' hello.c:(.text+0x73): undefined reference to `worksheet_write_number' hello.c:(.text+0x7f): undefined reference to `workbook_close' collect2: error: ld returned 1 exit status $ cc hello.c -o hello -lxlsxwriter ``` See the [Getting Started](https://libxlsxwriter.github.io/getting_started.html) section of the docs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#140
No description provided.